2024-10-17 09:29:18 My ID: 2OBBME6-JZD55HF-F5KV4OV-MOQ2PWJ-LD3ECEL-RCHLCNI-JP6GG4W-VIUOUAH
2024-10-17 09:29:18 Hashing performance is 1244.73 MB/s
2024-10-17 09:29:18 Overall send rate is unlimited, receive rate is unlimited
2024-10-17 09:29:18 Ready to synchronize "test" (ocrts-xbrym) (sendreceive)
2024-10-17 09:29:18 Using discovery mechanism: global discovery server https://discovery-lookup.syncthing.net/v2/?noannounce
2024-10-17 09:29:18 Using discovery mechanism: global discovery server https://discovery-announce-v4.syncthing.net/v2/?nolookup
2024-10-17 09:29:18 Using discovery mechanism: global discovery server https://discovery-announce-v6.syncthing.net/v2/?nolookup
2024-10-17 09:29:18 Using discovery mechanism: IPv4 local broadcast discovery on port 21027
2024-10-17 09:29:18 Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
2024-10-17 09:29:18 GUI and API listening on [::]:8384
2024-10-17 09:29:18 ...
2024-10-17 09:29:18 Access the GUI via the following URL: http://127.0.0.1:8384/
2024-10-17 09:29:18 My name is "my-syncthing"
2024-10-17 09:29:18 Device Z24PXB4-UC3Z63Q-V6UBTCK-DTVFURU-RMJTWJ5-ME3VCKM-74FYCQN-OUVE7QU is "24" at [dynamic]
2024-10-17 09:29:18 Syncthing should not run as a privileged or system user. Please consider using a normal user account.
2024-10-17 09:29:18 TCP listener ([::]:22000) starting
2024-10-17 09:29:18 Completed initial scan of sendreceive folder "test" (ocrts-xbrym)
2024-10-17 09:29:18 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
2024-10-17 09:29:18 QUIC listener ([::]:22000) starting
2024-10-17 09:29:19 Established secure connection to Z24PXB4 at 192.168.1.23:22000-192.168.1.24:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10-5VV6DQENME5HEMMNTF4LCDD18M
2024-10-17 09:29:19 Device Z24PXB4 client is "syncthing v1.28.0" named "my-syncthing" at 192.168.1.23:22000-192.168.1.24:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10-5VV6DQENME5HEMMNTF4LCDD18M
2024-10-17 09:29:28 quic://0.0.0.0:22000 detected NAT type: Symmetric NAT
2024-10-17 09:29:49 New external port opened: external TCP address(es) [117.133.82.169:49600] to local address [::]:22000.
2024-10-17 09:29:49 New external port opened: external TCP address(es) [117.133.82.169:62138] to local address [::]:22000.
2024-10-17 09:29:49 Detected 2 NAT services
2024-10-17 09:31:26 Joined relay relay://153.34.223.26:22067
2024-10-17 09:59:20 Sent usage report (version 3)
Between the topic/subject of your first post and this one, it’s a permissions problem.
You have Syncthing running as a root user inside a Docker container that you probably want it to access files outside of the container, so you will have to sort out the required permissions between your Docker container, the host running Docker and whatever storage is being used.
Since there’s no information about what operating systems are in use, how the storage is configured, and/or any other details other than a snippet of the runtime output, there’s not much else to sugguest other than this: https://docs.docker.com/storage/volumes/
(The use of the root user has already been defined in the docker-compose.yml file.)
.
Note that users inside a Docker/OCI container are mapped to user ID (UID) and group ID (GID) on the host side, most often starting at an offset of 100000. So for example, user 1234:5678
inside the container would be mapped to 101234:105678
outside the container.
So, what it means is that the root
user inside the container really has the UID:GID 100000:100000
outside of the container, which is a normal user without superuser privileges.
Other than user credentials for PostgreSQL, I don’t see anything related to Syncthing and/or setting the UID:GID for the Syncthing user.
version: “3”
services:
syncthing:
image: syncthing/syncthing:1.28.0
container_name: syncthing
hostname: my-syncthing
environment:
- PUID=0
- PGID=0
- STGUIADDRESS=0.0.0.0:8384
volumes:
- /home/idrl/st-sync:/var/syncthing
- /home/idrl/data:/var/nocodb_data
ports:
- 8384:8384 # Web UI
- 22000:22000/tcp # TCP file transfers
- 22000:22000/udp # QUIC file transfers
- 21027:21027/udp # Receive local discovery broadcasts
restart: unless-stopped
healthcheck:
test: [‘CMD’,‘true’]
#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
network_mode: “host”
Although the environment variables above cause Syncthing to run as the root
user inside the Docker container – outside the container on the host, the effective UID:GID will be 100000:100000
(unless you changed system offsets in /etc/subuid
and /etc/subgid
).
/home/idrl/st-sync
and /home/idrl/data
need to either be owned by 100000:100000
or whoever ultimately is actually running Syncthing.
On a related note,
You are going to encounter data corruption unless you shut down the NocoDB container before syncing, because according to the example Docker compose file you posted earlier (then deleted), you’ve got a PostgreSQL database. Copying a live database file rarely ever works well.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.