Install and First Run
This lesson walks you through installing Syncthing on a Linux server or desktop and getting it running for the first time.
Understand the difference between running Syncthing as a user service (for a desktop) versus a system service (for a server), and why that choice matters.
Installation
Debian / Ubuntu (Recommended Method)
Syncthing publishes its own apt repository, which ensures you always get the latest stable release.
# 1) Add the release signing key
sudo mkdir -p /etc/apt/keyrings
curl -L -o /tmp/syncthing-release-key.gpg https://syncthing.net/release-key.gpg
sudo gpg --dearmor -o /etc/apt/keyrings/syncthing-archive-keyring.gpg /tmp/syncthing-release-key.gpg
# 2) 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.list
# 3) Install
sudo apt update
sudo apt install syncthing -y
# 4) Verify
syncthing --version
RHEL / AlmaLinux / Fedora
# Add the COPR repository
sudo dnf copr enable daftaupe/syncthing -y
sudo dnf install syncthing -y
# Verify
syncthing --version
Manual (Any Linux)
Download the binary directly from the official release page:
# Set the desired version
VERSION="1.27.8"
ARCH="linux-amd64"
curl -L "https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-${ARCH}-v${VERSION}.tar.gz" \
-o /tmp/syncthing.tar.gz
tar -xzf /tmp/syncthing.tar.gz -C /tmp
sudo mv /tmp/syncthing-${ARCH}-v${VERSION}/syncthing /usr/local/bin/syncthing
sudo chmod +x /usr/local/bin/syncthing
User Service vs System Service
This is the most important decision for any server deployment.
| User Service | System Service (root) | |
|---|---|---|
| Runs as | A specific user (e.g., www-data, ubuntu) | root |
| Starts on | User login | System boot |
| Best for | Desktops, developer machines | Always-on servers, NAS |
| Config path | ~/.local/share/syncthing | /root/.local/share/syncthing (messy) |
| Recommended | ✅ Yes (most cases) | ❌ Avoid |
Never run Syncthing as root unless you have a compelling reason. Use a dedicated system user with a systemd service instead.
First Run (Interactive)
To confirm Syncthing works before setting it up as a service:
# Run Syncthing (foreground, this will open the web GUI)
syncthing
Expected output:
[XXXXX] 09:00:00 INFO: syncthing v1.27.8 "Fermium Flea" (go1.22 linux-amd64) ...
[XXXXX] 09:00:01 INFO: My ID: K3X2R...
[XXXXX] 09:00:01 INFO: GUI and API listening on 127.0.0.1:8384
[XXXXX] 09:00:01 INFO: Loading HTTPS certificate
Note your My ID — this is your Device ID. You'll share this with peers.
On a remote VPS, Syncthing binds to 127.0.0.1:8384 by default (localhost only). To access the GUI, use an SSH tunnel:
ssh -L 8384:localhost:8384 user@your-vps-ip
# Then open http://localhost:8384 in your browser
Verify the Installation
In the GUI:
- You should see the default "Sync" folder at
~/Sync(or equivalent). - The status should show "Up to Date" since it's a fresh install with no peers.
- Click Actions → Show ID to confirm your Device ID.
On the command line:
# Print your Device ID directly
syncthing --device-id
Common Mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Running as root | Config stored in /root, security risk | Use a dedicated syncthing user |
| No SSH tunnel to VPS | Port 8384 not accessible | ssh -L 8384:localhost:8384 user@host |
| Starting before configuring repository | Default ~/Sync folder created with unwanted data | Remove or reconfigure the default folder before adding peers |