https://github.com/funkyfuture/docker-rpi-syncthing
Docker image with Syncthing for Raspberry Pis
https://github.com/funkyfuture/docker-rpi-syncthing
Last synced: about 1 year ago
JSON representation
Docker image with Syncthing for Raspberry Pis
- Host: GitHub
- URL: https://github.com/funkyfuture/docker-rpi-syncthing
- Owner: funkyfuture
- License: unlicense
- Created: 2016-07-17T14:00:51.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-07-30T11:28:12.000Z (almost 5 years ago)
- Last Synced: 2025-03-25T10:11:15.071Z (over 1 year ago)
- Language: Shell
- Size: 29.3 KB
- Stars: 33
- Watchers: 1
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RPi-Syncthing
This is a [Docker](https://www.docker.com) image targeting
[Raspberry Pi](https://www.raspberrypi.org) hosts containing
[Syncthing](https://syncthing.net) which describes itself:
> Syncthing replaces proprietary sync and cloud services with something open,
> trustworthy and decentralized. Your data is your data alone and you deserve
> to choose where it is stored, if it is shared with some third party and how
> it's transmitted over the Internet.
[What's the current `latest` version?](https://github.com/funkyfuture/docker-rpi-syncthing/blob/master/Dockerfile#L8)
Contributions are welcome.
## Pull
docker pull funkyfuture/rpi-syncthing
## Build
git clone https://github.com/funkyfuture/docker-rpi-syncthing
make -C docker-rpi-syncthing
## Run
Here's an example configuration that is suited to manage an instance with
[`docker-compose`](https://docs.docker.com/compose/):
```yaml
version: '2'
services:
client:
image: funkyfuture/rpi-syncthing
restart: unless-stopped
ports:
- "8384:8384"
- "22000:22000"
- "21027:21027/udp"
volumes:
- ./config:/syncthing/config
- ./data:/syncthing/data
environment:
- GUI_USERNAME=ziggy
- GUI_PASSWORD_PLAIN=stardust
```
For those eager to quickly test this image:
docker run --rm --network=host funkyfuture/rpi-syncthing
## Configuration
The numeric user and group id of the user running the client are set with the
environment variables `UID` and `GID`. Both default to `1000`. This affects the
ownership of the stored data in `/syncthing` and `$CONFIG_DIR`.
You can pass these environment variables to configure the client:
- `CONFIG_DIR` (default: `/syncthing/config`)
- `DEBUG` can be set to `on`
- `GUI_ADDRESS` (default: `[::]:8384`)
- `GUI_APIKEY`
- `GUI_ENABLED` (default: `true`)
- `GUI_PASSWORD_PLAIN`
- `GUI_PASSWORD_BCRYPT` (takes precedence over `..._PLAIN`)
- `GUI_TLS` (default: `false`)
- `GUI_USERNAME`
## Further customization
To further customize the configuration you can provide your own
`$CONFIG_DIR/config.xml` to the container. Note that the configuration values
resp. their defaults above will be applied on it (but this is going to be more
sensible at some point).
You may also add a `/pre-launch.sh` that will be run (by `source`ing) after
the configuration values have been applied. For convenient xml-manipulation
you can use `xmlstarlet`, see `start.sh` for examples and a wrapper function.
The user context at this point is still `root`, the designated user context
to run `syncthing` is available as `$UID`, `$GID`, `$USER_NAME` and
`$GROUP_NAME`.
## Resources
###### Docker Hub repository
https://registry.hub.docker.com/u/funkyfuture/rpi-syncthing/
###### Source repository
https://github.com/funkyfuture/docker-rpi-syncthing
###### Syncthing configuration docs
https://docs.syncthing.net/users/config.html
###### xmlstarlet documentation
http://xmlstar.sourceforge.net/doc/UG/