AlmaLinuxRHEL Based

How To Install Syncthing on AlmaLinux 10

Install Syncthing on AlmaLinux 10

Syncthing represents a powerful, open-source file synchronization solution that enables secure, peer-to-peer data sharing across multiple devices without relying on centralized cloud services. This comprehensive guide walks you through installing and configuring Syncthing on AlmaLinux 10, providing detailed instructions for both novice and experienced system administrators.

AlmaLinux 10 offers exceptional stability and enterprise-grade security features, making it an ideal platform for deploying Syncthing in production environments. Whether you’re managing personal files or coordinating data across enterprise systems, this tutorial ensures successful implementation with proper security configurations.

By following this guide, you’ll master two installation methods, configure system services, implement security best practices, and troubleshoot common issues. The result will be a robust, secure file synchronization system that maintains data integrity while providing seamless access across your network infrastructure.

Prerequisites and System Requirements

Before beginning the Syncthing installation process, ensure your AlmaLinux 10 system meets the necessary requirements. Your system should have at least 512 MB of RAM, though 1 GB or more is recommended for optimal performance when synchronizing large file collections.

The installation requires a non-root user account with sudo privileges configured properly. If you haven’t created this account yet, use the following commands:

sudo adduser syncthing-admin
sudo usermod -aG wheel syncthing-admin

Network connectivity is essential for device communication and initial setup. Syncthing utilizes port 8384 for web interface access and port 22000 for device synchronization. Your system should have internet access for downloading packages and establishing initial device connections.

SELinux should be configured appropriately, either in enforcing mode with proper policies or temporarily set to permissive during initial setup. Check your current SELinux status:

sestatus

Ensure your AlmaLinux 10 system is fully updated before proceeding:

sudo dnf update -y

You’ll need at least two devices for testing synchronization functionality. These can include other Linux systems, Windows computers, Android devices, or macOS machines, all supporting Syncthing installations.

Understanding Syncthing Architecture

Syncthing operates on a decentralized, peer-to-peer architecture that eliminates the need for centralized servers or cloud storage providers. Each device participating in synchronization maintains its own unique device identifier and establishes direct connections with other authorized devices.

The synchronization process utilizes advanced encryption protocols, including TLS for transport security and AES encryption for data protection. This ensures that your files remain secure during transmission and storage, with end-to-end encryption preventing unauthorized access even if network traffic is intercepted.

Device discovery occurs through multiple mechanisms, including local network broadcasts, global discovery servers, and relay servers for devices behind NAT or firewalls. When direct connections aren’t possible, Syncthing automatically utilizes relay servers to facilitate communication while maintaining security.

Syncthing supports various folder sharing modes, including send-only, receive-only, and bidirectional synchronization. This flexibility allows you to configure different synchronization behaviors based on your specific requirements, whether you’re creating backups, distributing content, or maintaining synchronized working directories.

The system monitors file changes in real-time using efficient filesystem watching mechanisms. When modifications occur, Syncthing calculates block-level differences and transmits only changed portions, minimizing bandwidth usage and accelerating synchronization processes.

Network protocols include TCP for reliable data transfer and QUIC for improved performance over unreliable connections. The system automatically selects optimal protocols based on network conditions and device capabilities.

Installation Methods Overview

AlmaLinux 10 supports multiple Syncthing installation approaches, each offering distinct advantages depending on your environment and requirements. The EPEL repository method provides simplified package management with automatic dependency resolution and streamlined updates through the standard package management system.

Manual binary installation offers access to the latest releases directly from the Syncthing development team. This method ensures you’re running the most current version with the latest features and security improvements, though it requires manual update management.

Package management considerations include integration with system monitoring tools, automatic security updates, and compatibility with configuration management systems. EPEL installation integrates seamlessly with DNF package management, while manual installation provides greater control over version selection and upgrade timing.

