Sync WebDAV can run in a Docker container on your Synology NAS, connecting your NAS apps to your Sync account.
You can use this setup to:
- Back up NAS folders to Sync with Hyper Backup.
- Keep a local copy of your Sync files on the NAS with Cloud Sync.
Before you begin, you’ll need:
- A compatible Synology NAS running DSM 7.2 or later.
- Container Manager installed from the Package Center.
- Hyper Backup installed for NAS-to-Sync backups, or Cloud Sync for Sync-to-NAS copies.
- An administrator account for setting up DSM.
- A Sync account.
- Port 4918 available on the NAS.
Prepare your Synology user account
The Docker container needs a user ID (PUID) and group ID (PGID) that match an account on your NAS. You’ll also give that account permission to write to the container’s data folders.
- In DSM, open Control Panel > Terminal & SNMP > Terminal.
- Enable SSH service, note the port, and click Apply.
- On your computer, open Terminal or PowerShell. Connect using your DSM account, replacing the username, NAS address, and port as needed. Use this command:
ssh your-admin-username@NAS-IP -p 22 - Once connected, run the following on the NAS, replacing your-dsm-username with the username you used on the previous step:
id your-dsm-username - Record the numbers immediately after uid= and gid=.
For example, PUID 1026 and PGID 100.
Prepare the Docker files and data folders
- Download the Sync WebDAV Docker files.
- In File Station, create a project folder, for example docker/sync-webdav.
- Copy all the downloaded Docker files into that folder, keeping them together. These include Dockerfile, compose.ugreen.yaml, sync-webdav-container, and healthcheck.sh.
- The supplied Compose file is named compose.ugreen.yaml; you can use it for this Synology setup after changing the user and group IDs.
- Inside the project folder, create a folder named data.
-
Inside data, create two additional folders named: config and upload-tmp.
Create the folder tree and upload the files before building the project. Missing folders can cause Synology to report a bind-mount error even when the image built successfully.
Set the data folder permissions
Give the DSM account explicit read and write access to the data/config and data/upload-tmp folders.
- In File Station, right-click data/config and select Properties > Permission.
- Click Create.
- Select the DSM user.
- Set Type to Allow.
- Enable Read and Write, including the permissions to create, modify, and delete files and folders.
- Apply the rule to this folder, subfolders, and files. Save the rule, select Apply to this folder, sub-folders and files if shown in Properties, and click Save.
-
IMPORTANT: Repeat for data/upload-tmp.
If DSM displays an administrators-group warning: After verifying that this is the Allow rule for the correct user and data folder, click Yes to save it.
Install through Synology Container Manager
- Open Container Manager > Project > Create.
- Enter sync-webdav as the project name.
- Set Path to the folder containing your Docker files, for example /volume1/docker/sync-webdav.
- For Source, choose Create docker-compose.yml.
- Paste the complete contents of compose.ugreen.yaml into the editor.
- In its environment section, replace the supplied PUID and PGID with your values.
For example:
PUID: "1026"
PGID: "100" - Leave the Web Station portal option disabled.
- Complete the wizard and choose to start the project. Wait for the image build and container startup to finish.
Before the first login, the container waits for you to authorize Sync. It can be Running while its health is Unhealthy, because the WebDAV server has not started yet.
Complete first-time login
- In Container Manager, open the Container section in the sidebar.
- Select the running sync-webdav container and choose Action > Open terminal.
- Create or launch a terminal session with /bin/sh if asked for a command.
- At the shell prompt, run: sync-webdav-container login
- Leave the terminal open. Open the printed Sync.com URL in a browser on your computer.
- Sign in and complete authorization.
- Copy the entire authorization token, paste it directly into the waiting Synology terminal, and press Enter. Paste only the token, without quotation marks or extra text.
-
IMPORTANT: Save the generated WebDAV username and password immediately. The username is sync. The password is separate from your Sync account password and will not be displayed again.
- Close the terminal and restart the container in Container Manager.
- Check that the container remains running and becomes healthy.
Open Container Manager > Container, select sync-webdav, and view its Log under Details.
Creating a Synology backup task
- In DSM open Hyper Backup.
- Click + → Data backup task.
- Select WebDAV as the backup destination.
- Enter:
Server address: http://localhost:4918/
Username: sync
Password: (Your WebDAV password generated during the previous step) - Choose the folders and applications on your Synology NAS that you want to back up.
- Configure your backup schedule and rotation policy.
- Review the backup task and click Done. Hyper Backup will now back up your selected NAS data to Sync through the locally running Sync WebDAV server.
Restoring a Synology backup
Hyper Backup stores NAS-to-remote backups in its own backup format. To restore them:
- Make sure Sync WebDAV is running.
- Open Hyper Backup.
- Select the backup task.
- Click Restore.
- Select the files, folders, applications, or backup version you want to restore.
Backing up your Sync files to the Synology NAS
If you want a local copy of your Sync files on the NAS, use Cloud Sync instead of Hyper Backup.
- Install and open Cloud Sync from DSM Package Center.
- Click + → WebDAV.
- Enter:
Server address: http://localhost:4918/
Account: sync
Password: (Your WebDAV password generated during WebDAV installation) - Select the local folder on your Synology NAS.
- Select the folder in Sync you want to copy.
- Set Sync direction to Download remote changes only.
- Configure your schedule and other options.
- Create the task.
Cloud Sync will periodically check Sync for changes and copy them to your NAS.
Docker advanced configuration
Make changes under Container Manager > Project > sync-webdav > Details > YAML Configurations, then deploy the updated configuration.
Choose Sync Folder or Vault
The default is:
SYNC_WEBDAV_CONTENT: sync
For Vault, use:
SYNC_WEBDAV_CONTENT: vault
Changing this setting changes what clients see at the WebDAV root. Configure it before creating backup tasks; existing tasks may need their destination adjusted.
Network access and port
Keep network_mode: host and SYNC_WEBDAV_ALLOW_FROM: none for Hyper Backup or Cloud Sync running on the same NAS. They connect at http://127.0.0.1:4918/.
For a client on another trusted LAN device, set SYNC_WEBDAV_ALLOW_FROM to its IP address or subnet, for example 192.168.1.0/24, and connect using the NAS IP address. HTTP traffic is unencrypted; do not expose this port to the internet.
If port 4918 is occupied, change SYNC_WEBDAV_PORT and use that port in every client. Host networking does not use a separate Docker port mapping.
Replace a lost WebDAV password
Open the container terminal and run:
sync-webdav-container reset
Complete the browser authorization and token-paste prompts, save the new password, and restart the container. Update the saved password in each connected backup or sync app.
Updating Sync WebDAV
- Back up the project’s data/config folder securely.
- Open the project’s active YAML Configurations.
- Change SYNC_WEBDAV_REFRESH to a new value, such as the current date.
- Rebuild and deploy the project, then ensure its container starts.
- In the container terminal, check the installed version: sync-webdav-container version
The rebuild checks the published release. Preserve data/config so the replacement container can reuse your login and WebDAV credentials. Do not use sync-webdav update inside the container.
Troubleshooting
Bind mount failed: directory does not exist
Check that both data/config and data/upload-tmp exist beneath the selected project path. Create missing folders, set their permissions, and start the project again. A successful image build does not mean the container started.
Permission denied creating /config/sync-webdav
Check the active YAML PUID/PGID and the explicit user permissions on both data folders. Apply permission changes to their contents too.
Fix any permission errors before retrying login. If necessary, inspect inherited Deny rules or restrictions on parent folders.
The service account may appear as syncwebdav inside the container even though DSM shows a different username. Matching numeric UID/GID values is what matters.
Open terminal is greyed out
Select the actual container under Container Manager > Container and confirm it is running. The project build view is not the interactive container terminal.
Container is waiting for login or remains unhealthy
Complete sync-webdav-container login, save the generated credentials, and restart the container. If it remains unhealthy afterward, inspect Container > sync-webdav > Details > Log.
Login fails
Check folder permissions first, then run sync-webdav-container login again. Open the new URL and copy the new token in full. Do not reuse a token from a previous attempt.
The generic sign-in error alone does not establish the cause. If the problem continues after the folder write test succeeds, contact Sync support with the version and error details.
Where are the settings and logs?
- Container/server output: Container Manager > Container > sync-webdav > Details > Log.
- Login errors: The interactive terminal where you ran the login command.
- Profile configuration inside the container: /config/sync-webdav/config.ini.
- Same configuration in File Station: docker/sync-webdav/data/config/sync-webdav/config.ini, when using the example project folder.
Use the container terminal for sync-webdav-container commands; they are not installed directly into the NAS SSH shell.
Hyper Backup or Cloud Sync cannot connect
Confirm the container is healthy and the client uses HTTP, 127.0.0.1, the configured port, and the generated WebDAV password. A browser on your computer cannot reach the NAS server using 127.0.0.1; that address refers to the computer running the client.