Run a copyparty instance and expose it using a cloudflare tunnel.
326
This repository provides a Dockerfile to run a copyparty fileserver. It is designed to be securely exposed to the internet using a Cloudflare Tunnel, which is managed within the container.
View the GitHub repository for this image: vilos92/copyparty-tunnel
Before you begin, ensure you have the following set up on your host machine:
copyparty.conf file: A configuration file for copyparty. This file tells the server which directories to share and sets permissions.You must configure the following correctly for the container to work.
The container will not function without your Cloudflare Tunnel token. It is required to authenticate with Cloudflare's network and create the secure tunnel.
Set it as an environment variable in your terminal before running the container:
export COPYPARTY_CLOUDFLARED_TOKEN="your-long-token-goes-here"
The copyparty.conf file controls everything about your fileserver. You must map your local configuration file into the container so the application can read it.
This is done with the -v flag in the docker run command:
-v "$(pwd)/copyparty.conf:/app/copyparty.conf:ro"
This command maps the copyparty.conf in your current directory to the expected location inside the container in read-only (ro) mode.
The most important step is to make your local files available inside the container. The paths you mount with the -v flag must match the paths defined inside your copyparty.conf file.
For example, if your copyparty.conf specifies a volume named /data/music, you must map one of your local folders to that exact path inside the container.
Example:
copyparty.conf contains: -v /data/music:r:user:passdocker run command MUST include a matching volume flag:
-v "/path/on/your/computer/to/music:/data/music"
For the tunnel to work correctly, the port number must be consistent across three places:
copyparty.conf file: Your configuration file must specify the port for the copyparty server to listen on (e.g., using the argument -p 3923).docker run command: The port mapping flag (-p 3923:3923) must expose the same container port that copyparty is listening on.http://localhost:3923).Using the same port number for all three (like 3923 in the examples) is highly recommended to avoid confusion.
You can pull this docker image from Docker Hub.
docker pull greglinscheid/copyparty-tunnel:latest
If you would prefer to build it yourself, navigate to the directory containing the Dockerfile and run the following command to build the image.
docker build -t greglinscheid/copyparty-tunnel:latest .
Run the command below to start your copyparty container.
✅ Remember: Replace the example volume paths (/path/on/your/computer/...) with the actual paths on your machine, ensuring they correspond to your copyparty.conf.
docker run -d \
--name gcopyparty \
-p 3923:3923 \
-u $(id -u) \
# Map your configuration file (required)
-v "$(pwd)/copyparty.conf:/app/copyparty.conf:ro" \
\
# Map your data volumes (examples below, change them!)
-v "/path/on/your/computer/to/music:/data/music" \
-v "/path/on/your/computer/to/documents:/data/docs" \
\
# Pass in the Cloudflare token (required)
-e COPYPARTY_CLOUDFLARED_TOKEN="$COPYPARTY_CLOUDFLARED_TOKEN" \
--restart unless-stopped \
greglinscheid/copyparty-tunnel:latest
Content type
Image
Digest
sha256:e791be1b3…
Size
97.3 MB
Last updated
about 1 year ago
docker pull greglinscheid/copyparty-tunnel