Version control strategies vary between methods. EPEL installations receive updates through the standard AlmaLinux update cycle, which may introduce slight delays but ensures stability. Manual installations allow immediate access to new releases but require proactive monitoring for security updates.

Choose the EPEL method for production environments requiring stability and standardized update procedures. Select manual installation for development environments or when you need specific versions with particular features or bug fixes.

Method 1: Installing via EPEL Repository

Enabling EPEL Repository

The Extra Packages for Enterprise Linux (EPEL) repository provides additional packages not included in the standard AlmaLinux repositories. Begin by updating your system to ensure all existing packages are current:

sudo dnf update -y

Install the EPEL repository configuration package:

sudo dnf install epel-release -y

Verify EPEL repository installation and configuration:

sudo dnf repolist | grep epel

The output should display enabled EPEL repositories, confirming successful installation. Update repository metadata to ensure access to the latest package information:

sudo dnf makecache

Package Installation

Search for available Syncthing packages in the EPEL repository:

dnf search syncthing

Install Syncthing using the DNF package manager:

sudo dnf install syncthing -y

The installation process automatically resolves dependencies and installs required components. Verify successful installation by checking the installed version:

syncthing --version

This command should display Syncthing version information, confirming proper installation. The EPEL package includes systemd service files and default configuration templates for immediate use.

Advantages and Limitations

EPEL repository installation provides automatic update capabilities through the standard DNF update process. Security updates and bug fixes are applied automatically during system maintenance windows, ensuring your Syncthing installation remains secure and stable.

Simplified dependency management eliminates manual library installation and configuration. The package manager handles all required dependencies, preventing compatibility issues and ensuring proper system integration.

However, EPEL versions may lag behind official releases by several weeks or months. Critical security updates typically receive priority treatment, but new features and enhancements may experience delays.

Integration with system package management enables compatibility with configuration management tools like Ansible, Puppet, or Salt. This facilitates automated deployments and standardized configurations across multiple systems.

Method 2: Manual Binary Installation

Downloading Latest Release

Navigate to the Syncthing GitHub releases page to identify the latest stable release. For AlmaLinux 10 x86_64 systems, download the linux-amd64 architecture package:

cd /tmp
curl -s https://api.github.com/repos/syncthing/syncthing/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -i -

Verify the downloaded archive integrity using SHA256 checksums when available:

curl -s https://api.github.com/repos/syncthing/syncthing/releases/latest | grep -A 1 "linux-amd64.*sha256" | tail -1 | cut -d '"' -f 4 > syncthing.sha256
sha256sum -c syncthing.sha256

For security-conscious environments, verify GPG signatures when provided by the Syncthing development team. Import the official signing key and verify archive signatures before proceeding with installation.

Alternative download methods include using wget with specific URLs or utilizing package management tools that support direct binary installations from remote sources.

Installation Process

Extract the downloaded archive to a temporary location:

tar -xzf syncthing-linux-amd64-*.tar.gz

Copy the Syncthing binary to a system-wide executable directory:

sudo cp syncthing-linux-amd64-*/syncthing /usr/local/bin/

Set appropriate permissions on the binary file:

sudo chmod +x /usr/local/bin/syncthing

Create symbolic links for system-wide access if necessary:

sudo ln -sf /usr/local/bin/syncthing /usr/bin/syncthing

Verify PATH configuration includes the installation directory. Most systems automatically include /usr/local/bin in the default PATH, but custom configurations may require manual adjustment.

Version Verification

Confirm successful installation by checking the Syncthing version:

syncthing --version

Test basic functionality with the help command:

syncthing --help

Verify all required dependencies are available by attempting to start Syncthing in generation mode:

syncthing -generate /tmp/test-config

This command creates a test configuration directory, confirming that Syncthing can access necessary system resources and generate required configuration files.

If installation issues occur, verify system architecture compatibility and ensure all required system libraries are installed. Common problems include missing glibc versions or incompatible processor architectures.

System Service Configuration

