Skip to main content

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.

Learning Focus

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

Syncthing publishes its own apt repository, which ensures you always get the latest stable release.

install-syncthing-debian.sh
# 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

install-syncthing-rhel.sh
# 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:

install-syncthing-manual.sh
# 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 ServiceSystem Service (root)
Runs asA specific user (e.g., www-data, ubuntu)root
Starts onUser loginSystem boot
Best forDesktops, developer machinesAlways-on servers, NAS
Config path~/.local/share/syncthing/root/.local/share/syncthing (messy)
Recommended✅ Yes (most cases)❌ Avoid
warning

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.

note

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:

  1. You should see the default "Sync" folder at ~/Sync (or equivalent).
  2. The status should show "Up to Date" since it's a fresh install with no peers.
  3. Click Actions → Show ID to confirm your Device ID.

On the command line:

# Print your Device ID directly
syncthing --device-id

Common Mistakes

MistakeWhat happensFix
Running as rootConfig stored in /root, security riskUse a dedicated syncthing user
No SSH tunnel to VPSPort 8384 not accessiblessh -L 8384:localhost:8384 user@host
Starting before configuring repositoryDefault ~/Sync folder created with unwanted dataRemove or reconfigure the default folder before adding peers

What's Next