Giter Club home page Giter Club logo

docker-syncthing's Introduction

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build LSIO CI

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.

syncthing

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/syncthing:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf

Application Setup

**Note: ** The Syncthing devs highly suggest setting a password for this container as it listens on 0.0.0.0. To do this go to Actions -> Settings -> set user/password for the webUI.

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

docker-compose (recommended, click here for more info)

---
services:
  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    hostname: syncthing #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /path/to/syncthing/config:/config
      - /path/to/data1:/data1
      - /path/to/data2:/data2
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped
docker run -d \
  --name=syncthing \
  --hostname=syncthing `#optional` \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -p 8384:8384 \
  -p 22000:22000/tcp \
  -p 22000:22000/udp \
  -p 21027:21027/udp \
  -v /path/to/syncthing/config:/config \
  -v /path/to/data1:/data1 \
  -v /path/to/data2:/data2 \
  --restart unless-stopped \
  lscr.io/linuxserver/syncthing:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
--hostname= Optionally the hostname can be defined.
-p 8384 Application WebUI
-p 22000/tcp Listening port (TCP)
-p 22000/udp Listening port (UDP)
-p 21027/udp Protocol discovery
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=Etc/UTC specify a timezone to use, see this list.
-v /config Configuration files.
-v /data1 Data1
-v /data2 Data2

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

User / Group Identifiers

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:

id your_user

Example output:

uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:

    docker exec -it syncthing /bin/bash
  • To monitor the logs of the container in realtime:

    docker logs -f syncthing
  • Container version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' syncthing
  • Image version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/syncthing:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      docker-compose pull
    • Single image:

      docker-compose pull syncthing
  • Update containers:

    • All containers:

      docker-compose up -d
    • Single container:

      docker-compose up -d syncthing
  • You can also remove the old dangling images:

    docker image prune

Via Docker Run

  • Update the image:

    docker pull lscr.io/linuxserver/syncthing:latest
  • Stop the running container:

    docker stop syncthing
  • Delete the container:

    docker rm syncthing
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    docker image prune

Image Update Notifications - Diun (Docker Image Update Notifier)

tip: We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-syncthing.git
cd docker-syncthing
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/syncthing:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 06.06.24: - Rebase to Alpine 3.20.
  • 05.03.24: - Rebase to Alpine 3.19.
  • 05.09.23: - Rebase to Alpine 3.18.
  • 01.07.23: - Deprecate armhf. As announced here
  • 13.02.23: - Rebase to Alpine 3.17, migrate to s6v3.
  • 17.08.22: - Build on alpine 3.16 for go 1.18).
  • 03.05.22: - Rebase to alpine 3.15 (builds on edge for go 1.18).
  • 05.10.21: - Rebase to alpine 3.14.
  • 12.05.21: - Remove sysctl parameter again
  • 03.05.21: - Raise maximum UDP buffer size.
  • 03.05.21: - Add port mapping for 22000/udp.
  • 29.01.21: - Deprecate UMASK_SET in favor of UMASK in baseimage, see above for more information.
  • 23.01.21: - Rebasing to alpine 3.13.
  • 15.09.20: - Use go from alpine edge repo to compile. Remove duplicate UMASK env var. Add hostname setting.
  • 01.06.20: - Rebasing to alpine 3.12.
  • 19.12.19: - Rebasing to alpine 3.11.
  • 28.06.19: - Rebasing to alpine 3.10.
  • 23.03.19: - Switching to new Base images, shift to arm32v7 tag.
  • 05.03.19: - Update Build process for v1.1.0 release.
  • 22.02.19: - Rebasing to alpine 3.9.
  • 16.01.19: - Add pipeline logic and multi arch.
  • 30.07.18: - Rebase to alpine 3.8 and use buildstage.
  • 13.12.17: - Rebase to alpine 3.7.
  • 25.10.17: - Add env for manual setting of umask.
  • 29.07.17: - Simplify build structure as symlinks failing on > 0.14.32
  • 28.05.17: - Rebase to alpine 3.6.
  • 08.02.17: - Rebase to alpine 3.5.
  • 01.11.16: - Switch to compiling latest version from git source.
  • 14.10.16: - Add version layer information.
  • 30.09.16: - Fix umask.
  • 09.09.16: - Add layer badges to README.
  • 28.08.16: - Add badges to README.
  • 11.08.16: - Rebase to alpine linux.
  • 18.12.15: - Initial testing / release (IronicBadger)
  • 24.09.15: - Inital dev complete (Lonix)

docker-syncthing's People

Contributors

adhawkins avatar aptalca avatar bt90 avatar chbmb avatar ironicbadger avatar j0nnymoe avatar linuxserver-ci avatar lonix avatar nemchik avatar omgimalexis avatar otbutz avatar roxedus avatar sparklyballs avatar thelamer avatar thespad avatar tobbenb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-syncthing's Issues

PUID doesn't seem to be respected

Running on Debian, 4.9.0-3-amd64.
Docker version: 17.06.1-ce
My docker is managed with docker-compose with the config shown below.

When I define PGID & PUID in environment variables, PGUI appears to be respected, as files created have the group I asked it to use. However, PUID does not appear to be respected, and are being created with the same ID as PGID.

In the setup below, files are being created in my /home/syncthing directory with group:998 and User:998, not the expected User:999

Relevant section of docker-compose:

  syncthing:
    image: linuxserver/syncthing
    container_name: syncthing
    restart: always
    ports:
      - "22000:22000"
      - "21027:21027/udp"
    environment:
      - PUID=999
      - PGID=998
    volumes:
      - /mnt/docker/syncthing:/config
      - /home/syncthing:/mnt/syncthing

Any thoughts? Your image has been running flawlessly otherwise!

Syncthing does not create the net.core.rmem_max: open /proc/sys/net/core/rmem_max file on startup

linuxserver.io


Expected Behavior

Start syncthing through docker-compose which should spin up it's internal (I believe Ubuntu) instance and run.

Current Behavior

Syncthing does not create the net.core.rmem_max: open /proc/sys/net/core/rmem_max file on startup which causes it to fail on install.

Steps to Reproduce

  1. Create docker-compose file with the following:
---
version: "2.1"
services:
  syncthing:
    image: ghcr.io/linuxserver/syncthing
    container_name: syncthing
    hostname: syncthing #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /config:/config
      - /data1:/data1
      - /data2:/data2
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    sysctls:
      - net.core.rmem_max=2097152
    restart: unless-stopped
  1. Attempt to start container with docker-compose up
  2. Container will fail to start with the following errors:

docker-compose up
Removing syncthing
Recreating c396deb4b344_syncthing ... error

ERROR: for c396deb4b344_syncthing  Cannot start service syncthing: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key net.core.rmem_max: open /proc/sys/net/core/rmem_max: no such file or directory: unknown

ERROR: for syncthing  Cannot start service syncthing: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key net.core.rmem_max: open /proc/sys/net/core/rmem_max: no such file or directory: unknown

Environment

OS: Ubuntu 20.10
CPU architecture: x86_64
How docker service was installed:

It's been ages since I did the install of docker and it's working properly for many other projects, however I believe it was done through the apt install.

Command used to create docker container (run/create/compose/screenshot)

---
version: "2.1"
services:
  syncthing:
    image: ghcr.io/linuxserver/syncthing
    container_name: syncthing
    hostname: syncthing #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /config:/config
      - /data1:/data1
      - /data2:/data2
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    sysctls:
      - net.core.rmem_max=2097152
    restart: unless-stopped

Docker logs


docker-compose up
Removing syncthing
Recreating c396deb4b344_syncthing ... error

ERROR: for c396deb4b344_syncthing  Cannot start service syncthing: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key net.core.rmem_max: open /proc/sys/net/core/rmem_max: no such file or directory: unknown

ERROR: for syncthing  Cannot start service syncthing: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key net.core.rmem_max: open /proc/sys/net/core/rmem_max: no such file or directory: unknown

