Skip to content

Instantly share code, notes, and snippets.

@pjobson
Last active April 10, 2025 08:43
Show Gist options
  • Select an option

  • Save pjobson/c833bfc3b2f7f53db23486f94be9ab6f to your computer and use it in GitHub Desktop.

Select an option

Save pjobson/c833bfc3b2f7f53db23486f94be9ab6f to your computer and use it in GitHub Desktop.

Revisions

  1. pjobson revised this gist Dec 10, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ Syncthing: https://syncthing.net/

    Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.

    This is written using Linux Mint 18.1 Serena x86_64 using kernel 4.4.0-139-generic.
    This is written using Linux Mint 21.2 x86_64 using kernel 5.15.0-89-generic.

    I couldn't find good directions for doing this, so here we go.

  2. pjobson revised this gist Dec 10, 2023. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -85,6 +85,12 @@ Change to:

    Save and quit.

    ### Optionally Disable the Default Service

    sudo systemctl stop [email protected]
    sudo systemctl disable [email protected]
    sudo rm /lib/systemd/system/[email protected]

    ### Setup the Service

    sudo cp /lib/systemd/system/[email protected] /lib/systemd/system/[email protected]
  3. pjobson revised this gist Dec 10, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -87,7 +87,7 @@ Save and quit.

    ### Setup the Service

    sudo mv /lib/systemd/system/[email protected] /lib/systemd/system/[email protected]
    sudo cp /lib/systemd/system/[email protected] /lib/systemd/system/[email protected]
    sudo systemctl enable [email protected]
    sudo systemctl start [email protected]
    sudo systemctl status [email protected]
  4. pjobson revised this gist Dec 10, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -71,6 +71,8 @@ Here we are going to edit the `syncthing` user config file, you will need to cha

    sudo vi /raidarray/syncthing/.local/state/syncthing/config.xml

    Note they change this path now and then, you can find it with: `find /raidarray/syncthing -type d -name syncthing`

    Look for:

    <gui enabled="true" tls="false" debugging="false">
  5. pjobson revised this gist Dec 10, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -69,7 +69,7 @@ I use `vi` you can use `nano` or whatever editor you like.

    Here we are going to edit the `syncthing` user config file, you will need to change the pathing of course.

    sudo vi /raidarray/syncthing/.config/syncthing/config.xml
    sudo vi /raidarray/syncthing/.local/state/syncthing/config.xml

    Look for:

  6. pjobson revised this gist Aug 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,7 @@ Install `apt-transport-https`

    I don't like to run services from my personal account, I also wanted the user's home directory in a non-standard path. Use whatever path you want or `/home`.

    sudo useradd -m -d /raidarray/syncthing syncthing
    sudo useradd -r -M -d /raidarray/syncthing/ syncthing
    sudo passwd syncthing

    ### Login and Create Config
  7. pjobson revised this gist Mar 22, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@ If you get the following error.

    Install `apt-transport-https`

    sudo apt-get install apt-transport-https
    sudo apt install apt-transport-https

    ## Syncthing User

  8. pjobson revised this gist Mar 22, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,8 @@ I couldn't find good directions for doing this, so here we go.

    ### Install

    sudo apt-get update
    sudo apt-get install syncthing
    sudo apt update
    sudo apt install syncthing

    ### Install `apt-transport-https` If Required

  9. pjobson revised this gist Jan 16, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -12,8 +12,8 @@ I couldn't find good directions for doing this, so here we go.

    ### Add Repos

    curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
    echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
    sudo curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
    sudo echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list

    ### Install

  10. pjobson revised this gist Nov 28, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -39,7 +39,7 @@ Install `apt-transport-https`
    I don't like to run services from my personal account, I also wanted the user's home directory in a non-standard path. Use whatever path you want or `/home`.

    sudo useradd -m -d /raidarray/syncthing syncthing
    sudo passwd useradd
    sudo passwd syncthing

    ### Login and Create Config

  11. pjobson revised this gist Nov 27, 2018. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    # Syncthing Ubuntu/Mint Headless

    Syncthing: https://syncthing.net/

    Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.

    This is written using Linux Mint 18.1 Serena x86_64 using kernel 4.4.0-139-generic.

    I couldn't find good directions for doing this, so here we go.
  12. pjobson created this gist Nov 24, 2018.
    105 changes: 105 additions & 0 deletions syncthing_ubuntu-mint_headless.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,105 @@
    # Syncthing Ubuntu/Mint Headless

    This is written using Linux Mint 18.1 Serena x86_64 using kernel 4.4.0-139-generic.

    I couldn't find good directions for doing this, so here we go.

    ## Install Syncthing

    ### Add Repos

    curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
    echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list

    ### Install

    sudo apt-get update
    sudo apt-get install syncthing

    ### Install `apt-transport-https` If Required

    If you get the following error.

    E: The method driver /usr/lib/apt/methods/https could not be found.
    N: Is the package apt-transport-https installed?
    E: Failed to fetch https://apt.syncthing.net/dists/syncthing/InRelease

    Install `apt-transport-https`

    sudo apt-get install apt-transport-https

    ## Syncthing User

    ### Create User

    I don't like to run services from my personal account, I also wanted the user's home directory in a non-standard path. Use whatever path you want or `/home`.

    sudo useradd -m -d /raidarray/syncthing syncthing
    sudo passwd useradd

    ### Login and Create Config

    Login, I use `su -` you can use whatever.

    sudo su - syncthing

    Run `syncthing`.

    syncthing

    This will display a bunch of status info, just wait for a minute then do `CTRL-C` to force quit it. The goal here is to create the `.config` directory and files.

    Exit back to your regular user.

    exit

    ### Disable Shell

    I don't want syncthing to be able to login, so I change the shell to `/bin/false`.

    sudo usermod --shell /bin/false syncthing

    ### Edit the Config

    I use `vi` you can use `nano` or whatever editor you like.

    Here we are going to edit the `syncthing` user config file, you will need to change the pathing of course.

    sudo vi /raidarray/syncthing/.config/syncthing/config.xml

    Look for:

    <gui enabled="true" tls="false" debugging="false">
    <address>127.0.0.1:8384</address>

    Change to:

    <gui enabled="true" tls="false" debugging="false">
    <address>0.0.0.0:8384</address>

    Save and quit.

    ### Setup the Service

    sudo mv /lib/systemd/system/[email protected] /lib/systemd/system/[email protected]
    sudo systemctl enable [email protected]
    sudo systemctl start [email protected]
    sudo systemctl status [email protected]

    This should output something like:

    [email protected] - Syncthing - Open Source Continuous File Synchronization for syncthing
    Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
    Active: active (running) since Sat 2018-11-24 16:07:43 EST; 29min ago
    Docs: man:syncthing(1)
    Main PID: 22558 (syncthing)
    CGroup: /system.slice/system-syncthing.slice/[email protected]
    └─22558 /usr/bin/syncthing -no-browser -no-restart -logflags=0

    ### Open Web GUI

    You should be able to browse to your syncthing WebGUI now.

    http://hostname:8384

    Login with syncthing and whatever password you set.