Creating System User

Create a dedicated system user for running Syncthing services, enhancing security by avoiding root execution:

sudo useradd -r -s /bin/false -m -d /var/lib/syncthing syncthing

This command creates a system user with no shell access and a home directory in /var/lib/syncthing. The user account is configured for service execution only, preventing interactive login capabilities.

Set appropriate ownership and permissions on the Syncthing home directory:

sudo chown syncthing:syncthing /var/lib/syncthing
sudo chmod 750 /var/lib/syncthing

Generate initial Syncthing configuration as the syncthing user:

sudo -u syncthing syncthing -generate /var/lib/syncthing/.config/syncthing

Systemd Service Setup

Create a systemd service unit file for automatic Syncthing startup and management:

sudo tee /etc/systemd/system/syncthing@.service > /dev/null <

This comprehensive service configuration includes security hardening options that restrict system access and implement sandboxing policies. The service automatically restarts on failure and logs output to the system journal.

Reload systemd configuration to recognize the new service:

sudo systemctl daemon-reload

Service Management

Enable the Syncthing service for the syncthing user:

sudo systemctl enable syncthing@syncthing.service

Start the service and verify successful startup:

sudo systemctl start syncthing@syncthing.service
sudo systemctl status syncthing@syncthing.service

Monitor service logs for any startup issues or error messages:

sudo journalctl -u syncthing@syncthing.service -f

The service should start successfully and display initialization messages. If errors occur, examine log output for specific error descriptions and resolution guidance.

Configure automatic startup at system boot time by verifying the enable status:

sudo systemctl is-enabled syncthing@syncthing.service

Firewall and Network Configuration

AlmaLinux 10 includes firewalld as the default firewall management system. Configure required firewall rules to allow Syncthing communication:

sudo firewall-cmd --permanent --add-port=8384/tcp
sudo firewall-cmd --permanent --add-port=22000/tcp
sudo firewall-cmd --permanent --add-port=22000/udp
sudo firewall-cmd --reload

These commands open port 8384 for web interface access and port 22000 for device synchronization. The permanent flag ensures rules persist across system reboots.

For enhanced security, restrict web interface access to specific IP addresses or network ranges:

sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="8384" accept'
sudo firewall-cmd --reload

Verify firewall configuration and active rules:

sudo firewall-cmd --list-all

Network interface binding configuration restricts Syncthing web interface access to specific network interfaces. This prevents unauthorized access from unintended network segments while maintaining functionality for authorized users.

For systems with multiple network interfaces, consider binding the web interface to internal networks only. Modify the systemd service ExecStart parameter to specify interface binding:

-gui-address="192.168.1.100:8384"

Test network connectivity between devices using telnet or nc commands:

telnet target-device-ip 22000

Successful connections indicate proper firewall configuration and network accessibility.

Initial Configuration and Web Interface Access

First-Time Setup

Access the Syncthing web interface by opening a browser and navigating to:

http://localhost:8384

For remote access (if configured), use the appropriate IP address:

http://your-server-ip:8384

The initial startup displays security warnings regarding unencrypted connections and default configurations. These warnings are normal for new installations and indicate areas requiring immediate attention.

Install Syncthing on AlmaLinux 10

Syncthing automatically creates a default folder for synchronization, typically located at ~/Sync. This folder serves as a starting point for file sharing and can be modified or removed based on your requirements.

Navigate through the web interface to familiarize yourself with the layout and available options. The main dashboard displays device information, folder status, and synchronization statistics.

Security Configuration

Implement authentication for web interface access by clicking Settings > GUI and configuring username/password authentication:

  1. Enable “Use HTTPS for GUI”
  2. Set “GUI Authentication User” and “GUI Authentication Password”
  3. Configure “GUI Listen Address” for specific interface binding

For production deployments, generate and install proper SSL certificates:

