[HowTo] Install and use SyncThing on OSMC


UPDATE: you can now semi-automatically install Syncthing.

This will install SyncThing and configure the mediafolder that will contain the Sync folder.

  1. Download my OSMCautosetup script:
    wget https://gist.githubusercontent.com/zilexa/7a654cd18c9ec663f4daa1a791a5f99e/raw/be532deec710c2e82a269ec74468603cbb2fdb86/OSMCautosetup.sh

  2. Now edit it, set a 0 for the apps/configurations you don’t want and a “1” for SyncThing, also set the path to the mediafolder/harddrive or network location that should contain the Sync folder, where it will sync your files:
    nano OSMCautosetup.sh
    (save the file with CTRL+O, exit the editor with CTRL+X)

  3. Now run the script: sudo bash OSMCautosetup.sh

Official information from Syncthing to install on Debian based systems: http://apt.syncthing.net/

This HowTo discusses how to manually do the following (note my OSMCautosetup from option 1 does all of this for you):
Autostart on boot
Remote WebUI
And will follow the exact guidelines from Syncthing with respect for the file structure and methods used by OSMC.


  1. Add the release PGP keys:

    curl -s https://syncthing.net/release-key.txt | sudo apt-key add -

  2. Add the “release” channel to your APT sources:

    echo “deb http://apt.syncthing.net/ syncthing release” | sudo tee /etc/apt/sources.list.d/syncthing.list

  3. Update and install syncthing:

    sudo apt-get update
    sudo apt-get install syncthing

Autostart on boot
4) create the following file

sudo nano /lib/systemd/system/syncthing.service
  1. copy paste the following, hit CTRL+O to save, CTRL+X to exit.

    #Syncthing systemd service file for OSMC
    #Path should be /lib/systemd/system/syncthing.service

    Description=Syncthing - OSMC

    ExecStart=/usr/bin/syncthing -no-browser -logflags=0
    SuccessExitStatus=2 3 4
    RestartForceExitStatus=3 4


  2. now enable the service and start it

    sudo systemctl enable syncthing.service
    sudo systemctl start syncthing.service

You can check if Syncthing has started succesfully:

sudo systemctl status syncthing.service

7) Edit the Syncthing configuration:
stop the service first sudo systemctl stop syncthing.service
open the config file in the editor: nano /home/osmc/.config/syncthing/config.xml

  • On line 2, change the followingpath="home/osmc/sync/" to the default path you want to use. For example in my case, it is my attached USB drive: path="/media/UsbDriveName/"

  • Also a bit further down the file, change the GUI Listen Address setting from the default to This is required for remote access of the webUI.

  • Start Syncthing again: sudo systemctl stop syncthing.service


Remote WebUI (access Syncthing from other computers)
To access the webui, enter the IP of your OSMC device in a browser, for example:
You will never need to do anything via SSH. Everything can be done via the webUI. To access this webUI and any other services like transmission when you are not at home, read my (suprisingly simple!) SSH Tunneling guide. No need to open ports in your router!

Cloud server on OSMC
Adding pictures to OSMC microSD card
"OSMC update error: Error installing"

To be able to edit the file /home/osmc/.config/syncthing/config.xml syncthing has to be run at least once to create the file.


Thanks I have moved that step to the bottom.


what types of things are you using synching for with osmc?


You can use for whatever you want. I’m using for synching photos from my phone to external disk on pi. And with cron jobs I have scheduled to organize photos by date and move them into folders by month. So I don’t need to do it manually with connecting it to PC. You could maybe use it to sync two computers or create backups of files from PC to external disk. Use your imagination :stuck_out_tongue:


Thanks a lot it is very clear!
There is just a very little mistake at the end:
sudo systemctl start syncthing.service



Works like a charm.

after reboot, can’t access to OSMC via SSH.
What’s the problem?


Do you have external address or external ip? Try with this if you have port forwarding enabled. I’ve got problems when I setup vpn and only works with external address. Maybe will this be helpfull :slight_smile:


Oops nenad.
Sorry I missed your answer.

Well, after a second reboot I was able to connect through SSH to OSMC.
Sorry (again) to not having said it.

And thanks!


I have updated the first post: you can now automatically install SyncThing (and other stuff) using a script. It’s added as option 1.


Hi, I install Syncthing with that automatic script. Everything install correctly but what to do after that ? web UI don’t work.
After that I try manual installation by ssh on my smartphone, everything goes well and on point 6 when I type: [quote]
sudo systemctl enable syncthing.service
I had messege:


hi, how to remove all that I’ve installed with syncthing autosetup script because it doesn’t work and also my transmission web client don’t work :confused: ?

sudo systemctl stop syncthing.service
sudo systemctl disable syncthing.service
sudo apt-get remove syncthing
sudo rm /lib/systemd/system/syncthing.service
sudo reboot


Thanks, but my Transmission still doesn’t work. Can You help me completly reverse changes that script do?


The logs should tell you why transmission doesn’t work…

It would probably take less time to re-install. I have no idea what changes that script have made.


can You tell me what logs to look for ?


I’m sorry, it will clearly take less time to simply re-install…


do You know some fast method to reinstall osmc and save my data ?


I have no idea exactly what you refer to as your “data” but if you are referring to your Kodi configuration, simply copy your ~/.kodi folder to another device and re-image the card with OSMC. Afterwards, overwrite the existing ~/.kodi with your backup.


/.kodi folder is enough to save my installed apps configuration ?