diff --git a/README.md b/README.md index e4a156599..96bf63c7e 100644 --- a/README.md +++ b/README.md @@ -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/)) -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) diff --git a/contrib/package/arch/PKGBUILD b/contrib/package/arch/PKGBUILD index 917036088..ac3ca87cc 100644 --- a/contrib/package/arch/PKGBUILD +++ b/contrib/package/arch/PKGBUILD @@ -13,12 +13,13 @@ depends=("bash" "python" "lsof" "python-jinja") makedepends=("python-wheel" "python-setuptools" "python-build" "python-installer" "make" "pigz") optdepends=("ffmpeg: thumbnails for videos, images (slower) and audio, music tags" "cfssl: generate TLS certificates on startup" - "python-mutagen: music tags (alternative)" - "python-paramiko: sftp server", + "python-mutagen: music tags (fast/inaccurate)" "python-pillow: thumbnails for images" "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" - "python-pyopenssl: ftps functionality" "python-pyzmq: send zeromq messages from event-hooks" "python-argon2-cffi: hashed passwords in config" ) diff --git a/contrib/package/makedeb-mpr/copyparty.service b/contrib/package/makedeb-mpr/copyparty.service index e6f3b2292..aa56bafa6 100644 --- a/contrib/package/makedeb-mpr/copyparty.service +++ b/contrib/package/makedeb-mpr/copyparty.service @@ -15,7 +15,7 @@ Description=copyparty file server Type=notify SyslogIdentifier=copyparty Environment=PYTHONUNBUFFERED=x -WorkingDirectory=/var/lib/copyparty-jail +WorkingDirectory=/var/lib/copyparty-jail/srv ExecReload=/bin/kill -s USR1 $MAINPID # user to run as + where the TLS certificate is (if any) diff --git a/contrib/package/makedeb-mpr/index.md b/contrib/package/makedeb-mpr/index.md index 016c0b0a9..020481410 100644 --- a/contrib/package/makedeb-mpr/index.md +++ b/contrib/package/makedeb-mpr/index.md @@ -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` diff --git a/contrib/package/makedeb-mpr/prisonparty.service b/contrib/package/makedeb-mpr/prisonparty.service index cd35ba990..58ff0cf65 100644 --- a/contrib/package/makedeb-mpr/prisonparty.service +++ b/contrib/package/makedeb-mpr/prisonparty.service @@ -17,7 +17,7 @@ Description=copyparty file server [Service] SyslogIdentifier=prisonparty Environment=PYTHONUNBUFFERED=x -WorkingDirectory=/var/lib/copyparty-jail +WorkingDirectory=/var/lib/copyparty-jail/srv ExecReload=/bin/kill -s USR1 $MAINPID # stop systemd-tmpfiles-clean.timer from deleting copyparty while it's running diff --git a/contrib/systemd/copyparty-user.service b/contrib/systemd/copyparty-user.service index c6f610002..65250f304 100644 --- a/contrib/systemd/copyparty-user.service +++ b/contrib/systemd/copyparty-user.service @@ -1,5 +1,5 @@ # 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 # following line to allow buffering (slightly better performance): @@ -11,13 +11,13 @@ Description=copyparty file server [Service] Type=notify SyslogIdentifier=copyparty -WorkingDirectory=/var/lib/copyparty-jail +WorkingDirectory=/var/lib/copyparty-jail/srv Environment=PYTHONUNBUFFERED=x Environment=PRTY_CONFIG=%h/.config/copyparty/copyparty.conf ExecReload=/bin/kill -s USR1 $MAINPID # 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 ExecStart=/usr/bin/python3 /usr/bin/copyparty diff --git a/contrib/systemd/copyparty.conf b/contrib/systemd/copyparty.conf index 6161cccbb..f95c8cb00 100644 --- a/contrib/systemd/copyparty.conf +++ b/contrib/systemd/copyparty.conf @@ -1,15 +1,15 @@ [/] - /var/lib/copyparty-jail + /var/lib/copyparty-jail/srv/ accs: r: * # everyone can [r]ead (browse/download) # 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 # # you'll want to replace this file; some inspiration: -# a basic example: https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.example.conf -# another example: https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf -# CTRL-F "config file example" here: https://github.com/9001/copyparty -# full list of options: https://copyparty.eu/cli/ +# - 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 +# - full list of options: https://copyparty.eu/cli/ diff --git a/contrib/systemd/copyparty@.service b/contrib/systemd/copyparty@.service index cd891eabb..8fd4d62c2 100644 --- a/contrib/systemd/copyparty@.service +++ b/contrib/systemd/copyparty@.service @@ -1,5 +1,5 @@ # 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@ # so with copyparty@foo.service, %i == foo @@ -14,9 +14,9 @@ Description=copyparty file server [Service] Type=notify SyslogIdentifier=copyparty -WorkingDirectory=/var/lib/copyparty-jail +WorkingDirectory=/var/lib/copyparty-jail/srv Environment=PYTHONUNBUFFERED=x -Environment=PRTY_CONFIG=/etc/copyparty/copyparty.conf +Environment=PRTY_CONFIG=/etc/copyparty.conf ExecReload=/bin/kill -s USR1 $MAINPID # user to run as + where the TLS certificate is (if any) diff --git a/contrib/systemd/index.md b/contrib/systemd/index.md index 2e132cf98..020481410 100644 --- a/contrib/systemd/index.md +++ b/contrib/systemd/index.md @@ -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) -or `$HOME/.config/copyparty/copyparty.conf` if running as a user service +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 +* 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` diff --git a/contrib/systemd/prisonparty@.service b/contrib/systemd/prisonparty@.service index d30010aec..6e5a967f0 100644 --- a/contrib/systemd/prisonparty@.service +++ b/contrib/systemd/prisonparty@.service @@ -1,6 +1,6 @@ # this will start `/usr/bin/copyparty` # 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 # by listing them between the last `%i` and `--` @@ -19,9 +19,9 @@ Description=copyparty file server [Service] Type=notify SyslogIdentifier=prisonparty -WorkingDirectory=/var/lib/copyparty-jail +WorkingDirectory=/var/lib/copyparty-jail/srv Environment=PYTHONUNBUFFERED=x -Environment=PRTY_CONFIG=/etc/copyparty/copyparty.conf +Environment=PRTY_CONFIG=/etc/copyparty.conf ExecReload=/bin/kill -s USR1 $MAINPID # user to run as + where the TLS certificate is (if any)