sudo openssl req -x509 -newkey rsa:4096 -keyout /var/lib/syncthing/.config/syncthing/https-key.pem -out /var/lib/syncthing/.config/syncthing/https-cert.pem -days 365 -nodes
sudo chown syncthing:syncthing /var/lib/syncthing/.config/syncthing/https-*.pem

API key management ensures secure programmatic access to Syncthing functionality. Locate the API key in Settings > General and store it securely for future use with automation scripts or monitoring tools.

Configure session timeout and security policies based on your organizational requirements. Shorter timeout periods enhance security but may impact user experience in interactive environments.

Device Pairing and Folder Configuration

Device Discovery and Connection

Each Syncthing installation generates a unique device identifier displayed in the web interface under Actions > Show ID. This identifier enables secure device pairing and authentication.

Add remote devices by navigating to Actions > Add Device and entering the target device identifier. Configure device name, addresses, and compression settings based on network characteristics and performance requirements.

Device verification occurs through certificate exchange and manual confirmation. Both devices must approve the connection before synchronization begins, preventing unauthorized access and ensuring secure communication.

Monitor connection status in the main dashboard. Successfully connected devices display “Connected” status with recent activity timestamps. Connection failures require troubleshooting network connectivity and firewall configurations.

For devices behind NAT or restrictive firewalls, configure relay servers in Settings > Connections. Enable “Global Discovery” and “Relay Servers” to facilitate connections through Syncthing’s infrastructure servers.

Folder Sharing Setup

Create shared folders by clicking “Add Folder” and configuring the following settings:

  1. Folder Label: Descriptive name for identification
  2. Folder Path: Local filesystem location for synchronized files
  3. Folder Type: Send Only, Receive Only, or Send & Receive
  4. File Versioning: Backup strategies for file conflicts and deletions

Advanced folder configuration includes ignore patterns using .stignore files. These patterns exclude specific files or directories from synchronization:

# Ignore temporary files
*.tmp
*.temp

# Ignore system directories
.DS_Store
Thumbs.db

# Ignore large media files
*.iso
*.dmg

Device selection determines which devices receive shared folders. Individual folder sharing provides granular control over data distribution and access permissions.

Permission management ensures proper filesystem access for the syncthing user. Verify read/write permissions on all shared directories:

sudo chown -R syncthing:syncthing /path/to/shared/folder
sudo chmod -R 755 /path/to/shared/folder

Advanced Configuration and Optimization

Performance tuning optimizes Syncthing behavior for specific environments and use cases. Modify scanning intervals for large folder structures to reduce system load:

<folder id="default" label="Default Folder" path="/var/lib/syncthing/Sync" type="sendreceive" rescanIntervalS="3600">

Large file handling benefits from adjusted block sizes and bandwidth limitations. Configure maximum send/receive rates in Settings > Connections to prevent network saturation:

Max Send Kbps: 10000
Max Recv Kbps: 10000

Versioning strategies protect against accidental deletions and file corruption. Configure appropriate versioning methods:

  • Trash Can: Moves deleted files to .stversions folder
  • Simple: Keeps specified number of old versions
  • Staggered: Implements time-based version retention
  • External: Utilizes custom versioning scripts

Advanced networking options include custom relay servers and discovery servers for enhanced privacy and performance. Configure private relay infrastructure for organizational deployments requiring complete control over network traffic.

Backup strategies should encompass both Syncthing configuration and synchronized data. Regular configuration backups enable rapid disaster recovery:

sudo tar -czf syncthing-config-backup.tar.gz /var/lib/syncthing/.config/syncthing/

Integration with monitoring systems provides operational visibility and alerting capabilities. Configure log forwarding to centralized logging systems and implement health checks for service availability.

Security Best Practices

Network security implementation requires careful consideration of access controls and encryption settings. Disable unnecessary services and restrict network access to essential ports only.

Authentication hardening includes strong password policies and regular credential rotation. Consider implementing two-factor authentication through reverse proxy configurations for high-security environments.

