systemd: use /etc/copyparty.conf; closes #1631

This commit is contained in:
ed
2026-09-05 17:56:19 +00:00
parent 3e3401f4ed
commit 185087ee05
10 changed files with 40 additions and 27 deletions
+1 -1
View File
@@ -2639,7 +2639,7 @@ if your distro/OS is not mentioned below, there might be some hints in the [«on
`pacman -S copyparty` (in [arch linux extra](https://archlinux.org/packages/extra/any/copyparty/)) `pacman -S copyparty` (in [arch linux extra](https://archlinux.org/packages/extra/any/copyparty/))
it comes with a [systemd service](./contrib/systemd/copyparty@.service) as well as a [user service](./contrib/systemd/copyparty-user.service), and expects to find a [config file](./contrib/systemd/copyparty.example.conf) in `/etc/copyparty/copyparty.conf` or `~/.config/copyparty/copyparty.conf` it comes with a [systemd service](./contrib/systemd/copyparty@.service) as well as a [user service](./contrib/systemd/copyparty-user.service), and expects to find a [config file](./contrib/systemd/copyparty.example.conf) in `/etc/copyparty.conf` or `~/.config/copyparty/copyparty.conf`
after installing, start either the system service or the user service and navigate to http://127.0.0.1:3923 for further instructions (unless you already edited the config files, in which case you are good to go, probably) after installing, start either the system service or the user service and navigate to http://127.0.0.1:3923 for further instructions (unless you already edited the config files, in which case you are good to go, probably)
+4 -3
View File
@@ -13,12 +13,13 @@ depends=("bash" "python" "lsof" "python-jinja")
makedepends=("python-wheel" "python-setuptools" "python-build" "python-installer" "make" "pigz") makedepends=("python-wheel" "python-setuptools" "python-build" "python-installer" "make" "pigz")
optdepends=("ffmpeg: thumbnails for videos, images (slower) and audio, music tags" optdepends=("ffmpeg: thumbnails for videos, images (slower) and audio, music tags"
"cfssl: generate TLS certificates on startup" "cfssl: generate TLS certificates on startup"
"python-mutagen: music tags (alternative)" "python-mutagen: music tags (fast/inaccurate)"
"python-paramiko: sftp server",
"python-pillow: thumbnails for images" "python-pillow: thumbnails for images"
"python-pyvips: thumbnails for images (eats ram, prefer pillow)" "python-pyvips: thumbnails for images (eats ram, prefer pillow)"
"python-paramiko: sftp server"
"python-pyftpdlib: ftp server"
"python-pyopenssl: ftps server (needs pyftpdlib too)"
"libkeyfinder: detection of musical keys" "libkeyfinder: detection of musical keys"
"python-pyopenssl: ftps functionality"
"python-pyzmq: send zeromq messages from event-hooks" "python-pyzmq: send zeromq messages from event-hooks"
"python-argon2-cffi: hashed passwords in config" "python-argon2-cffi: hashed passwords in config"
) )
@@ -15,7 +15,7 @@ Description=copyparty file server
Type=notify Type=notify
SyslogIdentifier=copyparty SyslogIdentifier=copyparty
Environment=PYTHONUNBUFFERED=x Environment=PYTHONUNBUFFERED=x
WorkingDirectory=/var/lib/copyparty-jail WorkingDirectory=/var/lib/copyparty-jail/srv
ExecReload=/bin/kill -s USR1 $MAINPID ExecReload=/bin/kill -s USR1 $MAINPID
# user to run as + where the TLS certificate is (if any) # user to run as + where the TLS certificate is (if any)
+12 -2
View File
@@ -1,3 +1,13 @@
this is `/var/lib/copyparty-jail`, the fallback webroot when copyparty has not yet been configured this is `/var/lib/copyparty-jail/srv/`, the fallback webroot when copyparty has not yet been configured
please add some `*.conf` files to `/etc/copyparty.d/` please edit the config-file and restart copyparty;
* if running as a system service: `vim /etc/copyparty.conf`
* if running as a user service: `vim $HOME/.config/copyparty/copyparty.conf`
some inspiration:
* a basic example config: https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.example.conf
* another example with focus on syntax: https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf
* and CTRL-F `config file example` here: https://github.com/9001/copyparty
the full list of configuration options can be seen at https://copyparty.eu/cli/
or by running `copyparty --help`
@@ -17,7 +17,7 @@ Description=copyparty file server
[Service] [Service]
SyslogIdentifier=prisonparty SyslogIdentifier=prisonparty
Environment=PYTHONUNBUFFERED=x Environment=PYTHONUNBUFFERED=x
WorkingDirectory=/var/lib/copyparty-jail WorkingDirectory=/var/lib/copyparty-jail/srv
ExecReload=/bin/kill -s USR1 $MAINPID ExecReload=/bin/kill -s USR1 $MAINPID
# stop systemd-tmpfiles-clean.timer from deleting copyparty while it's running # stop systemd-tmpfiles-clean.timer from deleting copyparty while it's running
+3 -3
View File
@@ -1,5 +1,5 @@
# this will start `/usr/bin/copyparty` # this will start `/usr/bin/copyparty`
# and read config from `$HOME/.config/copyparty.conf` # and read config from `$HOME/.config/copyparty/copyparty.conf`
# #
# unless you add -q to disable logging, you may want to remove the # unless you add -q to disable logging, you may want to remove the
# following line to allow buffering (slightly better performance): # following line to allow buffering (slightly better performance):
@@ -11,13 +11,13 @@ Description=copyparty file server
[Service] [Service]
Type=notify Type=notify
SyslogIdentifier=copyparty SyslogIdentifier=copyparty
WorkingDirectory=/var/lib/copyparty-jail WorkingDirectory=/var/lib/copyparty-jail/srv
Environment=PYTHONUNBUFFERED=x Environment=PYTHONUNBUFFERED=x
Environment=PRTY_CONFIG=%h/.config/copyparty/copyparty.conf Environment=PRTY_CONFIG=%h/.config/copyparty/copyparty.conf
ExecReload=/bin/kill -s USR1 $MAINPID ExecReload=/bin/kill -s USR1 $MAINPID
# ensure there is a config # ensure there is a config
ExecStartPre=/bin/bash -c 'if [[ ! -f %h/.config/copyparty/copyparty.conf ]]; then mkdir -p %h/.config/copyparty; cp /etc/copyparty/copyparty.conf %h/.config/copyparty/copyparty.conf; fi' ExecStartPre=/bin/bash -c 'if [[ ! -f %h/.config/copyparty/copyparty.conf ]]; then mkdir -p %h/.config/copyparty; cp -v /etc/copyparty.conf %h/.config/copyparty/; fi'
# run copyparty # run copyparty
ExecStart=/usr/bin/python3 /usr/bin/copyparty ExecStart=/usr/bin/python3 /usr/bin/copyparty
+6 -6
View File
@@ -1,15 +1,15 @@
[/] [/]
/var/lib/copyparty-jail /var/lib/copyparty-jail/srv/
accs: accs:
r: * # everyone can [r]ead (browse/download) r: * # everyone can [r]ead (browse/download)
# above is a very simple config; # above is a very simple config;
# the webroot is /var/lib/copyparty-jail # the webroot is /var/lib/copyparty-jail/srv/
# readable by everyone, no login required # readable by everyone, no login required
# #
# you'll want to replace this file; some inspiration: # you'll want to replace this file; some inspiration:
# a basic example: https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.example.conf # - a basic example config: https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.example.conf
# another example: https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf # - another example with focus on syntax: https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf
# CTRL-F "config file example" here: https://github.com/9001/copyparty # - and CTRL-F "config file example" here: https://github.com/9001/copyparty
# full list of options: https://copyparty.eu/cli/ # - full list of options: https://copyparty.eu/cli/
+3 -3
View File
@@ -1,5 +1,5 @@
# this will start `/usr/bin/copyparty` # this will start `/usr/bin/copyparty`
# and read config from `/etc/copyparty/copyparty.conf` # and read config from `/etc/copyparty.conf`
# #
# the %i refers to whatever you put after the copyparty@ # the %i refers to whatever you put after the copyparty@
# so with copyparty@foo.service, %i == foo # so with copyparty@foo.service, %i == foo
@@ -14,9 +14,9 @@ Description=copyparty file server
[Service] [Service]
Type=notify Type=notify
SyslogIdentifier=copyparty SyslogIdentifier=copyparty
WorkingDirectory=/var/lib/copyparty-jail WorkingDirectory=/var/lib/copyparty-jail/srv
Environment=PYTHONUNBUFFERED=x Environment=PYTHONUNBUFFERED=x
Environment=PRTY_CONFIG=/etc/copyparty/copyparty.conf Environment=PRTY_CONFIG=/etc/copyparty.conf
ExecReload=/bin/kill -s USR1 $MAINPID ExecReload=/bin/kill -s USR1 $MAINPID
# user to run as + where the TLS certificate is (if any) # user to run as + where the TLS certificate is (if any)
+6 -4
View File
@@ -1,11 +1,13 @@
this is `/var/lib/copyparty-jail`, the fallback webroot when copyparty has not yet been configured this is `/var/lib/copyparty-jail/srv/`, the fallback webroot when copyparty has not yet been configured
please edit `/etc/copyparty/copyparty.conf` (if running as a system service) please edit the config-file and restart copyparty;
or `$HOME/.config/copyparty/copyparty.conf` if running as a user service * if running as a system service: `vim /etc/copyparty.conf`
* if running as a user service: `vim $HOME/.config/copyparty/copyparty.conf`
some inspiration:
* a basic example config: https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.example.conf * a basic example config: https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.example.conf
* another example with focus on syntax: https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf * another example with focus on syntax: https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf
* and CTRL-F "config file example" here: https://github.com/9001/copyparty * and CTRL-F `config file example` here: https://github.com/9001/copyparty
the full list of configuration options can be seen at https://copyparty.eu/cli/ the full list of configuration options can be seen at https://copyparty.eu/cli/
or by running `copyparty --help` or by running `copyparty --help`
+3 -3
View File
@@ -1,6 +1,6 @@
# this will start `/usr/bin/copyparty` # this will start `/usr/bin/copyparty`
# in a chroot, preventing accidental access elsewhere, # in a chroot, preventing accidental access elsewhere,
# and read copyparty config from `/etc/copyparty/copyparty.conf` # and read copyparty config from `/etc/copyparty.conf`
# #
# expose additional filesystem locations to copyparty # expose additional filesystem locations to copyparty
# by listing them between the last `%i` and `--` # by listing them between the last `%i` and `--`
@@ -19,9 +19,9 @@ Description=copyparty file server
[Service] [Service]
Type=notify Type=notify
SyslogIdentifier=prisonparty SyslogIdentifier=prisonparty
WorkingDirectory=/var/lib/copyparty-jail WorkingDirectory=/var/lib/copyparty-jail/srv
Environment=PYTHONUNBUFFERED=x Environment=PYTHONUNBUFFERED=x
Environment=PRTY_CONFIG=/etc/copyparty/copyparty.conf Environment=PRTY_CONFIG=/etc/copyparty.conf
ExecReload=/bin/kill -s USR1 $MAINPID ExecReload=/bin/kill -s USR1 $MAINPID
# user to run as + where the TLS certificate is (if any) # user to run as + where the TLS certificate is (if any)