From 1c9aa98b1dec84d12dc33877a9fd86b0bc297a3b Mon Sep 17 00:00:00 2001 From: Clint Masden Date: Fri, 27 Feb 2026 21:16:01 -0600 Subject: [PATCH] Initial commit: Syncthing config (exact copy from server) --- .gitignore | 1 + README.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 16 ++++++++++ 3 files changed, 92 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f733c4b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..53ebbb2 --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +# Syncthing + +File synchronization server running on box-stableapps (192.168.69.4). Managed by Coolify as a service on the localhost server. + +## Server Details + +| | | +|---|---| +| Host | 192.168.69.4 (box-stableapps) | +| Coolify service UUID | `wg4gc4k48k00s484ksswwg44` | +| Coolify project | stable-apps | +| Container | `syncthing-wg4gc4k48k00s484ksswwg44` | +| Image | syncthing/syncthing:latest (official, NOT linuxserver) | +| Web UI port | 2000 (container 8384) | +| Sync port | 22000/tcp + 22000/udp | +| Web UI | https://syncthing.clintmasden.duckdns.org | +| SSH | `ssh clint@192.168.69.4` (password: `this-bo%-180391`) | + +## Volumes + +| Host Path | Container Path | Type | Notes | +|-----------|---------------|------|-------| +| `/home/clint/containers/syncthing/config` | `/var/syncthing/config` | Local ext4 | Config, certs, keys, database index (~1.4 GB) | +| `/home/clint/archive/systems/containers/syncthing` | `/var/syncthing/data` | CIFS mount | Synced data from NAS (//192.168.69.2/archive) | + +## CIFS Mount Dependency + +The data volume requires the CIFS mount to be active. If the mount is down, Syncthing will fail to start or lose access to synced files. + +``` +# /etc/fstab entry +//192.168.69.2/archive /home/clint/archive cifs rw,credentials=/etc/samba_credentials,iocharset=utf8,vers=3.0,uid=1000,gid=1000,dir_mode=0775,file_mode=0775,_netdev 0 0 +``` + +Permissions: `uid=1000,gid=1000,file_mode=0775,dir_mode=0775` — matches clint user and allows read/write from the container. + +## Important Notes + +- Uses the **official** `syncthing/syncthing` image, NOT the linuxserver variant. The official image uses `/var/syncthing/config` and `/var/syncthing/data` paths (linuxserver uses `/config`, `/data1`, `/data2`). +- No PUID/PGID environment variables — the official image handles user mapping differently. +- Healthcheck: `curl -f http://127.0.0.1:8384/` — uses `127.0.0.1` not `localhost` (Alpine IPv6 resolves localhost to ::1). +- Traefik routing is managed by Coolify (Docker labels), not by manual traefik-custom.yml entries. + +## Deployment + +Managed by Coolify. Start/stop via Coolify UI or API: + +```bash +# Start +curl -X POST http://192.168.69.4:2010/api/v1/services/wg4gc4k48k00s484ksswwg44/start \ + -H "Authorization: Bearer " + +# Stop +curl -X POST http://192.168.69.4:2010/api/v1/services/wg4gc4k48k00s484ksswwg44/stop \ + -H "Authorization: Bearer " +``` + +## Disaster Recovery + +If Coolify is lost but data survives: + +```bash +cd /home/clint/containers/syncthing +sudo docker compose up -d +``` + +This standalone compose will start Syncthing with the same config and data paths. Traefik routing would need to be re-added manually to `traefik-custom.yml`. + +## Backup Locations + +| Data | Location | +|------|----------| +| Config backup | `/home/clint/containers/syncthing.backup/` | +| Original compose | `/home/clint/containers/syncthing.backup/docker-compose.yml.original` | +| Synced data | On NAS at `//192.168.69.2/archive` (redundant by nature) | diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4fdd474 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.9" + +services: + syncthing: + image: syncthing/syncthing:latest + container_name: syncthing + environment: + - TZ=America/Chicago + volumes: + - /home/clint/containers/syncthing/config:/var/syncthing/config + - /home/clint/archive/systems/containers/syncthing:/var/syncthing/data + ports: + - "2000:8384" # Web UI (proxied by Caddy) + - "22000:22000/tcp" # Sync + - "22000:22000/udp" # QUIC / discovery + restart: unless-stopped