This is the only container this has happened with, all of my other containers work fine, including many by Linuxserver.io. It definitely seems to be a bug with this container specifically. I did ask on the discord and got no response from anyone on the issue.

syncthing volumes - Failed to create folder root directory mkdir /data1: permission denied

linuxserver.io

Syncthing is not able to use the directories ( /data1 and /data2 ) specified in docker compose. Seems to be a permission problem

If you enter into the web ui and add a folder to share specifying /data1/new_shared_directory


version: "2.1"
services:
syncthing:
image: lscr.io/linuxserver/syncthing
container_name: syncthing
hostname: syncthing #optional
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- /path/to/appdata/config:/config
- /path/to/data1:/data1
- /path/to/data2:/data2
ports:
- 8384:8384
- 22000:22000/tcp
- 22000:22000/udp
- 21027:21027/udp
restart: unless-stopped


Expected Behavior

It should be able to share the new folder

Current Behavior

It says;

Failed to create folder root directory mkdir /data1: permission denied

Environment

OS: - Linux raspberrypi 5.10.103-v8+ #1530 SMP PREEMPT Tue Mar 8 13:06:35 GMT 2022 aarch64 GNU/Linux
CPU architecture: aarch64
How docker service was installed:
From official repo.

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d --remove-orphans

Docker logs

syncthing | [NVEE3] 13:23:15 INFO: Detected 1 NAT service
syncthing | [NVEE3] 13:23:21 INFO: quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
syncthing | [NVEE3] 13:23:21 INFO: quic://0.0.0.0:22000 resolved external address quic://94.73.44.27:39111 (via stun.syncthing.net:3478)
syncthing | [NVEE3] 13:23:42 INFO: Joined relay relay://161.97.133.225:22067
syncthing | [NVEE3] 13:24:35 INFO: Adding folder "xxx_data1" (wk5ke-q4xpg)
syncthing | [NVEE3] 13:24:35 INFO: No stored folder metadata for "wk5ke-q4xpg"; recalculating
syncthing | [NVEE3] 13:24:35 WARNING: Failed to create folder root directory mkdir /data1: permission denied
syncthing | [NVEE3] 13:24:35 INFO: Ready to synchronize "xxx_data1" (wk5ke-q4xpg) (sendreceive)
syncthing | [NVEE3] 13:24:35 INFO: Failed initial scan of sendreceive folder "xxx_data1" (wk5ke-q4xpg)
syncthing | [NVEE3] 13:24:35 WARNING: Error on folder "xxx_data1" (wk5ke-q4xpg): folder path missing

Doesn't update Syncthing to 0.14.47

I'm unable to update my Syncthing from 0.14.46 to 0.14.47 with this package. I've deleted the container and pull the latest image but it is still on 0.14.46.

Host OS: Debian 9, 4.14 Kernel
Docker Version: 18.03.1-ce
Networktype: Bridge (21027/UDP, 22000/TCP, 8384/TCP)
Volumes:

  • Sync folder is a bind
  • Config is a docker volume

I've tried to update the container via Portainer. It'll delete the container, pull latest image and re-create the container with the same parameters.

image

Here is the first log after re-creating the container:

