Docker volume for uploads #66

Closed
opened 2026-01-19 18:28:49 +00:00 by michael · 2 comments
Owner

Originally created by @luckman212 on GitHub.

Sorry if this is a noob question, but I just spun up a transfer.sh instance (Docker) 🎉

I used this command to specify a persistent volume for the uploads:

docker run -d \
--name transfersh \
--restart=unless-stopped \
-v transfersh:/tmp \
-e BASEDIR=/tmp \
dutchcoders/transfer.sh:latest --provider local

Is this incorrect? Didn't see any mention anywhere of volumes.

Also, is /tmp the right place to map the volume to? It generally should always match BASEDIR?

Originally created by @luckman212 on GitHub. Sorry if this is a noob question, but I just spun up a transfer.sh instance (Docker) 🎉 I used this command to specify a persistent volume for the uploads: ``` docker run -d \ --name transfersh \ --restart=unless-stopped \ -v transfersh:/tmp \ -e BASEDIR=/tmp \ dutchcoders/transfer.sh:latest --provider local ``` Is this incorrect? Didn't see any mention anywhere of volumes. Also, is `/tmp` the right place to map the volume to? It generally should always match `BASEDIR`?
Author
Owner

@paolafrancesca commented on GitHub:

@luckman212 https://github.com/dutchcoders/transfer.sh/blob/main/Dockerfile#L35 there is a /tmp folder in the docker image already, that's used for temporary storage by different providers and/or when direct streaming (both for upload and download) of the content of a file cannot be achieved (I plan to review the usage of the tmp folder and avoid it as soon as possible if not totally remove it)

said that, as BASEDIR is better to use a different folder name, just change the volume mount point and the environment variable in your command and that will be fine

@paolafrancesca commented on GitHub: @luckman212 https://github.com/dutchcoders/transfer.sh/blob/main/Dockerfile#L35 there is a `/tmp` folder in the docker image already, that's used for temporary storage by different providers and/or when direct streaming (both for upload and download) of the content of a file cannot be achieved (I plan to review the usage of the tmp folder and avoid it as soon as possible if not totally remove it) said that, as BASEDIR is better to use a different folder name, just change the volume mount point and the environment variable in your command and that will be fine
Author
Owner

@luckman212 commented on GitHub:

Got it. Thank you. I changed my run command to

docker run -d \
--name transfersh \
--restart=unless-stopped \
-v transfersh:/files \
-e BASEDIR=/files \
dutchcoders/transfer.sh:latest --provider local
@luckman212 commented on GitHub: Got it. Thank you. I changed my run command to ``` docker run -d \ --name transfersh \ --restart=unless-stopped \ -v transfersh:/files \ -e BASEDIR=/files \ dutchcoders/transfer.sh:latest --provider local ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#66