diff --git a/docker compositions/syncthing/docker-compose.podman.volumes.yml b/docker compositions/syncthing/docker-compose.podman.volumes.yml new file mode 100644 index 0000000..941d3d2 --- /dev/null +++ b/docker compositions/syncthing/docker-compose.podman.volumes.yml @@ -0,0 +1,25 @@ +--- +# Refer https://github.com/syncthing/syncthing/blob/main/README-Docker.md +volumes: + config: + data: +services: + syncthing: + image: syncthing/syncthing:2.0.14 + container_name: syncthing + hostname: ${HOSTNAME} + environment: + - PUID=0 # due to podman's rootless uid mapping + - PGID=0 # due to podman's rootless gid mapping + - STGUIADDRESS=0.0.0.0:8384 + volumes: + - config:/var/syncthing/config:z + - data:/var/syncthing/data + # - ${HOME}/media:/var/syncthing/media + network_mode: host + restart: unless-stopped + healthcheck: + test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1 + interval: 1m + timeout: 10s + retries: 3 diff --git a/docker compositions/syncthing/docker-compose.podman.yml b/docker compositions/syncthing/docker-compose.podman.yml index e8ad5fe..ecd1ec1 100644 --- a/docker compositions/syncthing/docker-compose.podman.yml +++ b/docker compositions/syncthing/docker-compose.podman.yml @@ -2,7 +2,7 @@ # Refer https://github.com/syncthing/syncthing/blob/main/README-Docker.md services: syncthing: - image: syncthing/syncthing:2.0.12 + image: syncthing/syncthing:2.0.14 container_name: syncthing hostname: ${HOSTNAME} environment: diff --git a/knowledge base/podman.md b/knowledge base/podman.md index 63609b6..22cd09f 100644 --- a/knowledge base/podman.md +++ b/knowledge base/podman.md @@ -20,7 +20,7 @@ Intended to be a drop-in replacement for [Docker]. ```sh # Install. -apt install 'podman' 'podman-compose' +apt install 'podman' 'podman-compose' 'uidmap' dnf install 'podman' pacman -S 'podman' zypper install 'podman' diff --git a/knowledge base/syncthing.md b/knowledge base/syncthing.md index 6ba6b3d..723b005 100644 --- a/knowledge base/syncthing.md +++ b/knowledge base/syncthing.md @@ -1,9 +1,9 @@ # Syncthing -## Table of contents +Synchronizes files continuously between two or more computers. 1. [TL;DR](#tldr) -1. [Configuration](#configuration) +1. [Ignore files](#ignore-files) 1. [Troubleshooting](#troubleshooting) 1. [I forgot the password](#i-forgot-the-password) 1. [Further readings](#further-readings) @@ -11,19 +11,10 @@ ## TL;DR -```sh -# Installation. -sudo apt install 'syncthing' -brew install --cask 'syncthing' -sudo zypper install 'syncthing' +
+ Setup -# Startup. -syncthing -syncthing --gui-address '0.0.0.0:8384' --no-default-folder -systemctl --user start 'syncthing.service' -``` - -## Configuration +Configuration files: | OS | Path | | -------- | -------------------------------------------------------------- | @@ -31,11 +22,36 @@ systemctl --user start 'syncthing.service' | Mac OS X | `$HOME/Library/Application Support/Syncthing` | | Windows | `%LOCALAPPDATA%\Syncthing` | +```sh +# Installation. +sudo apt install 'syncthing' +brew install --cask 'syncthing' +sudo zypper install 'syncthing' +``` + +
+ +
+ Usage + +```sh +# Startup. +syncthing +syncthing --gui-address '0.0.0.0:8384' --no-default-folder +systemctl --user start 'syncthing.service' +``` + +
+ +## Ignore files + +Refer to [Documentation / Ignoring Files]. + ## Troubleshooting ### I forgot the password -Remove the entry under `gui.password` in the [configuration file][configuration]: +Remove the entry under `gui.password` in the [configuration file][documentation / syncthing configuration]: ```sh # With XMLStarlet @@ -47,25 +63,25 @@ Then enter the settings on the host and set a new password. ## Further readings - [Website] +- [Codebase] ### Sources -- [The GUI listen address] -- [File versioning] -- [Configuration] +- [Documentation] -[configuration]: #configuration - + + -[configuration]: https://docs.syncthing.net/users/config.html -[file versioning]: https://docs.syncthing.net/users/versioning.html -[the gui listen address]: https://docs.syncthing.net/users/guilisten.html -[website]: https://syncthing.net/ +[Codebase]: https://github.com/syncthing/syncthing +[Documentation / Ignoring Files]: https://docs.syncthing.net/users/ignoring +[Documentation / Syncthing Configuration]: https://docs.syncthing.net/users/config.html +[Documentation]: https://docs.syncthing.net +[Website]: https://syncthing.net/ - -[further readings]: #further-readings +