Regular security updates maintain protection against emerging threats. Establish automated update procedures for both EPEL and manual installations:

# For EPEL installations
sudo dnf update syncthing

# For manual installations
curl -s https://api.github.com/repos/syncthing/syncthing/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -O syncthing-latest.tar.gz -i -

Monitoring and logging configuration enables threat detection and incident response capabilities. Configure comprehensive logging and regular log analysis:

sudo journalctl -u syncthing@syncthing.service --since "1 hour ago"

Backup and disaster recovery planning protects against data loss and system failures. Implement automated backup procedures and test recovery capabilities regularly.

Compliance considerations for enterprise environments may require additional security controls, audit logging, and data handling procedures. Consult organizational security policies and regulatory requirements when implementing Syncthing in business environments.

Troubleshooting Common Issues

Connection problems between devices often result from firewall restrictions or network configuration issues. Verify firewall rules and network connectivity:

sudo ss -tlnp | grep :22000
sudo firewall-cmd --list-ports

Permission and ownership problems prevent proper file access and synchronization. Verify filesystem permissions and SELinux contexts:

ls -la /var/lib/syncthing/
sudo restorecon -R /var/lib/syncthing/

Service startup failures require examination of system logs and configuration files:

sudo systemctl status syncthing@syncthing.service -l
sudo journalctl -xe

Performance issues may indicate insufficient system resources or suboptimal configuration. Monitor system resource utilization and adjust Syncthing settings accordingly:

htop
iostat -x 1

Configuration corruption recovery involves restoring from backups or regenerating default configurations:

sudo systemctl stop syncthing@syncthing.service
sudo mv /var/lib/syncthing/.config/syncthing /var/lib/syncthing/.config/syncthing.backup
sudo -u syncthing syncthing -generate /var/lib/syncthing/.config/syncthing
sudo systemctl start syncthing@syncthing.service

Log analysis provides detailed information about synchronization issues and system behavior. Enable debug logging for detailed troubleshooting:

sudo systemctl edit syncthing@syncthing.service

Add the following content:

[Service]
Environment=STNOUPGRADE=1
Environment=STDEBUGGING=1

Maintenance and Updates

Regular update procedures ensure security and functionality improvements. For EPEL installations, include Syncthing in regular system updates:

sudo dnf update

Manual installation updates require downloading and installing new versions:

# Download latest version
cd /tmp
curl -s https://api.github.com/repos/syncthing/syncthing/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -i -

# Stop service
sudo systemctl stop syncthing@syncthing.service

# Install new version
tar -xzf syncthing-linux-amd64-*.tar.gz
sudo cp syncthing-linux-amd64-*/syncthing /usr/local/bin/

# Start service
sudo systemctl start syncthing@syncthing.service

Configuration backup strategies protect against update-related issues and configuration loss:

#!/bin/bash
BACKUP_DIR="/var/backups/syncthing"
DATE=$(date +%Y%m%d_%H%M%S)

sudo mkdir -p "$BACKUP_DIR"
sudo tar -czf "$BACKUP_DIR/syncthing-config-$DATE.tar.gz" /var/lib/syncthing/.config/syncthing/

System health monitoring detects issues before they impact synchronization:

# Check service status
sudo systemctl is-active syncthing@syncthing.service

# Monitor disk usage
df -h /var/lib/syncthing/

# Check log errors
sudo journalctl -u syncthing@syncthing.service | grep -i error

Log rotation prevents disk space exhaustion from extensive logging:

sudo tee /etc/logrotate.d/syncthing > /dev/null <

Security patch management requires monitoring for security advisories and applying updates promptly. Subscribe to Syncthing security mailing lists and monitor GitHub security advisories for important updates.

Congratulations! You have successfully installed Syncthing. Thanks for using this tutorial for installing Syncthing on the AlmaLinux OS 10 system. For additional help or useful information, we recommend you check the official Syncthing website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button