this post was submitted on 13 May 2026
3 points (100.0% liked)

Synology

125 readers
3 users here now

Community to discuss Synology products including Network Attached Storage (NAS)


Rules

1. No off topic posts

Posts must be related to Synology

2. Be kind

No insults or overtly rude behavior. You can be right just try to be kind too.


founded 1 year ago
MODERATORS
 

This is my compose file for syncthing

services:
  syncthing:
    image: syncthing/syncthing:latest
    container_name: syncthing
    hostname: syncthing-nas
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Etc/UTC
    volumes:
      - ./config:/var/syncthing/config 
      - /path/to/data:/var/syncthing
    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
networks: {}

Running it give me this error

syncthing  | ERR Failed to ensure directory exists (error="mkdir /var/syncthing/config: permission denied" log.pkg=main)
syncthing exited with code 1
syncthing  | ERR Failed to ensure directory exists (error="mkdir /var/syncthing/config: permission denied" log.pkg=main)
syncthing exited with code 1

This is permission issue with ./config:/var/syncthing/config

I have indeed messed up with folder and file permission for path/to/syncthing/config

I tried to fix it with

chown 1026:100 -R /volume1/docker3/syncthing
chmod 777 -R /volume1/docker3/syncthing

But it didn't work

I have also tried to change permission using synology GUI but still fail to run the docker compose

I would greatly appreciate any help.

top 2 comments
sorted by: hot top controversial new old
[โ€“] hitmyspot@aussie.zone 1 points 1 month ago (1 children)

Mario hosting runs a bunch of guides for docker containers on synology. Maybe follow his guide and see if it fixes your issue.