How to back up your UGREEN NAS with Sync WebDAV

Sync WebDAV for Linux can be used with the built-in Sync & Backup app on a UGREEN NAS.

You can use this configuration to:

  • Back up your UGREEN NAS to Sync for an off-site cloud backup.
  • Back up your Sync account to your UGREEN NAS for a local copy of your Sync data.

Before you begin, you'll need:

  • A UGREEN NAS with Docker, and Sync & Backup installed.
  • NAS port 4918 available.

Install through the UGREEN Docker app

  1. Download the Sync-WebDAV Docker files.
  2. Copy every file in the Docker directory to a folder on the NAS, for example docker/sync-webdav. 
  3. Open Docker > Project > Create in UGOS.
  4. Name the project sync-webdav and select the folder containing these files as its project path.
  5. Paste compose.ugreen.yaml, then deploy the project. The first build downloads and verifies Sync WebDAV for the NAS architecture. Click Deploy.
  6. Open the `sync-webdav` container logs. With no saved profile it reports that it is safely waiting for login. An unhealthy status at this point is expected because the WebDAV server has not started.

The relative volume mappings create these persistent folders beneath the project directory:

  • data/config - Sync session and WebDAV credential digest
  • data/upload-tmp - Temporary data used while receiving large uploads
  • Treat `data/config` as sensitive and include it in NAS backups. If UGOS asks whether to remove project data when deleting a project, retain this directory unless the saved Sync session should also be deleted.

Complete first-time login

  1. In UGOS, open Docker > Container > sync-webdav > Terminal.
  2. Click Add and start /bin/sh if the terminal asks which command to run.
  3. At the shell prompt run:

    sync-webdav-container login-file


     

  4. Open the printed Sync.com URL in a normal browser on your computer.

  5. After authorization, copy the token into a plain text file named auth-code.txt. If using the UGREEN Textedit app do not append .txt to the file name because it automatically does that. The file may end with a normal newline, but it should not contain any other text but the token.
  6. Leave the terminal open. In UGREEN File Manager, upload the file to the project's data/upload-tmp directory. The waiting command detects a stable upload, opens it once, deletes it, and submits the code without echoing it.
  7. IMPORTANT: Save the displayed WebDAV username and generated password. This is a separate WebDAV credential, not the Sync.com account password. You will need these credentials later.
  8. Close the terminal and restart the container in UGOS.

On restart the container detects the saved profile and starts the server. Its health should change to healthy after WebDAV begins answering on port 4918.

You can now create a UGREEN backup task via the UGREEN Sync & Backup app. 

Creating a UGREEN backup task

  1. In UGOS Pro open Sync & Backup → Backup & Restore → Add
  2. Choose either Backup This UGREEN NAS to back up your NAS data to Sync, or Backup Server to back up your Sync data to the NAS.
  3. Select WebDAV and enter
    Server address: localhost
    Protocol: HTTP
    Port: 4918
    Root folder: /
    Username: sync
    Password: (Your WebDAV password generated during WebDAV installation)
  4. Choose what to backup by selecting your Source and Destination.
  5. Configure your backup schedule and version policy
  6. Review the backup task and click Confirm.

Restoring a UGREEN backup

UGREEN stores NAS-to-remote backups in its own backup format. To restore them:

  1. Make sure Sync WebDAV is running.
  2. Open Sync & Backup → Backup & Restore.
  3. Select the backup task.
  4. Choose Restore.
  5. Select the files or backup version to restore.

To replace a lost or rejected WebDAV password, open the terminal and run: 
sync-webdav-container reset-file


Docker Advanced configuration

Choose Sync Folder or Vault

The default in `compose.ugreen.yaml` is the Sync Folder:
SYNC_WEBDAV_CONTENT: sync

To expose Vault instead, change it to `vault` and redeploy the project:
SYNC_WEBDAV_CONTENT: vault

Network access

The supplied project uses host networking and starts with:
SYNC_WEBDAV_ALLOW_FROM: none

That permits clients on the NAS itself, including another host-networked container, to use http://127.0.0.1:4918 while rejecting other machines.

To allow a trusted local subnet, replace `none` with its CIDR and redeploy. For example:
SYNC_WEBDAV_ALLOW_FROM: 192.168.1.0/24

A LAN client would then use `http://NAS_IP:4918` with username `sync` and the generated WebDAV password. Only use this on a trusted network because the connection is HTTP rather than HTTPS. Do not use `any` unless the surrounding network controls are fully understood.

If port 4918 is occupied, change `SYNC_WEBDAV_PORT` and use the same new port in clients. Host networking means there is no separate Docker port mapping.

To replace a lost or rejected WebDAV password

Open the terminal and run:
sync-webdav-container reset-file

Updating Sync WebDAV

The executable is baked into the container image and does not update itself at runtime. To check for and install the latest published release:

  1. Open compose.ugreen.yaml in the project folder.
  2. Change SYNC_WEBDAV_REFRESH to a value you have not used before. A current date is convenient, for example 2026-11-01.
  3. Rebuild and redeploy the project in the UGREEN Docker app.
  4. After the replacement container becomes healthy, open its terminal and run sync-webdav-container version to confirm the installed version.

Changing the refresh token invalidates only the release-download build layer. During the rebuild, Docker reads Sync's current release manifest, downloads the reported version, and verifies its published checksum.

If no newer release is available, the rebuilt image contains the same version.

The bind-mounted `data/config` directory survives image and container replacement, so the new container reuses the existing login profile and WebDAV password. Keep a backup of this directory as described above.

Do not run `sync-webdav update` inside the container. An in-place update would be lost when Docker recreates the container from its image.

Troubleshooting

Waiting for login:
run sync-webdav-container login-file, upload the one-line code to `data/upload-tmp/auth-code.txt`, and restart the container.

Stale authorization file:
remove data/upload-tmp/auth-code.txt, start login-file` again, and authorize using the newly printed URL.

Permission denied
confirm the project data folders are writable, then redeploy. The container normally corrects their ownership using PUID/PGID.

Port already in use:
change SYNC_WEBDAV_PORT to an unused NAS port.

Cannot connect from another computer:
add only the required LAN address or subnet to `SYNC_WEBDAV_ALLOW_FROM` and redeploy.

Container exits:
inspect Docker > Container > sync-webdav > Log.

Check installed version:
run sync-webdav-container version in Docker Terminal.
 

Was this article helpful?
0 out of 0 found this helpful