[JFEL2] 12:22:55 INFO: Connected to myself (xxxx) at 172.17.0.7:55058-xxxx:22000/tcp-client - should not happen,[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[JFEL2] 12:22:45 INFO: syncthing v0.14.46 "Dysprosium Dragonfly" (go1.9.4 linux-amd64) root@b4423ea259da 2018-04-27 22:06:13 UTC [noupgrade],
[s6-init] ensuring user provided files have correct perms...exited 0.,
https://www.linuxserver.io/donations/,
[fix-attrs.d] applying ownership & permissions fixes...,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 10-adduser: executing... ,
[fix-attrs.d] done.,
,
-------------------------------------,
         | | / __| | |  /  \ ,
         | | \__ \ | | | () |,
         |_| |___/ |_|  \__/,
         | |  ___   _    __,
          _         (),
We gratefully accept donations at:,
Brought to you by linuxserver.io,
GID/UID,
User uid:    1000,
User gid:    100,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
[cont-init.d] 10-adduser: exited 0.,
[JFEL2] 12:22:45 INFO: My ID: xxxx
[JFEL2] 12:22:46 INFO: Single thread SHA256 performance is 172 MB/s using minio/sha256-simd (149 MB/s using crypto/sha256).,
[JFEL2] 12:22:46 INFO: Hashing performance with weak hash is 143.88 MB/s,
[JFEL2] 12:22:47 INFO: Hashing performance without weak hash is 169.59 MB/s,
[JFEL2] 12:22:47 INFO: Weak hash enabled, as it has an acceptable performance impact.,
[JFEL2] 12:22:47 INFO: Ready to synchronize xxxx (readwrite)

Hope you're able to reproduce.

docker-syncthing should not build a volume for /sync by default

Expected Behavior

This image should not build a /sync volume. Instead, users should mount the folders they like using existing mechanisms.

Current Behavior

This image, when deployed, will trigger a volume creation. This is not ideal in docker-compose environments where volumes may already be managed for specific needs. This Dockerfile should not be creating a volume for /sync. It's generated from:

VOLUME /config /sync

If this /sync is removed (such as a forked Dockerfile as I did locally), this "issue" goes away.

Steps to Reproduce

  1. Pull syncthing:v1.3.0-ls19 and use the image.
  2. Notice a new volume is created.
  3. Check Dockerfile source to figure out why, find out why.

Environment

OS: N/A
CPU architecture: N/A
How docker service was installed: portainer normally, but manual testing for issue reporting. Applies to both.

Command used to create docker container (run/create/compose/screenshot)

Compose details:

version: "2"
services:
  syncthing:
    image: linuxserver/syncthing
    container_name: syncthing
    environment:
      - TZ=UTC
      - PUID=1000
      - PGID=1000
      - UMASK_SET=022
    ports:
      - 8384:8384
      - 22000:22000
      - 21027:21027/udp
    volumes:
      - /path/to/syncthing/config:/config
      - /path/to/syncthing/data:/syncthing/data
    restart: unless-stopped

Filesystem Watcher Errors

I am using this docker image to use syncthing.

Installation went fine. But, I keep getting the following error:
Document OMV failed to setup inotify handler. Please increase inotify limits, see https://docs.syncthing.net/users/faq.html#inotify-limits

I used the command on the page and modified it to be used with docker (docker doesn't recommend using sudo). So, the modified command looked like this:
$ echo "fs.inotify.max_user_watches=204800" | tee -a /etc/sysctl.conf
which output as :
fs.inotify.max_user_watches=204800

Looks like command got executed but the error remains. I restarted Syncthing from GUI and even restarted the container, but the error still remains.

However, the error goes away when the command used in normal Syncthing setup (without docker).

error

failed to setup inotify handler. Please increase inotify limits

https://DOMAIN:8384/rest/system/upgrade Failed to load resource: the server responded with a status of 500 (Internal Server Error)

When loading the page I get the above error, I also get the following in error logs

WARNING: Decoding posted config: read tcp 172.17.0.9:8384->IP:58684: i/o timeout

Latest version of the docker image

I also get a lot of INFO: Connected to myself (DDYUFAJ-SL7A5ZF-M23J3SP-NL3TDZV-RC5UXO5-PVITIMD-HPX73F4-CWPCSQV) - should not happen

docker create --name=syncthing -v /storage/folder/config:/config -v /storage/folder/data:/data -e PGID=1001 -e PUID=1001 -p 8384:8384 -p 22000:22000 -p 21027:21027/udp linuxserver/syncthing

How to allow local broadcasting and discovery for more than one instance on the same host?

linuxserver.io


Current Behavior

Syncthing uses broadcasts for local discovery. When run in a container as suggested by LSIO the local discovery does not work and a relay server must be used for local connections involving such a syncthing instance. This is very slow and inefficient on local networks.

Desired Behavior

It would be great if this was documented/explained and an alternative setup suggested (such that the local discovery works and local devices / syncthing instances can see and communicate with the LSIO dockerised syncthing instances).

Alternatives Considered

Merely using network_mode=host is not enough if one needs to run more than one Syncthing instance. GUI address is hardcoded in the container run script. It would be useful if it could be changed like it is possible in the official Syncthing docker image (via ENV variable STGUIADDRESS that is directly supported by Syncthing app).

Additional Binaries and Image Size

Why is the syncthing binary being installed here by itself, followed by the other compiled binaries in a loop?

install -D -m755 \
$SYNC_BUILD/bin/syncthing \
/tmp/bin/syncthing && \
for i in $(ls $SYNC_BUILD/bin); \
do if ! [ "$i" = "syncthing" ]; \
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
fi; \
done

The official syncthing release is around 7.5 / 15.6 MB large whereas this image weights 49.7 MB / 162 MB (each download / extracted size). Of course 6.9 MB come from lsiobase/alpine.arm64, but still: is it necessary to pack stbench, stcli, stcompdirs, stdisco, stdiscosrv, stevents, stfileinfo, stfinddevice, stfindignored, stgenfiles, stindex, strelaypoolsrv, strelaysrv, stsigtool, stvanity, stwatchfile, testutil, uraggregate, ursrv into the package too?

[BUG] I Dont have permission to the only folder I gave it permission to

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Failed to create folder root directory mkdir /Server2: permission denied

Expected Behavior

Make shared Folder

Steps To Reproduce

make a shared folder in Server2

Environment

- OS: Linux Debian 64x
- How docker service was installed: OMV 6

CPU architecture

x86-64

Docker creation

---
version: "2.1"
services:
  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=100
      - TZ=America/Los_Angeles
    volumes:
      - /Docker/syncthing:/config
      - /Server2:/data1
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

Container logs

[4PFT4] 2023/07/23 17:10:57 INFO: No stored folder metadata for "default"; recalculating
[4PFT4] 2023/07/23 17:10:57 INFO: Using discovery mechanism: global discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[4PFT4] 2023/07/23 17:10:57 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[4PFT4] 2023/07/23 17:10:57 INFO: Using discovery mechanism: global discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[4PFT4] 2023/07/23 17:10:57 INFO: Using discovery mechanism: global discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[4PFT4] 2023/07/23 17:10:57 INFO: Loading HTTPS certificate: open /config/https-cert.pem: no such file or directory
[4PFT4] 2023/07/23 17:10:57 INFO: Creating new HTTPS certificate
[4PFT4] 2023/07/23 17:10:57 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
2023/07/23 17:10:57 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.
[4PFT4] 2023/07/23 17:10:57 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[4PFT4] 2023/07/23 17:10:57 INFO: TCP listener ([::]:22000) starting
[4PFT4] 2023/07/23 17:10:57 INFO: QUIC listener ([::]:22000) starting
[4PFT4] 2023/07/23 17:10:57 INFO: Ready to synchronize "Default Folder" (default) (sendreceive)
[4PFT4] 2023/07/23 17:10:57 INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
[4PFT4] 2023/07/23 17:10:57 INFO: GUI and API listening on [::]:8384
[4PFT4] 2023/07/23 17:10:57 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[4PFT4] 2023/07/23 17:10:57 INFO: My name is "520fc7acae36"
[ls.io-init] done.
[4PFT4] 2023/07/23 17:11:11 INFO: Detected 1 NAT service
[4PFT4] 2023/07/23 17:11:17 INFO: quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
[4PFT4] 2023/07/23 17:11:17 INFO: quic://0.0.0.0:22000 resolved external address quic://50.158.237.219:22000 (via stun.syncthing.net:3478)
[4PFT4] 2023/07/23 17:11:34 INFO: Sent usage report (version 3)
[4PFT4] 2023/07/23 17:12:05 INFO: Joined relay relay://96.43.94.218:22067
[4PFT4] 2023/07/23 17:12:31 INFO: GUI and API listening on [::]:8384
[4PFT4] 2023/07/23 17:12:31 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[4PFT4] 2023/07/23 17:15:25 INFO: Adding folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:15:25 INFO: No stored folder metadata for "rxxpa-swl26"; recalculating
[4PFT4] 2023/07/23 17:15:25 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:15:25 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:15:25 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:15:25 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:17:12 INFO: Paused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:17:14 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:17:14 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:17:14 INFO: Unpaused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:17:14 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:17:14 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:19:09 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:19:09 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:09 INFO: Restarted folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:09 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:19:09 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:19:12 INFO: Paused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:13 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:19:13 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:13 INFO: Unpaused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:13 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:19:13 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:19:59 INFO: Paused folder "Default Folder" (default) (sendreceive)
[4PFT4] 2023/07/23 17:19:59 INFO: Paused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:59 INFO: Ready to synchronize "Default Folder" (default) (sendreceive)
[4PFT4] 2023/07/23 17:19:59 INFO: Unpaused folder "Default Folder" (default) (sendreceive)
[4PFT4] 2023/07/23 17:19:59 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:19:59 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:59 INFO: Unpaused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:19:59 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:19:59 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:19:59 INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
[4PFT4] 2023/07/23 17:22:06 INFO: Adding folder hp2vi-dizl3
[4PFT4] 2023/07/23 17:22:06 INFO: No stored folder metadata for "hp2vi-dizl3"; recalculating
[4PFT4] 2023/07/23 17:22:06 WARNING: Failed to create folder root directory mkdir /mnt/syncthing_data: permission denied
[4PFT4] 2023/07/23 17:22:06 INFO: Ready to synchronize hp2vi-dizl3 (sendreceive)
[4PFT4] 2023/07/23 17:22:06 INFO: Failed initial scan of sendreceive folder hp2vi-dizl3
[4PFT4] 2023/07/23 17:22:06 WARNING: Error on folder hp2vi-dizl3: folder path missing
[4PFT4] 2023/07/23 17:22:13 INFO: Paused folder hp2vi-dizl3 (sendreceive)
[4PFT4] 2023/07/23 17:22:14 WARNING: Failed to create folder root directory mkdir /mnt/syncthing_data: permission denied
[4PFT4] 2023/07/23 17:22:14 INFO: Ready to synchronize hp2vi-dizl3 (sendreceive)
[4PFT4] 2023/07/23 17:22:14 INFO: Unpaused folder hp2vi-dizl3 (sendreceive)
[4PFT4] 2023/07/23 17:22:14 INFO: Failed initial scan of sendreceive folder hp2vi-dizl3
[4PFT4] 2023/07/23 17:22:14 WARNING: Error on folder hp2vi-dizl3: folder path missing
[4PFT4] 2023/07/23 17:24:14 INFO: Paused folder hp2vi-dizl3 (sendreceive)
[4PFT4] 2023/07/23 17:24:16 INFO: Paused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:24:17 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:24:17 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:24:17 INFO: Unpaused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:24:17 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:24:17 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:30:17 INFO: Paused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:30:18 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:30:18 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:30:18 INFO: Unpaused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:30:18 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:30:18 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:32:38 INFO: Paused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:32:39 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:32:39 INFO: Ready to synchronize "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:32:39 INFO: Unpaused folder "Minecraft Backups" (rxxpa-swl26) (sendreceive)
[4PFT4] 2023/07/23 17:32:39 INFO: Failed initial scan of sendreceive folder "Minecraft Backups" (rxxpa-swl26)
[4PFT4] 2023/07/23 17:32:39 WARNING: Error on folder "Minecraft Backups" (rxxpa-swl26): folder path missing
[4PFT4] 2023/07/23 17:37:37 INFO: Adding folder "what" (oakxc-hdmcg)
[4PFT4] 2023/07/23 17:37:37 INFO: No stored folder metadata for "oakxc-hdmcg"; recalculating
[4PFT4] 2023/07/23 17:37:37 WARNING: Failed to create folder root directory mkdir /Server2: permission denied
[4PFT4] 2023/07/23 17:37:37 INFO: Ready to synchronize "what" (oakxc-hdmcg) (sendreceive)
[4PFT4] 2023/07/23 17:37:37 INFO: Failed initial scan of sendreceive folder "what" (oakxc-hdmcg)
[4PFT4] 2023/07/23 17:37:37 WARNING: Error on folder "what" (oakxc-hdmcg): folder path missing
[4PFT4] 2023/07/23 17:38:27 INFO: Adding folder "whoi" (7h6jx-feefp)
[4PFT4] 2023/07/23 17:38:27 INFO: No stored folder metadata for "7h6jx-feefp"; recalculating
[4PFT4] 2023/07/23 17:38:27 WARNING: Some protected files may be overwritten and cause issues. See https://docs.syncthing.net/users/config.html#syncing-configuration-files for more information. The at risk files are: /config/index-v0.14.0.db, /config/config.xml, /config/cert.pem, /config/key.pem
[4PFT4] 2023/07/23 17:38:27 INFO: Ready to synchronize "whoi" (7h6jx-feefp) (sendreceive)
[4PFT4] 2023/07/23 17:38:27 INFO: Completed initial scan of sendreceive folder "whoi" (7h6jx-feefp)

UMASK environment variable appears not to work

linuxserver.io


Expected Behavior

I've set -e UMASK=000 when starting the container, which I expect the umask to be set 0000

Current Behavior

The umask is not being set in the container. Instead, I'm seeing the default umask of 0022

Steps to Reproduce

  1. Set -e UMASK=000 when starting docker (see below run command)
  2. Open the console, run the umask command to see the current umask
  3. Additionally, files are being created by the syncthing server with the 0022 mask, instead of the 0000 mask.

Environment

OS: Unraid
CPU architecture: x86_64
How docker service was installed: official repo

Command used to create docker container (run/create/compose/screenshot)

docker run
  -d
  --name='syncthing'
  --net='br0.60'
  --ip='10.4.60.210'
  -e TZ="America/Los_Angeles"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="host"
  -e HOST_CONTAINERNAME="syncthing"
  -e 'TCP_PORT_8384'='8384'
  -e 'TCP_PORT_22000'='22000'
  -e 'UDP_PORT_22000'='22000'
  -e 'UDP_PORT_21027'='21027'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='000'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8384]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/syncthing-logo.png'
  -v '/mnt/user/documents/':'/share/documents/':'rw'
  -v '/mnt/user/appdata/syncthing':'/config':'rw' 'lscr.io/linuxserver/syncthing'

Docker logs

[custom-init] No custom services found, skipping...
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/01-migrations
[migrations] started
[migrations] no migrations found
cont-init: info: /etc/cont-init.d/01-migrations exited 0
cont-init: info: running /etc/cont-init.d/10-adduser

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    99
User gid:    100
-------------------------------------

cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
[custom-init] No custom files found, skipping...
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun syncthing (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started
[start] 2022/10/19 22:08:55 INFO: syncthing v1.22.0 "Fermium Flea" (go1.18.6 linux-amd64) root@ea797e827b95 2022-10-04 06:19:08 UTC [noupgrade]
[6FHFY] 2022/10/19 22:08:55 INFO: My ID: <<ID>>
[6FHFY] 2022/10/19 22:08:56 INFO: Single thread SHA256 performance is 75 MB/s using crypto/sha256 (75 MB/s using minio/sha256-simd).
[6FHFY] 2022/10/19 22:08:56 INFO: Hashing performance is 68.57 MB/s
[6FHFY] 2022/10/19 22:08:56 INFO: Overall send rate is unlimited, receive rate is unlimited
[6FHFY] 2022/10/19 22:08:56 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[6FHFY] 2022/10/19 22:08:56 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[6FHFY] 2022/10/19 22:08:56 INFO: QUIC listener ([::]:22000) starting
[6FHFY] 2022/10/19 22:08:56 INFO: TCP listener ([::]:22000) starting
[6FHFY] 2022/10/19 22:08:56 INFO: Ready to synchronize "Finance" (aasyu-d3cpd) (sendreceive)
[6FHFY] 2022/10/19 22:08:56 INFO: GUI and API listening on [::]:8384
[6FHFY] 2022/10/19 22:08:56 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
...

Bad mapping folder/user inside the container

linuxserver.io

I use an asustor NAS. the official syncthing app uses this docker container under the hood.

the NAS filesystem looks as follows:

/volume1/Dir1 <== BTRFS
/volume2/Dir2 <== ext4
/share/Dir1 <== link to volume1/Dir1
/share/Dir2 <== link to volume2/Dir2

the container mounts /share as /shared for convenience, so you can add a shared folder to syncthing, but while Dir1 works fine, trying to add Dir2 gives permission errors.

2021-07-27 17:03:38: Failed to create folder marker: mkdir /shared/Dir2/.stfolder: permission denied
2021-07-27 17:03:38: Error on folder "Dir2" (lzwql-n6dn2): folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)

now, if I open a shell in the container, I see

root@98dab53da19e:/shared# ls -l
total 1
drwxrwxrwx 1 abc  ping  280 Apr 29 14:02 Dir1  
drwx------ 2 root root 1024 Jul 27 15:18 Dir2   

ps auxshows that syncthing in the container runs as user abc, so obviously it won't be able to use Dir2.

UPDATE:

  1. it seems that the issue appears for every folder that is created while the container is running
  2. a simple restart doesn't work
  3. it seems that uninstalling everything and reinstalling fixes the permissions.

Question: when precisely the container sets the permission on Dir1, Dir2... ?

this command is not available -v /path/to/appdata/config:/config \

I have a lot of docker images from linuxserver and they all work without problems. only the syncthing docker image has problems with the line -v / path / to / appdata / config: / config . as if the path / config is missing in the docker image

but it works without the path
have checked everything several times

docker run -d
--name=syncthing
--restart always
-p 8384:8384
-p 22000:22000
-p 21027:21027
-v /volume1/docker/syncthing:/config \ # error message --> command unknown line 7
-d linuxserver/syncthing:amd64-latest

Synology Docker
CPU x64

[BUG] "syncthing cli operations shutdown" dont work

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

root@1357e4230c1c:/# syncthing cli operations shutdown
unexpected HTTP status returned: 403 Forbidden
Forbidden
root@1357e4230c1c:/#

Expected Behavior

to stop syncthing

Steps To Reproduce

send syncthing cli operations shutdown to the container

Environment

- OS:debian stable
- How docker service was installed: docker-compose

CPU architecture

x86-64

Docker creation

version: "2.1"
services:
  syncthing:
    image: linuxserver/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=100
      - TZ=why do you care?
    volumes:
      - why do you care?:/config
      - why do you care?:/data1
      - why do you care?:/data2
    ports:
      - why do you care?:8384
      - 22000:22000
      - 21027:21027/udp
    restart: unless-stopped

Container logs

docker exec -it syncthing syncthing cli operations shutdown dont generate any logs

[FEAT] Add option to set listen address for GUI

Is this a new feature request?

  • I have searched the existing issues

Wanted change

Allow setting the argument --gui-address using environment variables

Reason for change

In cases where it's needed to run with net: host or connect the container to multiple docker networks, access to the gui cannot only be restricted by using the ports: section in docker-compose. Allowing users to set this argument as an environment variable adds another layer of control over gui access.

Proposed code change

Change this:


To something like:

 --gui-address="${GUI_LISTEN_ADDRESS_PORT:-0.0.0.0:8384}"

This will also allow to change the default http port.

Missing /sync directory for UNRAID

Doesn't ask for a sync directory or even mention that one should be added in the description for UNRAID.
I get that the user can/should add their own mounting path but this would help people just trying it out.

screen shot 2016-01-10 at 11 32 19 pm

[BUG] `no matching manifest for linux/arm/v7 in the manifest list entries`

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm trying to setup syncthing using Docker on an old Raspberry PI 4 to sync some files off it. However it seems that you don't currently build syncthing for the platform linux/arm/v7.

$ arch
armv7l

Expected Behavior

I would have liked it to work on 32-bit arm.

Steps To Reproduce

Simply try and start the container on 32-bit arm.

Environment

- OS: Raspbian GNU/Linux 10 (buster)
- How docker service was installed: `docker compose`

CPU architecture

armv7l

Docker creation

copy-pasted default `docker compose` example from docs, ran `docker compose up -d`

Container logs

No container logs as it isn't able to pull the container.

1.20.3 fails with s6-overlay-suexec: fatal: can only run as pid 1

linuxserver.io

Image got updated to latest (1.20.3) and fails with
syncthing | s6-overlay-suexec: fatal: can only run as pid 1

1.20.2 (and older) are fine.


Expected Behavior

Container should start (as it does with 1.20.2)

Current Behavior

Update to 1.20.3
Start with docker-compose:
syncthing | s6-overlay-suexec: fatal: can only run as pid 1

Steps to Reproduce

Environment

OS:
Debian; Linux hans-svr 5.10.0-16-amd64 #1 SMP Debian 5.10.127-2 (2022-07-23) x86_64 GNU/Linux
CPU architecture: x86_64
How docker service was installed:
official docker repo; latest docker-ce

Command used to create docker container (run/create/compose/screenshot)

---
version: "3"
services:
  syncthing:
    container_name: ${TAG}
    image: lscr.io/linuxserver/syncthing:1.20.2
    hostname: hans-svr

    environment:
    - PUID=1000
    - PGID=1000
    - TZ=Europe/Amsterdam

    volumes:
    - /home/hans/programming/git:/data3
    - ./data/config:/config

    expose:
    - 8384

    ports:
    - 192.168.1.1:8384:8384
    - 192.168.1.1:22000:22000/tcp
    - 192.168.1.1:22000:22000/udp

    restart: unless-stopped

    labels:
    - "traefik.enable=true"
    - "traefik.http.routers.${TAG}.entrypoints=web-https"
    - "traefik.http.routers.${TAG}.rule=Host(`www.example.com`) && PathPrefix(`/${TAG}`)"
    - "traefik.http.routers.${TAG}.tls.certResolver=letsencrypt"
    - "traefik.http.services.${TAG}.loadbalancer.server.port=8384"
    - "traefik.http.services.${TAG}.loadbalancer.server.scheme=https"

    - "traefik.http.routers.${TAG}.middlewares=${TAG}-chain"
    - "traefik.http.middlewares.${TAG}-stripprefix.stripprefix.prefixes=/${TAG}"
    - "traefik.http.middlewares.${TAG}-chain.chain.middlewares=authelia@docker, ${TAG}-stripprefix"

    networks:
    - frontend

networks:
  frontend:
    external:
      name: traefik-proxy

Docker logs

syncthing | s6-overlay-suexec: fatal: can only run as pid 1

[BUG] Failure on home directory, file exists

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm trying to run the Docker image through CasaOS, which installed 1.23.5. I also pulled and switched to 1.27.2 and see the same behavior. In both cases the container starts up, but all I see in the logs is the following:

WARNING: Failure on home directory: mkdir /config: file exists

I have /config set up as a volume, and PUID and GUID matching my main user. The folder from the volume config exists, and the permissions match the user, so I don't think that's the problem (it also doesn't say "permission denied"). As far as I can tell, everything is set up according to the documentation on the image, but I just can't get past that mkdir command being called.

Oddly enough, when I check the container in portainer, I see that it's using the image linuxserver/syncthing:1.27.2@sha256:f8ef89a51cc2ca926da7700de08550f12986340ab772a1b45a4e0dd973c69370, but the build_version is still showing Linuxserver.io version:- v1.23.5-ls105 Build-date:- 2023-07-01T02:26:10+00:00, so it's possibly I'm actually still on that older version. I didn't see any issues or pulls or anything in the release notes that mentioned this though, so it's not clear if a newer version might already contain a fix or not.

If there are any other settings or anything that would be helpful to know about, let me know.

Expected Behavior

I expected syncthing to just start and drop any config files in the /config path as needed.

Steps To Reproduce

  1. Install app via CasaOS
  2. Check logs (I used portainer)

Environment

- OS: Ubuntu Server 22.04
- How docker service was installed: via CasaOS, which seems to have installed docker-ce using apt

CPU architecture

x86-64

Docker creation

https://github.com/linuxserver/docker-syncthing/assets/404731/0ceae544-883f-4752-b228-08dbe6ec8bc6

Container inspect output:

{
    "AppArmorProfile": "docker-default",
    "Args": [],
    "Config": {
        "AttachStderr": true,
        "AttachStdin": false,
        "AttachStdout": true,
        "Cmd": null,
        "Domainname": "",
        "Entrypoint": [
            "/init"
        ],
        "Env": [
            "PGID=1000",
            "OPENAI_API_KEY=sk-xxxxxx",
            "PUID=1000",
            "TZ=US/Mountain",
            "PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "PS1=$(whoami)@$(hostname):$(pwd)\\$",
            "HOME=/config",
            "TERM=xterm",
            "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
            "S6_VERBOSITY=1",
            "S6_STAGE2_HOOK=/docker-mods",
            "VIRTUAL_ENV=/lsiopy",
            "LSIO_FIRST_PARTY=true"
        ],
        "ExposedPorts": {
            "21027/udp": {},
            "22000/tcp": {},
            "22000/udp": {},
            "8384/tcp": {}
        },
        "Hostname": "efa6ed4a969e",
        "Image": "linuxserver/syncthing:1.27.2",
        "Labels": {
            "build_version": "Linuxserver.io version:- v1.23.5-ls105 Build-date:- 2023-07-01T02:26:10+00:00",
            "com.docker.compose.config-hash": "ec0e7a6b374bb1435f8a207eedbb37d56e88caed7e99fb93b1e3e79401301410",
            "com.docker.compose.container-number": "1",
            "com.docker.compose.depends_on": "",
            "com.docker.compose.image": "sha256:dace2d77c273834db16ce99f25df28ff158c829f08e137f2c1960d83ca669a99",
            "com.docker.compose.oneoff": "False",
            "com.docker.compose.project": "syncthing",
            "com.docker.compose.project.config_files": "/var/lib/casaos/apps/syncthing/docker-compose.yml",
            "com.docker.compose.project.working_dir": "/var/lib/casaos/apps/syncthing",
            "com.docker.compose.replace": "cf15fdcc6fac131d62daeaea16d8b9f4f98996ca6c9335269ab2da227e170d62",
            "com.docker.compose.service": "syncthing",
            "com.docker.compose.version": "",
            "icon": "https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Syncthing/icon.png",
            "maintainer": "thelamer",
            "org.opencontainers.image.authors": "linuxserver.io",
            "org.opencontainers.image.created": "2023-07-01T02:26:10+00:00",
            "org.opencontainers.image.description": "[Syncthing](https://syncthing.net) 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.",
            "org.opencontainers.image.documentation": "https://docs.linuxserver.io/images/docker-syncthing",
            "org.opencontainers.image.licenses": "GPL-3.0-only",
            "org.opencontainers.image.ref.name": "bea4e96b425ae31fe74be4d7b2479470390b678c",
            "org.opencontainers.image.revision": "bea4e96b425ae31fe74be4d7b2479470390b678c",
            "org.opencontainers.image.source": "https://github.com/linuxserver/docker-syncthing",
            "org.opencontainers.image.title": "Syncthing",
            "org.opencontainers.image.url": "https://github.com/linuxserver/docker-syncthing/packages",
            "org.opencontainers.image.vendor": "linuxserver.io",
            "org.opencontainers.image.version": "v1.23.5-ls105"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/DATA": {},
            "/config": {}
        },
        "WorkingDir": "/"
    },
    "Created": "2024-01-03T22:38:18.927104919Z",
    "Driver": "overlay2",
    "ExecIDs": null,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/3c87368b1e41498270e30050db1a869c9993fdc94af1ae4d94a2926df2864550-init/diff:/var/lib/docker/overlay2/1e44316af13f4bb43770c306dc2b74858a1bb401706921081bf54fffbad0f589/diff:/var/lib/docker/overlay2/0e23f662293be73b5577801bd44a363567aa6da3115fe24d9057df857cfbc1ae/diff:/var/lib/docker/overlay2/bd7641ff8c45e9c36dd6024f5ad5eb86862d21cc94d8ae71216d25290d185835/diff:/var/lib/docker/overlay2/b349fbfc2d20ca715372f7357efb45193eaf6329867ae0b1237f0a3a0c2c4af7/diff:/var/lib/docker/overlay2/461ea03c76bcfa7f342fd2e9f074500a38377d6d2709d7a6410822ea3bdb7d6e/diff:/var/lib/docker/overlay2/8ba20dd3380de2a4e66ca53636b19f1ed7b07d44347c149c8dcfa20513a64477/diff:/var/lib/docker/overlay2/abdceeab27dd09c687c8c74bbbd4b0795711bc3ca8c1bf296781aee45f6ea179/diff:/var/lib/docker/overlay2/d689fd49bbc493170c1cbcb8997728d82f34e431190936d0830250293b93901f/diff",
            "MergedDir": "/var/lib/docker/overlay2/3c87368b1e41498270e30050db1a869c9993fdc94af1ae4d94a2926df2864550/merged",
            "UpperDir": "/var/lib/docker/overlay2/3c87368b1e41498270e30050db1a869c9993fdc94af1ae4d94a2926df2864550/diff",
            "WorkDir": "/var/lib/docker/overlay2/3c87368b1e41498270e30050db1a869c9993fdc94af1ae4d94a2926df2864550/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": false,
        "Binds": [
            "/DATA/AppData/syncthing/config:/config",
            "/DATA:/DATA"
        ],
        "BlkioDeviceReadBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceWriteIOps": null,
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "CapAdd": [
            "AUDIT_WRITE",
            "CHOWN",
            "DAC_OVERRIDE",
            "FOWNER",
            "FSETID",
            "KILL",
            "MKNOD",
            "NET_BIND_SERVICE",
            "NET_RAW",
            "SETFCAP",
            "SETGID",
            "SETPCAP",
            "SETUID",
            "SYS_CHROOT"
        ],
        "CapDrop": [
            "AUDIT_CONTROL",
            "BLOCK_SUSPEND",
            "DAC_READ_SEARCH",
            "IPC_LOCK",
            "IPC_OWNER",
            "LEASE",
            "LINUX_IMMUTABLE",
            "MAC_ADMIN",
            "MAC_OVERRIDE",
            "NET_ADMIN",
            "NET_BROADCAST",
            "SYSLOG",
            "SYS_ADMIN",
            "SYS_BOOT",
            "SYS_MODULE",
            "SYS_NICE",
            "SYS_PACCT",
            "SYS_PTRACE",
            "SYS_RAWIO",
            "SYS_RESOURCE",
            "SYS_TIME",
            "SYS_TTY_CONFIG",
            "WAKE_ALARM"
        ],
        "Cgroup": "",
        "CgroupParent": "",
        "CgroupnsMode": "private",
        "ConsoleSize": [
            0,
            0
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 50,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "DeviceRequests": null,
        "Devices": [],
        "Dns": [],
        "DnsOptions": null,
        "DnsSearch": null,
        "ExtraHosts": [],
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "IpcMode": "private",
        "Isolation": "",
        "Links": null,
        "LogConfig": {
            "Config": {},
            "Type": "json-file"
        },
        "MaskedPaths": [
            "/proc/asound",
            "/proc/acpi",
            "/proc/kcore",
            "/proc/keys",
            "/proc/latency_stats",
            "/proc/timer_list",
            "/proc/timer_stats",
            "/proc/sched_debug",
            "/proc/scsi",
            "/sys/firmware",
            "/sys/devices/virtual/powercap"
        ],
        "Memory": 16132341760,
        "MemoryReservation": 268435456,
        "MemorySwap": 32264683520,
        "MemorySwappiness": null,
        "NanoCpus": 0,
        "NetworkMode": "bridge",
        "OomKillDisable": null,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": null,
        "PortBindings": {
            "21027/udp": [
                {
                    "HostIp": "",
                    "HostPort": "21027"
                }
            ],
            "22000/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "22000"
                }
            ],
            "22000/udp": [
                {
                    "HostIp": "",
                    "HostPort": "22000"
                }
            ],
            "8384/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "8384"
                }
            ]
        },
        "Privileged": false,
        "PublishAllPorts": false,
        "ReadonlyPaths": [
            "/proc/bus",
            "/proc/fs",
            "/proc/irq",
            "/proc/sys",
            "/proc/sysrq-trigger"
        ],
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "unless-stopped"
        },
        "Runtime": "runc",
        "SecurityOpt": null,
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": null,
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/var/lib/docker/containers/0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0/hostname",
    "HostsPath": "/var/lib/docker/containers/0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0/hosts",
    "Id": "0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0",
    "Image": "sha256:f8ef89a51cc2ca926da7700de08550f12986340ab772a1b45a4e0dd973c69370",
    "LogPath": "/var/lib/docker/containers/0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0/0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0-json.log",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/config",
            "Mode": "",
            "Propagation": "rprivate",
            "RW": true,
            "Source": "/DATA/AppData/syncthing/config",
            "Type": "bind"
        },
        {
            "Destination": "/DATA",
            "Mode": "",
            "Propagation": "rprivate",
            "RW": true,
            "Source": "/DATA",
            "Type": "bind"
        }
    ],
    "Name": "/syncthing",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "Networks": {
            "bridge": {
                "Aliases": null,
                "DriverOpts": null,
                "EndpointID": "",
                "Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": {},
                "IPAddress": "",
                "IPPrefixLen": 0,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "",
                "NetworkID": "96fc87ec14d4a54cee506dfb12723c008c9bbf6457ec090ca48481ec8b8b699c"
            }
        },
        "Ports": {},
        "SandboxID": "28c8207817f2412ebf41b44295a4b84a65acdeea06b03658ca898442b234f50d",
        "SandboxKey": "/var/run/docker/netns/28c8207817f2",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/init",
    "Platform": "linux",
    "Portainer": {
        "ResourceControl": {
            "Id": 3,
            "ResourceId": "0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0",
            "SubResourceIds": [],
            "Type": 1,
            "UserAccesses": [],
            "TeamAccesses": [],
            "Public": false,
            "AdministratorsOnly": true,
            "System": false
        }
    },
    "ProcessLabel": "",
    "ResolvConfPath": "/var/lib/docker/containers/0ff39074518eadb58fa2b473e104f1552cec513e41cbb1c9f68958002cc26bf0/resolv.conf",
    "RestartCount": 0,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 137,
        "FinishedAt": "2024-01-03T22:38:57.094661433Z",
        "OOMKilled": false,
        "Paused": false,
        "Pid": 0,
        "Restarting": false,
        "Running": false,
        "StartedAt": "2024-01-03T22:38:19.208764165Z",
        "Status": "exited"
    }
}

Container logs

[migrations] started

[migrations] no migrations found

───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 

      ██║     ██╔════╝██║██╔═══██╗

      ██║     ███████╗██║██║   ██║

      ██║     ╚════██║██║██║   ██║

      ███████╗███████║██║╚██████╔╝

      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io

───────────────────────────────────────

To support LSIO projects visit:

https://www.linuxserver.io/donate/

───────────────────────────────────────

GID/UID

───────────────────────────────────────

User UID:    1000

User GID:    1000

───────────────────────────────────────

[custom-init] No custom files found, skipping...

2024/01/03 15:38:19 WARNING: Failure on home directory: mkdir /config: file exists

2024/01/03 15:38:20 WARNING: Failure on home directory: mkdir /config: file exists

2024/01/03 15:38:21 WARNING: Failure on home directory: mkdir /config: file exists

2024/01/03 15:38:22 WARNING: Failure on home directory: mkdir /config: file exists

2024/01/03 15:38:23 WARNING: Failure on home directory: mkdir /config: file exists

...just keeps repeating this until it exits with code 137

Add strelaysrv binary back in

This is a request that's basically the opposite of #21 - all the syncthing binaries used to be built and included, but then 664b8f0 modified the Dockerfile to only build the main application.

I've been interested in running a public relay server since I have excess bandwidth available, but there isn't an official syncthing image available that has the strelaysrv relay server binary included. Would it be possible to re-add this, even if it's on it's own branch so not everyone has to grab it?

