Skip to content

Instantly share code, notes, and snippets.

@stpettersens
Last active July 28, 2025 23:38
Show Gist options
  • Save stpettersens/5ba8d9e9d39a6d0aed8f1fcf48ac2c77 to your computer and use it in GitHub Desktop.
Save stpettersens/5ba8d9e9d39a6d0aed8f1fcf48ac2c77 to your computer and use it in GitHub Desktop.
Working with copyparty
#!/usr/bin/env bash
python3 /usr/local/bin/copyparty-sfx.py -i 127.0.0.1 -p 3923 --dedup -c /etc/copyparty.conf
# HTTPS configuration generated by certbot here
# ...
listen 80;
server_name copyparty.homelab.mydomain.com;
location / {
proxy_pass http://127.0.0.1:3923/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off;
}
# Upload file with JSON response.
curl -u user:pass -F [email protected] https://copyparty.homelab.mydomain.com/films/?want=json
# Download a file.
curl -u user:pass -O https://copyparty.homelab.mydomain.com/films/bc.mp4
# not actually YAML but lets pretend:
# -*- mode: yaml -*-
# vim: ft=yaml:
# append some arguments to the commandline;
# accepts anything listed in --help (leading dashes are optional)
# and inline comments are OK if there is 2 spaces before the '#'
[global]
e2dsa # enable file indexing and filesystem scanning
e2ts # and enable multimedia indexing
z, qr # and zeroconf and qrcode (you can comma-separate arguments)
# create users:
[accounts]
username: password
[/films]
./films
accs:
rw: username
[/tvshows]
./series
accs:
rw: username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment