Skip to content

Instantly share code, notes, and snippets.

@k3karthic
Last active October 20, 2025 22:21
Show Gist options
  • Save k3karthic/d094e5078adf3efd13f9cc1e8cc83f0d to your computer and use it in GitHub Desktop.
Save k3karthic/d094e5078adf3efd13f9cc1e8cc83f0d to your computer and use it in GitHub Desktop.
Fedora Silverblue - Syncthing

Step 1 : Create toolbox container for Syncthing

toolbox create -d ubuntu --release 24.04 -c syncthing
toolbox enter syncthing
~/bin/run-container-playbooks.sh
exit

Step 2 : Create systemctl service

sudo loginctl enable-linger $(whoami)
mkdir -p ~/.config/systemd/user/
cat << EOF > ~/.config/systemd/user/syncthing-toolbox.service
[Unit]
Description=Syncthing running in a toolbox
After=network.target toolbox.service

[Service]
ExecStart=toolbox run -c syncthing sh -c "syncthing --no-browser"
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable syncthing-toolbox.service
systemctl --user start syncthing-toolbox.service

Step 3 : (Optional) Allow remote access to GUI

sudo firewall-cmd --zone=public --add-port=8384/tcp --permanent
sudo firewall-cmd --reload
---
- name: Install Syncthing
hosts: localhost
connection: local
become: yes
tasks:
- name: Ensure the APT keyrings directory exists
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: '0755'
- name: Add Syncthing's GPG key
ansible.builtin.get_url:
url: https://syncthing.net/release-key.gpg
dest: /etc/apt/keyrings/syncthing-archive-keyring.gpg
mode: '0644'
force: true
- name: Add the Syncthing repository
ansible.builtin.apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2"
filename: syncthing
state: present
- name: Install Syncthing package
ansible.builtin.apt:
name: syncthing
state: present
update_cache: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment