Why Use Syncthing on a VPS?
Key Benefits:
- • Always-On: VPS runs 24/7, syncing even when devices are offline
- • Central Hub: Acts as relay for all your devices
- • Backup Repository: Complete copy on reliable storage
- • Privacy First: End-to-end TLS encryption
No Vendor Lock-in:
- • Open-source with no subscription fees
- • No storage limitations
- • Your data never touches third-party servers
- • Complete control over your files
Prerequisites
Before getting started, ensure you have:
Server Requirements
- • RamNode VPS with Ubuntu 22.04 or 24.04
- • Root or sudo access
- • SSH client for remote access
- • Domain name (optional, for web GUI)
Resource Requirements
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 512 MB | 1 GB+ |
| CPU | 1 vCPU | 2 vCPU |
| Storage | 1 GB | 10+ GB SSD |
Installation
Install Syncthing via the official APT repository for the latest stable releases:
sudo apt update && sudo apt upgrade -y# Add the release PGP keys
sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg \
https://syncthing.net/release-key.gpg
# Add the stable channel repository
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] \
https://apt.syncthing.net/ syncthing stable" | \
sudo tee /etc/apt/sources.list.d/syncthing.listsudo apt update
sudo apt install syncthing -ysyncthing --version✅ You should see output similar to: syncthing v1.27.x
Creating a Dedicated User
For security, run Syncthing under a dedicated non-root user account:
# Create the syncthing user
sudo useradd -m -s /bin/bash syncthing
# Create the sync directory
sudo mkdir -p /home/syncthing/Sync
sudo chown -R syncthing:syncthing /home/syncthing💡 Security: Running services as non-root users limits potential damage from security vulnerabilities.
Systemd Service Configuration
Configure Syncthing to run as a systemd service for automatic startup:
# Enable the service to start on boot
sudo systemctl enable syncthing@syncthing.service
# Start the service
sudo systemctl start syncthing@syncthing.service
# Check status
sudo systemctl status syncthing@syncthing.serviceService Management Commands
| Command | Description |
|---|---|
systemctl start syncthing@syncthing | Start the service |
systemctl stop syncthing@syncthing | Stop the service |
systemctl restart syncthing@syncthing | Restart the service |
journalctl -u syncthing@syncthing -f | View live logs |
Configuring Remote Access
By default, Syncthing's web GUI only listens on localhost (127.0.0.1:8384). To access it remotely:
Option 1: SSH Tunnel (Recommended)
The most secure method is to use an SSH tunnel from your local machine:
ssh -L 8384:127.0.0.1:8384 user@your-vps-ipThen access the GUI at: http://127.0.0.1:8384
Security Configuration
Set GUI Authentication
Always enable password authentication for the web GUI. Access the interface and navigate to Actions → Settings → GUI. Configure a strong username and password.
Configure Firewall Rules
# Enable UFW if not already active
sudo ufw enable
# Allow SSH (important!)
sudo ufw allow 22/tcp
# Allow Syncthing sync protocol
sudo ufw allow 22000/tcp
sudo ufw allow 22000/udp
# Allow local discovery (optional)
sudo ufw allow 21027/udp
# Allow GUI access (only if not using SSH tunnel)
sudo ufw allow 8384/tcp
# Verify rules
sudo ufw status verbosePort Reference
| Port | Protocol | Purpose |
|---|---|---|
| 8384 | TCP | Web GUI (HTTPS) |
| 22000 | TCP/UDP | Sync Protocol |
| 21027 | UDP | Local Discovery |
Reverse Proxy with Nginx (Optional)
For production environments, use Nginx as a reverse proxy with Let's Encrypt SSL:
sudo apt install nginx certbot python3-certbot-nginx -ysudo nano /etc/nginx/sites-available/syncthingAdd the following configuration:
server {
listen 80;
server_name sync.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:8384;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}sudo ln -s /etc/nginx/sites-available/syncthing /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
# Obtain SSL certificate
sudo certbot --nginx -d sync.yourdomain.comAdding Devices and Folders
Finding Your Device ID
Each Syncthing installation has a unique Device ID:
- Access the web GUI at https://your-server:8384 (or via SSH tunnel)
- Click Actions → Show ID
- The Device ID is displayed as a QR code and alphanumeric string
sudo -u syncthing syncthing --device-idAdding a Remote Device
- In the web GUI, click "Add Remote Device"
- Enter the Device ID from your other computer/device
- Give it a friendly name (e.g., "Work Laptop")
- Click Save
- On the remote device, accept the connection request
Creating a Shared Folder
- Click "Add Folder" in the web GUI
- Set a Folder Label (display name) and Folder ID (unique identifier)
- Set the Folder Path (e.g.,
/home/syncthing/Sync/Documents) - Under "Sharing", select which devices should sync this folder
- Configure versioning and other options as needed
Advanced Configuration
Troubleshooting
Viewing Logs
# System logs
sudo journalctl -u syncthing@syncthing -f
# Syncthing's own log file
tail -f /home/syncthing/.local/state/syncthing/syncthing.logBest Practices
- • Enable versioning: Use at least "Trash Can" versioning to recover from accidental deletions
- • Use SSH tunnels: Prefer SSH tunnels over exposing the GUI publicly
- • Strong authentication: Set a strong GUI password and consider disabling the API
- • Regular backups: Syncing is not a backup; maintain separate backup procedures
- • Monitor disk space: Set up alerts for low disk space on your VPS
- • Keep updated: Regularly update via apt to get security patches
- • Use introducer devices: Configure your VPS as an introducer to simplify adding new devices
Congratulations!
You now have a fully functional Syncthing instance running on your RamNode VPS. This setup provides you with a private, secure, and always-available file synchronization hub that you fully control.
Key Takeaways:
- • Your data never touches third-party servers
- • All connections are encrypted with TLS
- • Complete control over which devices can access your files
- • VPS acts as a reliable always-on node for continuous sync
