OpenWrt procd service script and LuCI JavaScript interface for copyparty (https://github.com/9001/copyparty), a self-hosted file sharing server. Features: - procd service with UCI-driven volumes, accounts, and TLS cert - LuCI view: settings, volume/account grids, live status + start/stop - ACME TLS support via combined key+fullchain PEM (--cert flag) - Auto-respawn and reload-on-config-change via service_triggers
81 lines
2.1 KiB
Markdown
81 lines
2.1 KiB
Markdown
# luci-app-copyparty
|
|
|
|
OpenWrt procd service and LuCI interface for [copyparty](https://github.com/9001/copyparty), a self-hosted file sharing server.
|
|
|
|
## Requirements
|
|
|
|
- OpenWrt 23.05 or later (uses LuCI JavaScript views)
|
|
- `python3` package installed
|
|
- copyparty single-file bundle (e.g. `copyparty-en.py`) downloaded separately from the [copyparty releases page](https://github.com/9001/copyparty/releases)
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
# On the OpenWrt device:
|
|
sh install.sh
|
|
```
|
|
|
|
Or copy files manually to their destinations (see `install.sh` for the mapping).
|
|
|
|
The UCI config file (`/etc/config/copyparty`) is **not overwritten** if it already exists, so re-running install is safe.
|
|
|
|
## Configuration
|
|
|
|
Edit `/etc/config/copyparty`:
|
|
|
|
```
|
|
config copyparty 'config'
|
|
option enabled '1'
|
|
option port '3923'
|
|
option name 'MyNAS'
|
|
option script '/path/to/copyparty-en.py'
|
|
option usernames '0' # set to 1 to require username+password
|
|
|
|
config volume
|
|
option src '/mnt/raid/files'
|
|
option dst '/files'
|
|
option flags 'r' # r=read, w=write, m=move, d=delete, g=get
|
|
|
|
config account
|
|
option user 'alice'
|
|
option pass 'secret'
|
|
```
|
|
|
|
Or configure via **LuCI → Services → Copyparty**.
|
|
|
|
## Volume flags
|
|
|
|
| Flag | Meaning |
|
|
|---|---|
|
|
| `r` | Read / browse (anonymous) |
|
|
| `w` | Write / upload |
|
|
| `m` | Move / rename |
|
|
| `d` | Delete |
|
|
| `g` | Download as file (bypasses browser preview) |
|
|
|
|
Common combinations: `r` (read-only), `rw` (read/write), `rwmd` (full access).
|
|
|
|
See the [copyparty docs](https://github.com/9001/copyparty#accounts-and-volumes) for the full flag reference.
|
|
|
|
## Service management
|
|
|
|
```sh
|
|
/etc/init.d/copyparty enable # start on boot
|
|
/etc/init.d/copyparty start
|
|
/etc/init.d/copyparty stop
|
|
/etc/init.d/copyparty restart
|
|
```
|
|
|
|
## File layout
|
|
|
|
```
|
|
etc/
|
|
config/copyparty UCI config
|
|
init.d/copyparty procd service script
|
|
usr/share/
|
|
luci/menu.d/luci-app-copyparty.json LuCI menu entry
|
|
rpcd/acl.d/luci-app-copyparty.json rpcd ACL
|
|
www/luci-static/resources/view/
|
|
copyparty.js LuCI JavaScript view
|
|
```
|