← All Guides
beginner

Syncthing Docker Setup: Free File Sync Without the Cloud

Set up Syncthing in Docker in under 10 minutes. Sync files between your laptop, phone, and homelab server. No Dropbox, no subscription, no data on someone else's server.

Budget Homelab ·
dockerbackups

Syncthing does one thing: keeps folders in sync across devices. No cloud account, no subscription, no company holding your data. Files sync directly between your devices (or through your homelab server as a relay point).

I run it to keep my Obsidian vault in sync between my Mac and my Ubuntu VM. It’s been running without interruption for over a year. The only time I’ve thought about it is when I’m adding a new device.

How Syncthing works

Syncthing uses a peer-to-peer model. Each device has a unique Device ID. You share folders between specific device pairs. When files change on one device, Syncthing syncs the changes to all paired devices that share that folder.

Your homelab server acts as “always-on” device — it’s always connected, so it can relay changes between devices that aren’t online at the same time. Your laptop goes offline, you make changes on your phone, and when the laptop comes back online it catches up via the server.

No Syncthing company server is involved. All traffic goes directly between your devices (with optional relay through the Syncthing community relay network if direct connections fail).

Install Syncthing on the server (Docker)

Before you start: You need Docker and Docker Compose installed. If not, see the Docker Compose basics guide first.

mkdir -p ~/docker/syncthing
cd ~/docker/syncthing

docker-compose.yml:

services:
  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    restart: unless-stopped
    environment:
      PUID: 1000
      PGID: 1000
      TZ: America/New_York
    volumes:
      - ./config:/config
      - ./sync:/sync
    ports:
      - "8384:8384"    # Web UI
      - "22000:22000/tcp"  # Sync protocol
      - "22000:22000/udp"  # Sync discovery
      - "21027:21027/udp"  # Local discovery

The /sync volume is where synced folders will live on the server. You can mount additional paths here or use subdirectories within /sync.

Start it:

docker compose up -d

Access the web UI at http://your-server-ip:8384.

On first access, Syncthing will prompt you to set up a username and password. Do that.

Install Syncthing on your laptop

Your laptop’s Syncthing UI is accessible at http://127.0.0.1:8384.

Pair your devices

On your server’s Syncthing UI:

  1. Go to Devices → Add Remote Device
  2. You need your laptop’s Device ID. Find it in your laptop’s Syncthing UI under Actions → Show ID
  3. Paste the Device ID and give the device a name
  4. Click Save

On your laptop’s Syncthing UI: You’ll see a notification that a new device wants to connect. Accept it.

The devices are now paired. You can see each other in the device list but no folders are shared yet.

Share your first folder

On your laptop:

  1. Click Add Folder
  2. Give it a label (e.g., “Obsidian Vault”) and set the folder path (the actual folder on your laptop you want to sync)
  3. Under Sharing, check your server
  4. Set Folder Type to Send & Receive if you want bidirectional sync
  5. Click Save

On your server: You’ll get a notification that your laptop wants to share a folder. Accept it. Choose where to store it on the server (e.g., /sync/vault).

Syncthing will start syncing immediately. The first sync of a large folder takes time. Subsequent syncs are fast — only changed files transfer.

Configure ignore patterns

By default, Syncthing syncs everything. For some folders you’ll want to exclude things:

In any folder’s settings, click Edit → Ignore Patterns. Common patterns:

// Ignore macOS metadata
.DS_Store
.AppleDouble

// Ignore editor temp files
*.tmp
*.bak

// Ignore Node modules
node_modules/

// Ignore Git objects (just sync the repo, not the git history)
.git/objects/

Conflict handling

When the same file is modified on two devices before they sync, Syncthing creates a conflict copy named filename.sync-conflict-YYYYMMDD-HHMMSS-DEVICEID.ext. It doesn’t silently overwrite.

This is usually the right behavior, but it means you’ll occasionally find conflict files to clean up. For text files, the conflict copy contains the diverged version — you can diff them and keep the right content.

For my Obsidian vault, conflicts are rare (maybe a few times a year) and always resolvable. For collaborative documents, conflicts would be more frequent — use Nextcloud or a similar tool instead.

Making the server always reachable via Tailscale

For sync to work when your laptop is away from home, your server needs to be reachable from outside your network. Tailscale handles this cleanly.

With Tailscale on both devices, Syncthing can sync via the Tailscale network. The connection shows as a direct connection in Syncthing once both devices are on the tailnet.

No extra configuration needed — Syncthing will use whatever network path is available. When at home it connects directly, when away it connects via Tailscale.

Tailscale setup for homelab remote access →

Mobile setup (iOS/Android)

The Syncthing-fork app on Android works well. iOS has Möbius Sync (paid, ~$5, worth it) or Syncthing-iOS (third-party).

On mobile, be selective about which folders you sync and whether you sync on cellular. The settings for “sync on WiFi only” and “sync on charging only” are in the mobile apps — enable them to avoid burning through battery and data.

Adding NPM proxy

For access via HTTPS and a clean hostname, add a proxy host in Nginx Proxy Manager:

Proxy host: syncthing.yourdomain.com → your-server-ip:8384
SSL: Let's Encrypt via Cloudflare DNS challenge

If you’re already running multiple services, a wildcard SSL certificate means you don’t need to request a new cert for every subdomain. One wildcard covers syncthing.yourdomain.com the same as everything else.

Add basic HTTP auth or use Authelia in front of it — the Syncthing web UI doesn’t have robust auth by default. See the Authelia setup guide if you want SSO protection.


Syncthing pairs well with Paperless-ngx — sync a phone folder directly into Paperless’s consume directory for one-tap document filing. For full cloud-style file sync with additional features like photo backup and collaborative documents, Nextcloud AIO is the more complete (and more complex) option.

One thing Syncthing is not: a backup. It syncs changes in both directions, including deletions. If you accidentally delete a folder on your laptop, Syncthing will propagate that deletion to every paired device. Read through the homelab backup strategy for what a real backup layer on top of Syncthing looks like.

See everything running in this homelab at /stack/.