Skip to content

Commit 89c97bb

Browse files
Added Copyparty (#119)
* Added Copyparty * Update README.md --------- Co-authored-by: Jack Spiering <[email protected]>
1 parent ade8ed0 commit 89c97bb

File tree

6 files changed

+145
-0
lines changed

6 files changed

+145
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ If you would like to add your own config, you can use the [service-template](tem
8686
| 🗂️ **Kaneo** | A modern, self-hosted project management platform focused on simplicity. | [Details](services/kaneo) |
8787
| 🗒️ **Karakeep** | A self-hosted, collaborative note-taking app — a private alternative to Google Keep. | [Details](services/karakeep) |
8888
| 📚 **Docmost** | A self-hosted, real-time collaborative wiki with rich editing, diagrams, permissions, and full-text search. | [Details](services/docmost) |
89+
| 🗂️ **Copyparty** | A self-hosted file server with accelerated resumable uploads. | [Details](services/copyparty/) |
8990

9091
### 📊 Dashboards and Visualization
9192

services/copyparty/.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#version=1.0
2+
#url=https://github.com/2Tiny2Scale/tailscale-docker-sidecar-configs
3+
#COMPOSE_PROJECT_NAME= // only use in multiple deployments on the same infra
4+
SERVICE=copyparty
5+
IMAGE_URL=copyparty/ac:latest
6+
SERVICEPORT=3923
7+
TS_AUTHKEY=
8+
DNS_SERVER=9.9.9.9

services/copyparty/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyparty with Tailscale Sidecar Configuration
2+
3+
This Docker Compose configuration sets up [Copyparty](https://github.com/9001/copyparty) with Tailscale as a sidecar container to securely access your lightweight file server and sharing platform over a private Tailscale network. By using Tailscale in a sidecar configuration, you can enhance the security and accessibility of your Copyparty instance, ensuring it is only available within your Tailscale network.
4+
5+
## Copyparty
6+
7+
[Copyparty](https://github.com/9001/copyparty) is a versatile, self-contained file server that runs on virtually any system. It supports file uploads, downloads, media streaming, WebDAV, and even full-on public or private file sharing with user authentication. Designed to be fast and lightweight, it requires no external dependencies and is extremely customizable. With this setup, Copyparty is exposed only to your Tailscale network, providing secure, peer-to-peer access from your devices.
8+
9+
**Key Features:**
10+
11+
- 📤 Drag-and-drop uploads via the browser
12+
- 📁 Directory listing and browsing
13+
- 🔒 User authentication and permissions
14+
- 🌐 WebDAV support for file mounts and syncing
15+
- 🎵 Audio/video streaming with built-in media player
16+
- 📝 Built-in text editor and image previews
17+
- 🧩 Single binary, no dependencies required
18+
- 🖥️ Runs on any OS, including Linux, Windows, macOS, and even Android
19+
- 🔧 Highly configurable with powerful CLI flags and config options
20+
21+
With Tailscale in place, all of these features are securely tunneled through your private mesh network—no need to expose ports to the public internet.
22+
23+
## Configuration Overview
24+
25+
In this setup, the `tailscale-copyparty` service runs Tailscale, which handles the secure networking layer. The `copyparty` service uses Docker’s `network_mode: service:` setting to share the network stack of the Tailscale container. This means the Copyparty web interface and all file sharing functionality are only accessible via the Tailscale network (or locally if preferred), adding a strong privacy layer to your self-hosted file server.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# not actually YAML but lets pretend:
2+
# -*- mode: yaml -*-
3+
# vim: ft=yaml:
4+
5+
6+
[global]
7+
e2dsa # enable file indexing and filesystem scanning
8+
e2ts # enable multimedia indexing
9+
ansi # enable colors in log messages
10+
11+
# q, lo: /cfg/log/%Y-%m%d.log # log to file instead of docker
12+
13+
# p: 3939 # listen on another port
14+
# ipa: 10.89. # only allow connections from 10.89.*
15+
# df: 16 # stop accepting uploads if less than 16 GB free disk space
16+
# ver # show copyparty version in the controlpanel
17+
# grid # show thumbnails/grid-view by default
18+
# theme: 2 # monokai
19+
# name: datasaver # change the server-name that's displayed in the browser
20+
# stats, nos-dup # enable the prometheus endpoint, but disable the dupes counter (too slow)
21+
# no-robots, force-js # make it harder for search engines to read your server
22+
23+
24+
[accounts]
25+
ed: wark # username: password
26+
27+
28+
[/] # create a volume at "/" (the webroot), which will
29+
/w # share /w (the docker data volume)
30+
accs:
31+
rw: * # everyone gets read-write access, but
32+
rwmda: ed # the user "ed" gets read-write-move-delete-admin
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"TCP": {
3+
"443": {
4+
"HTTPS": true
5+
}
6+
},
7+
"Web": {
8+
"${TS_CERT_DOMAIN}:443": {
9+
"Handlers": {
10+
"/": {
11+
"Proxy": "http://127.0.0.1:3923"
12+
}
13+
}
14+
}
15+
}
16+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
services:
2+
# Make sure you have updated/checked the .env file with the correct variables.
3+
# All the ${ xx } need to be defined there.
4+
# Tailscale Sidecar Configuration
5+
tailscale:
6+
image: tailscale/tailscale:latest # Image to be used
7+
container_name: tailscale-${SERVICE} # Name for local container management
8+
hostname: ${SERVICE} # Name used within your Tailscale environment
9+
environment:
10+
- TS_AUTHKEY=${TS_AUTHKEY}
11+
- TS_STATE_DIR=/var/lib/tailscale
12+
- TS_SERVE_CONFIG=/config/serve.json # Tailsacale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required
13+
- TS_USERSPACE=false
14+
- TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz"
15+
- TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The <addr>:<port> for the healthz endpoint
16+
#- TS_ACCEPT_DNS=true # Uncomment when using MagicDNS
17+
volumes:
18+
- ${PWD}/config:/config # Config folder used to store Tailscale files - you may need to change the path
19+
- ${PWD}/ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path
20+
devices:
21+
- /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work
22+
cap_add:
23+
- net_admin # Tailscale requirement
24+
- sys_module # Tailscale requirement
25+
#ports:
26+
# - 0.0.0.0:${SERVICEPORT}:${SERVICEPORT} # Binding port ${SERVICE}PORT to the local network - may be removed if only exposure to your Tailnet is required
27+
# If any DNS issues arise, use your preferred DNS provider by uncommenting the config below
28+
#dns:
29+
# - ${DNS_SERVER}
30+
healthcheck:
31+
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational
32+
interval: 1m # How often to perform the check
33+
timeout: 10s # Time to wait for the check to succeed
34+
retries: 3 # Number of retries before marking as unhealthy
35+
start_period: 10s # Time to wait before starting health checks
36+
restart: always
37+
38+
# ${SERVICE}
39+
application:
40+
image: ${IMAGE_URL} # Image to be used
41+
network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale
42+
container_name: app-${SERVICE} # Name for local container management
43+
user: "1000:1000"
44+
volumes:
45+
- ${PWD}/config:/cfg:z
46+
- /path/to/your/fileshare/top/folder:/w:z # Make sure to adjust to the location you want
47+
depends_on:
48+
tailscale:
49+
condition: service_healthy
50+
51+
# enabling mimalloc by replacing "NOPE" with "2" will make some stuff twice as fast, but everything will use twice as much ram:
52+
environment:
53+
LD_PRELOAD: /usr/lib/libmimalloc-secure.so.NOPE
54+
55+
stop_grace_period: 15s # thumbnailer is allowed to continue finishing up for 10s after the shutdown signal
56+
healthcheck:
57+
# hide it from logs with "/._" so it matches the default --lf-url filter
58+
test: ["CMD-SHELL", "wget --spider -q 127.0.0.1:3923/?reset=/._"]
59+
interval: 1m
60+
timeout: 2s
61+
retries: 5
62+
start_period: 15s
63+
restart: always

0 commit comments

Comments
 (0)