https://github.com/gera2ld/rclone-server
A file server (WebDAV, SFTP) powered by rclone
https://github.com/gera2ld/rclone-server
rclone webdav-server
Last synced: 5 months ago
JSON representation
A file server (WebDAV, SFTP) powered by rclone
- Host: GitHub
- URL: https://github.com/gera2ld/rclone-server
- Owner: gera2ld
- Created: 2023-03-19T03:12:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T02:59:10.000Z (over 1 year ago)
- Last Synced: 2024-11-25T03:29:11.141Z (over 1 year ago)
- Topics: rclone, webdav-server
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rclone-server
Create a file server (WebDAV, SFTP) with `rclone serve --auth-proxy`.
See [the documentation](https://rclone.org/commands/rclone_serve/) for more details.
## Usage
Create `auth.json`:
```json
{
"user1": {
"auth": {
"pass": "login_pass"
},
"config": {
"type": "local",
"_root": "/data/files"
}
},
"user2": {
"auth": {
"pass": "login_pass",
"public_keys": ["my_public_key"]
},
"config": {
"type": "webdav",
"_root": "/Documents/files",
"url": "https://nextcloud.example.com/remote.php/dav/files/gerald/",
"vendor": "nextcloud",
"user": "gerald",
"pass": "override-pass"
}
},
"user3": {
"auth": {
"pass": "password3"
},
"config": {
"type": "s3",
"provider": "Other",
"access_key_id": "access_key_id",
"secret_access_key": "secret_access_key",
"endpoint": "https://s3.example.com",
"upload_cutoff": "50Mi",
"chunk_size": "50Mi",
"force_path_style": "true"
}
}
}
```
Note:
- `auth` can contain two fields: `pass`, which enables password login, and `public_keys`, which enables public key login. If absent, the login method is disabled.
- Once authenticated, `config` will be passed to `rclone` to create a backend. The current authentication info (`user`, `pass`, `public_key`) will also be passed to `rclone` if not provided in `config`.
Create `compose.yml`:
```yaml
services:
rclone-server:
image: ghcr.io/gera2ld/rclone-server
user: 1000:1000
restart: unless-stopped
volumes:
- ./auth.json:/etc/auth.json:ro
- ./path/to/my/files:/data/files
environment:
# See below for available variables and their defaults.
ports:
- 8080:80
- 8022:22
```
Start service with `docker compose up -d`.
## Environment Variables
| Name | Default Value |
| --------------------- | ---------------- |
| RCLONE_DIR_CACHE_TIME | `30s` |
| AUTH_CONFIG | `/etc/auth.json` |
| PORT_WEBDAV | `80` |
| PORT_SFTP | `22` |