cannot get to gui on windows

public GUI is not accessible on windows:

---
version: "2"
services:
  syncthing:
    image: linuxserver/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - UMASK_SET=<022>
    volumes:
      - E:/src/peer/storage/config/config:/config
      - E:/src/peer/storage/lahoda.pro/laptop:/lahoda.pro/laptop
      - E:/src/peer/storage/lahoda.pro/mobile:/lahoda.pro/mobile
    ports:
      - 8384:8384
      - 22000:22000
      - 21027:21027/udp
    restart: unless-stopped
docker-compose --file ./docker-compose.yml run syncthing
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 99-custom-files: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
./run: line 5: umask: `<': invalid symbolic mode operator
[start] 08:28:44 INFO: syncthing v1.3.2 "Fermium Flea" (go1.12.12 linux-amd64) root@1047530fbeb1 2019-12-03 07:36:37 UTC
[services.d] done.
[TZFUF] 08:28:44 INFO: My ID: TZFUF2M-3MDAJN6-WHM3BYG-GWW2HRZ-EVDJAOW-OLPYMER-ENIPGDS-75HJPQ5
[TZFUF] 08:28:44 INFO: Single thread SHA256 performance is 377 MB/s using minio/sha256-simd (332 MB/s using crypto/sha256).
[TZFUF] 08:28:45 INFO: Hashing performance is 303.82 MB/s
[TZFUF] 08:28:45 INFO: Ready to synchronize "Default Folder" (default) (sendreceive)
[TZFUF] 08:28:45 INFO: Overall send rate is unlimited, receive rate is unlimited
[TZFUF] 08:28:45 INFO: Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[TZFUF] 08:28:45 INFO: Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[TZFUF] 08:28:45 INFO: Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[TZFUF] 08:28:45 INFO: QUIC listener ([::]:22000) starting
[TZFUF] 08:28:45 INFO: TCP listener ([::]:22000) starting
[TZFUF] 08:28:45 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[TZFUF] 08:28:45 INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
[TZFUF] 08:28:45 INFO: GUI and API listening on [::]:8384
[TZFUF] 08:28:45 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[TZFUF] 08:28:45 INFO: My name is "84361aa4cf5b"
[TZFUF] 08:28:56 INFO: quic://0.0.0.0:22000 detected NAT type: Symmetric NAT
[TZFUF] 08:28:56 INFO: quic://0.0.0.0:22000 resolved external address quic://37.215.190.146:64497 (via stun.syncthing.net:3478)
[TZFUF] 08:29:06 INFO: Detected 1 NAT service
[TZFUF] 08:29:15 INFO: Joined relay relay://94.16.114.88:22067
PS E:\src\peer\storage> curl http://127.0.0.1:8384/
curl: (7) Failed to connect to 127.0.0.1 port 8384: Connection refused

I expect to get to GUI, but fail. I have tested running nginx

docker run -p 12312:80 -d nginx
PS C:\Users\dzmitry> curl http://127.0.0.1:12312
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

Failed to create folder root directory mkdir /data1: read-only file system

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When adding a new synced folder to /data1/somepath - I get this error in Syncthing GUI:

Failed to create folder root directory mkdir /data1: read-only file system

Expected Behavior

That should work.

Steps To Reproduce

Setting up docker with default config and trying to sync a folder.
creating files in /data1 from shell on docker container works fine, also as user abc.

Environment

- OS: Ubuntu 22.04.3 LTS
- How docker service was installed: package system

CPU architecture

x86-64

Docker creation

docker-compose 

version: "2.1"

volumes:
  syncthing.persistent:
    name: syncthing.persistent
    driver_opts:
      mountpoint: /media/bigdata/syncthing.persistent.image

services:
  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    hostname: flourish-syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Stockholm
    volumes:
      - './config:/config:rw'
      - type: volume
        source: syncthing.persistent
        target: /data1
    ports:
      - 8384:8384
      - 8106:8106/tcp
      - 8106:8106/udp
      - 21027:21027/udp
    restart: unless-stopped

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: v1.27.9-ls150
Build-date: 2024-07-13T01:49:21+00:00
───────────────────────────────────────
    
[custom-init] No custom files found, skipping...
[start] 2024/07/14 12:11:36 INFO: syncthing v1.27.9 "Gold Grasshopper" (go1.22.5 linux-amd64) root@buildkitsandbox 2024-07-13 01:50:26 UTC [noupgrade]
[ABHYS] 2024/07/14 12:11:36 INFO: My ID: ABHYSVV-ZTJMO22-BKOOKPT-LDE5IIQ-7NXFQ5V-AW4LRRY-JBN6IXF-MFFDXQG
[ABHYS] 2024/07/14 12:11:37 INFO: Single thread SHA256 performance is 307 MB/s using crypto/sha256 (305 MB/s using minio/sha256-simd).
[ABHYS] 2024/07/14 12:11:38 INFO: Hashing performance is 257.05 MB/s
[ABHYS] 2024/07/14 12:11:38 INFO: Overall send rate is unlimited, receive rate is unlimited
[ABHYS] 2024/07/14 12:11:38 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[ABHYS] 2024/07/14 12:11:38 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[ABHYS] 2024/07/14 12:11:38 INFO: TCP listener ([::]:8106) starting
[ABHYS] 2024/07/14 12:11:38 INFO: Ready to synchronize "Seedvault" (1q9b0-iw3p9) (sendreceive)
[ABHYS] 2024/07/14 12:11:38 INFO: Ready to synchronize "Default Folder" (default) (sendreceive)
[ABHYS] 2024/07/14 12:11:38 INFO: GUI and API listening on [::]:8384
[ABHYS] 2024/07/14 12:11:38 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[ABHYS] 2024/07/14 12:11:38 INFO: My name is "May You Flourish and Shine"
[ABHYS] 2024/07/14 12:11:38 INFO: Device ***** is "*****" at [dynamic]
[ABHYS] 2024/07/14 12:11:38 INFO: Device ***** is "*****" at [tcp://*****:22000]
*various folder messages, no errors*
Connection to localhost (127.0.0.1) 8384 port [tcp/*] succeeded!
[ls.io-init] done.
[ABHYS] 2024/07/14 12:11:38 INFO: Completed initial scan of sendreceive folder "Foton (telefonen)" (k2769-pl6fc)
[ABHYS] 2024/07/14 12:11:58 INFO: Detected 0 NAT services

*No error messages. When syncthing GUI gives the error message, nothing appears in docker logs.*

[FEAT] Set Option to add additional parameter

Is this a new feature request?

  • I have searched the existing issues

Wanted change

For problem resolving issues i have to start the Syncthing binary with "-reset-deltas".

As far as I am aware, I am not able to do this with this docker image.

Reason for change

Syncthing provides a lot of additional parameters that can be used.
This is not possible with this docker image.

Proposed code change

No response

[BUG] Docker Log File Large with Errors

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The log file keeps growing rapidly with this:

[IMYVG] 2024/03/21 10:32:37 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting [IMYVG] 2024/03/21 10:32:47 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down [IMYVG] 2024/03/21 10:32:47 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on 192.168.0.254:53: read udp 172.17.0.8:38656->192.168.0.254:53: i/o timeout

Expected Behavior

Should be a small log file or some way to limit the log file size.

Steps To Reproduce

I am not sure what steps I did. I had this setup on my old network but have changed my network and have not had a chance to check the error but I am using 10.0.X.X not 192.168.X.X
I am not sure if I can create and environment variable to do this command that docker supports
--log-opt max-size=50m

Environment

- OS: unriad
- How docker service was installed:
Community Apps on unraid

CPU architecture

x86-64

Docker creation

Not sure what unraid runs to start the container.

Container logs

{"log":"\n","stream":"stdout","time":"2024-03-16T03:06:30.1852549Z"}
{"log":"[custom-init] No custom files found, skipping...\n","stream":"stdout","time":"2024-03-16T03:06:30.229866133Z"}
{"log":"[start] 2024/03/15 20:06:30 INFO: syncthing v1.27.4 \"Gold Grasshopper\" (go1.21.8 linux-amd64) root@buildkitsandbox 2024-03-16 01:34:05 UTC [noupgrade]\n","stream":"stdout","time":"2024-03-16T03:06:30.3168153Z"}
{"log":"[IMYVG] 2024/03/15 20:06:30 INFO: My ID: IMYVGD3-FCWJFHD-ZM3NHHL-H3PPHPH-Z5GG3Q5-MADXYJS-HPQJJ7U-KTNOVQT\n","stream":"stdout","time":"2024-03-16T03:06:30.348214756Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Single thread SHA256 performance is 354 MB/s using minio/sha256-simd (342 MB/s using crypto/sha256).\n","stream":"stdout","time":"2024-03-16T03:06:31.280581304Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Hashing performance is 225.00 MB/s\n","stream":"stdout","time":"2024-03-16T03:06:31.747984995Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Overall send rate is unlimited, receive rate is unlimited\n","stream":"stdout","time":"2024-03-16T03:06:31.753969014Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Using discovery mechanism: global discovery server https://discovery.syncthing.net/v2/?noannounce\u0026id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW\n","stream":"stdout","time":"2024-03-16T03:06:31.760823286Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Using discovery mechanism: global discovery server https://discovery-v4.syncthing.net/v2/?nolookup\u0026id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW\n","stream":"stdout","time":"2024-03-16T03:06:31.760855434Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Using discovery mechanism: global discovery server https://discovery-v6.syncthing.net/v2/?nolookup\u0026id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW\n","stream":"stdout","time":"2024-03-16T03:06:31.760867208Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027\n","stream":"stdout","time":"2024-03-16T03:06:31.760873176Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027\n","stream":"stdout","time":"2024-03-16T03:06:31.76087865Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: TCP listener ([::]:22000) starting\n","stream":"stdout","time":"2024-03-16T03:06:31.761116417Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: QUIC listener ([::]:22000) starting\n","stream":"stdout","time":"2024-03-16T03:06:31.761170967Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting\n","stream":"stdout","time":"2024-03-16T03:06:31.761221989Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Ready to synchronize \"Default Folder\" (default) (sendreceive)\n","stream":"stdout","time":"2024-03-16T03:06:31.77235689Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: GUI and API listening on [::]:8384\n","stream":"stdout","time":"2024-03-16T03:06:31.775418217Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/\n","stream":"stdout","time":"2024-03-16T03:06:31.775484937Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: My name is \"7e3c0492bcd2\"\n","stream":"stdout","time":"2024-03-16T03:06:31.77553487Z"}
{"log":"[IMYVG] 2024/03/15 20:06:31 INFO: Completed initial scan of sendreceive folder \"Default Folder\" (default)\n","stream":"stdout","time":"2024-03-16T03:06:31.777039654Z"}
{"log":"Connection to localhost (127.0.0.1) 8384 port [tcp/*] succeeded!\n","stream":"stderr","time":"2024-03-16T03:06:32.313960384Z"}
{"log":"[ls.io-init] done.\n","stream":"stdout","time":"2024-03-16T03:06:32.360624266Z"}
{"log":"[IMYVG] 2024/03/15 20:06:41 INFO: quic://0.0.0.0:22000 detected NAT type: Symmetric NAT\n","stream":"stdout","time":"2024-03-16T03:06:41.815801322Z"}
{"log":"[IMYVG] 2024/03/15 20:06:55 INFO: Detected 1 NAT service\n","stream":"stdout","time":"2024-03-16T03:06:55.808768709Z"}
{"log":"[IMYVG] 2024/03/15 20:07:35 INFO: Joined relay relay://162.221.89.143:22067\n","stream":"stdout","time":"2024-03-16T03:07:35.267746543Z"}
{"log":"[monitor] 2024/03/15 20:29:12 INFO: Signal 15 received; exiting\n","stream":"stdout","time":"2024-03-16T03:29:12.003825087Z"}
{"log":"[IMYVG] 2024/03/15 20:29:12 INFO: QUIC listener ([::]:22000) shutting down\n","stream":"stdout","time":"2024-03-16T03:29:12.005090221Z"}
{"log":"[IMYVG] 2024/03/15 20:29:12 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down\n","stream":"stdout","time":"2024-03-16T03:29:12.005594715Z"}
{"log":"[IMYVG] 2024/03/15 20:29:12 INFO: TCP listener ([::]:22000) shutting down\n","stream":"stdout","time":"2024-03-16T03:29:12.494020035Z"}
{"log":"[IMYVG] 2024/03/15 20:29:12 INFO: Exiting\n","stream":"stdout","time":"2024-03-16T03:29:12.494588864Z"}
{"log":"[migrations] started\n","stream":"stdout","time":"2024-03-16T03:39:40.978174287Z"}
{"log":"[migrations] no migrations found\n","stream":"stdout","time":"2024-03-16T03:39:40.98045071Z"}
{"log":"usermod: no changes\n","stream":"stdout","time":"2024-03-16T03:39:41.169535708Z"}
{"log":"───────────────────────────────────────\n","stream":"stdout","time":"2024-03-16T03:39:41.169555614Z"}

env umask not honored

there seems to be an issue with the container. by default the ENV umask is set to 022.
when i change it to 007 it keeps it at 022.
so setting the ENV umask in the current state it pretty much broken in it's current state.

expected behavior:
file permissions: 007 | 660 (rw-rw----) | directory permissions: 770 (rwxrwx---)
but results in: 022 | 644 (rw-r--r--) | directory permissions: 755 (rwxr-xr-x)

Add port mapping for 22000/udp

The docker-compose and docker-cli examples only show the usage of the tcp port. The Dockerfile is missing the EXPOSE for 22000/udp aswell.

docs: Mention of data1 and data2 directories is confusing

The README shows an example of mounting /data1 and /data2 directories inside the container but those paths are nowhere to be found in this Docker image's assets (entrypoint, Dockerfile, etc). I'm guessing those are examples of how to mount something in an area where syncthing will be able to access inside the container but are not actually required.

On unRAID, the file permissions for the docker container are incorrect due to the umask.

When using SyncThing on unRAID, the permissions set by the umask in your docker container change the permissions to deny write permissions to users over Samba file sharing. I would love to use this docker container on unRAID, but when using it, I cannot modify the files synced to my server.

The current umask is 022, which removes permissions. The correct umask is 000, which permits write access.

In other words, the change made on 30.09.16 is incorrect as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.