Technology Encyclopedia Home >Deploy Syncthing on a Cloud Server for Continuous, Private File Sync Across All Your Devices

Deploy Syncthing on a Cloud Server for Continuous, Private File Sync Across All Your Devices

I have files on three machines: a laptop, a home desktop, and a work machine. For a long time I used cloud storage to keep them in sync — it worked well enough, but I had storage limits, files going through third-party servers, and occasional sync conflicts that took a while to resolve.

Syncthing changed that. It syncs files directly between devices, peer-to-peer, with no intermediary. But "peer-to-peer" gets complicated when one of your devices isn't always online. That's where a cloud server comes in — the VPS stays online 24/7 and acts as a relay node, ensuring your files are always available and in sync even when your laptop is closed.

Here's the setup I've been running for about eight months.

I use Tencent Cloud Lighthouse as the always-on relay node in my Syncthing sync network. The entry-level plan handles this comfortably — Syncthing is efficient and uses minimal resources at idle. What makes Lighthouse a good choice for a sync relay specifically: 99.9%+ uptime means the relay is available when your devices need to sync, even across time zones. The multiple region options also let you choose a data center geographically between your devices if they're in different parts of the world, reducing sync latency.


Table of Contents

  1. Why Syncthing on a Cloud Server?
  2. What You Need
  3. Part 1: Install Syncthing on the Server
  4. Part 2: Configure Web UI Access
  5. Part 3: Install Syncthing on Your Other Devices
  6. Part 4: Connect Devices and Add Shared Folders
  7. Part 5: Configure Sync Behavior
  8. The Thing That Tripped Me Up
  9. Troubleshooting
  10. Final Setup Summary

  • Key Takeaways
  • Use the appropriate Lighthouse application image to skip manual installation steps where available
  • Lighthouse snapshots provide one-click full-server backup before major changes
  • OrcaTerm browser terminal lets you manage the server from any device
  • CBS cloud disk expansion handles growing storage needs without server migration
  • Console-level firewall + UFW = two independent protection layers

Why Syncthing on a Cloud Server? {#why}

Syncthing is a decentralized sync tool — your files go directly between your devices, encrypted, without passing through any company's servers. A VPS in the sync network adds:

  • Always-available relay — even when your laptop is offline, the server has the latest version
  • No storage limits from a third party — limited only by your server's disk
  • Selective sync — sync different folders to different devices with granular control
  • Version history — configurable file versioning to recover deleted or overwritten files
  • Works on LAN and WAN — devices on the same network sync directly without going through the server

The architecture: your cloud server acts as a "always-on" peer. Your laptop syncs to it when you're away. Your desktop syncs to it when the laptop is off. Everything stays consistent.


What You Need {#prerequisites}

Item Details
Cloud server Ubuntu 22.04, 1+ GB RAM
Devices to sync Any combination: Linux, Windows, macOS, Android, iOS
Open port 22000/tcp (Syncthing sync protocol)
Disk space Depends on your data — plan accordingly

Part 1: Install Syncthing on the Server {#part-1}

1.1 — Add the Syncthing Repository

sudo apt install -y curl gpg
curl -s https://syncthing.net/release-key.txt | gpg --dearmor | sudo tee /usr/share/keyrings/syncthing-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install -y syncthing

1.2 — Create a systemd Service

Run Syncthing as your regular user (replace ubuntu with your username):

sudo systemctl enable syncthing@ubuntu
sudo systemctl start syncthing@ubuntu

Check it's running:

sudo systemctl status syncthing@ubuntu

1.3 — Open the Sync Port in Your Firewall

sudo ufw allow 22000/tcp
sudo ufw allow 22000/udp
sudo ufw reload

Also open port 22000 in your Lighthouse console firewall rules.


Part 2: Configure Web UI Access {#part-2}

By default, Syncthing's web UI listens on 127.0.0.1:8384 — only accessible locally. We'll use an SSH tunnel to access it securely.

2.1 — Access Via SSH Tunnel

On your local machine:

ssh -L 8384:localhost:8384 ubuntu@YOUR_SERVER_IP

Now open http://localhost:8384 in your browser. You'll see the Syncthing web UI.

2.2 — Set an Admin Password

On first launch, Syncthing warns that authentication is not configured.

Go to Actions → Settings → GUI tab:

  • Set a GUI Authentication User (e.g., admin)
  • Set a strong GUI Authentication Password
  • Click Save

2.3 — Note Your Device ID

On the main screen, click Actions → Show ID. Copy the long alphanumeric string — this is your server's Device ID. You'll need it when connecting other devices.


Part 3: Install Syncthing on Your Other Devices {#part-3}

Download Syncthing for each device:

Platform Download
Windows syncthing.net/downloads — Syncthing Windows installer
macOS brew install syncthing or download from website
Ubuntu/Debian Same apt steps as above
Android F-Droid or Play Store: search "Syncthing"
iOS "Möbius Sync" on App Store (third-party client)

On each device, start Syncthing and note the device ID from Actions → Show ID.


Part 4: Connect Devices and Add Shared Folders {#part-4}

4.1 — Add the Server as a Remote Device (From Your Laptop)

In Syncthing on your laptop:

  1. Click Add Remote Device
  2. Enter your server's Device ID
  3. Give it a name: VPS Server
  4. Click Save

The server's Syncthing will show a pending request — accept it in the server's web UI.

Do the same to connect your desktop and any other devices to the server.

4.2 — Add a Shared Folder

In Syncthing on your laptop:

  1. Click Add Folder
  2. Set the Folder Path: /home/yourname/Documents
  3. Give it a Folder Label: Documents
  4. Under Sharing, check the box for your VPS Server (and desktop if desired)
  5. Click Save

On the server's web UI, a notification appears: "Device 'Laptop' wants to share folder 'Documents'". Accept it and set the local path: /home/ubuntu/sync/Documents

Initial sync begins. Time depends on folder size.

4.3 — Connect Desktop to the Same Folder

On your desktop, add the same folder via Add Folder. Use a different Folder ID or the same label. When prompted to share with the VPS Server, accept.

Now all three devices share the folder. The server relays changes between devices.


Part 5: Configure Sync Behavior {#part-5}

5.1 — File Versioning (Recover Deleted Files)

In each folder settings → File Versioning tab:

  • Staggered File Versioning: keeps versions at increasing intervals (1 hour, 1 day, 1 week, 1 month)
  • Good default for most use cases

On the server (more disk space), set retention to 365 days. On laptops, 30 days saves local storage.

5.2 — Folder Type

On the server, consider setting the folder type to "Receive Only" if you don't want files modified on the server directly:

Folder Settings → AdvancedFolder Type: Receive Only

This means the server only receives changes from your devices and never pushes changes back. Useful if you treat the server as a backup relay.

5.3 — Ignore Patterns

To skip temporary files and system files:

In Folder Settings → Ignore Patterns:

.DS_Store
Thumbs.db
*.tmp
*.swp
~$*

The Thing That Tripped Me Up {#gotcha}

Syncthing on the server was running perfectly, but my laptop and desktop weren't syncing directly with each other — everything was going through the server, even when both were on the same home network.

The reason: I had configured both devices to share folders only with the server, not with each other directly. Syncthing needs explicit connections between each device pair to do direct (local) sync.

The fix: In Syncthing on each device, add the other devices via Add Remote Device, not just the server. Once devices know about each other, Syncthing automatically detects when they're on the same local network and syncs directly without routing through the server.

Result: fast local sync at home, and the server handles sync when devices are in different locations.


Troubleshooting {#troubleshooting}

Issue Likely Cause Fix
Devices can't connect Port 22000 blocked Check UFW and Lighthouse firewall rules
"Relay connection only" Devices can't reach each other directly Normal behavior when on different networks — still works
High CPU on server Many large files syncing simultaneously Use Rate Limiting in Settings to cap bandwidth
Files not syncing Folder out of sync Check for conflicts under Out of Sync items in folder
Conflict files appearing Same file edited on two devices simultaneously Syncthing creates .sync-conflict- copies — review and delete one
Permission errors Wrong file permissions Set folder ownership: chown -R ubuntu:ubuntu /home/ubuntu/sync
Web UI not accessible Not using SSH tunnel Use ssh -L 8384:localhost:8384 ubuntu@IP

Final Setup Summary {#verdict}

After 8 months:

Metric Experience
Sync reliability Excellent — changes appear within seconds on LAN, minutes over WAN
Data usage Minimal — only changed blocks are transferred (not full files)
Server load Very low — Syncthing uses negligible CPU at rest
Privacy Complete — end-to-end encrypted, no third-party involvement
Setup time ~45 minutes for 3 devices
Ongoing maintenance Near zero — apt upgrade syncthing occasionally

Summary — What You Built

  • Always-on relay node on your cloud server
  • Encrypted, peer-to-peer sync across all devices
  • No file size limits (only disk capacity)
  • Staggered file versioning for accidental deletion recovery
  • Automatic LAN detection for fast local sync
  • Works across Linux, Windows, macOS, and Android

Frequently Asked Questions {#faq}

How is Syncthing different from cloud storage services?
Syncthing syncs files peer-to-peer between devices without going through a central company's servers. Your data doesn't live on a third party's infrastructure. The cloud server acts as an always-on peer, not a storage service.

Does Syncthing sync happen in real time?
Near-real-time. Changes are detected and synced within a few seconds on the same network. Over the internet, it depends on network latency and file size.

How do I handle sync conflicts when the same file is edited on two devices?
Syncthing creates conflict copies rather than silently overwriting. You'll see files like filename.sync-conflict-YYYYMMDD-.... Review and merge them manually.

Can I sync selectively — only specific folders?
Yes. Configure which folders are shared with which devices. Not every folder needs to sync to every device.

Is there a file size limit for Syncthing?
No built-in limit. Performance with very large files depends on your network bandwidth and the file size. Very large files (>100 GB) may take significant time to sync initially.

👉 Get started with Tencent Cloud Lighthouse
👉 View current pricing and launch promotions
👉 Explore all active deals and offers