9 votes

Syncthing on a VPS questions

I've been using syncthing for a while now and more recently I've started to use a VPS but I find it to be a mild pain in the ass to setup and I'm wondering if there's a better way or just how are you administering?

I've been just editing the config.xml file and restarting it. It feels clunky editing it in nano especially when I have to delete a folder or remove a device.

I'm starting up on a new VPS and doing this initial setup again is mildly frustrating.

Another question, a friend is also going to be backing up some files onto this server (both of us treating it as untrusted), would it be better practice to set up 2 users each running their own syncthing@user service or just have it all under one?

8 comments

  1. [3]
    DataWraith
    Link
    I usually just forward the web-interface port through SSH. Then I can just access Syncthing's web-interface and configure it that way. ssh -L 8080:localhost:8384 username@server (Note that this...
    • Exemplary

    I've been just editing the config.xml file and restarting it. It feels clunky editing it in nano especially when I have to delete a folder or remove a device.

    I usually just forward the web-interface port through SSH. Then I can just access Syncthing's web-interface and configure it that way.

    ssh -L 8080:localhost:8384 username@server

    (Note that this will also start a normal SSH session, so you will see the shell prompt of the remote server in your terminal).

    With this command, SSH forwards the local port 8080 to the remote port 8384, where the web-interface should be listening by default. You can then access the remote web-interface from http://localhost:8080/.

    From what I understand, the web-interface only listens on 127.0.0.1, so having the web-interface enabled is not a security problem because nobody can access it if they aren't using an SSH tunnel or work on the machine itself. You can also set a password for the web-interface if that is not good enough.

    13 votes
    1. mild_takes
      Link Parent
      Omg yes, that's the perfect solution, thank you.

      Omg yes, that's the perfect solution, thank you.

      4 votes
  2. [5]
    CaptainAM
    Link
    For remote editing you could use VS Code using this extension: https://code.visualstudio.com/docs/remote/ssh

    For remote editing you could use VS Code using this extension:
    https://code.visualstudio.com/docs/remote/ssh

    3 votes
    1. [2]
      CaptainAM
      Link Parent
      And for running multiple instances you can use Docker: https://github.com/syncthing/syncthing/blob/main/README-Docker.md If you use Docker compose you can run a second instance as another user...

      And for running multiple instances you can use Docker:
      https://github.com/syncthing/syncthing/blob/main/README-Docker.md

      If you use Docker compose you can run a second instance as another user with different ports and you are good to go. This is as simple as editing the compose file.

      2 votes
      1. mild_takes
        Link Parent
        Is there a benefit to doing that vs using two systemd services? Docker is one of those things I've been meaning to sit down and learn but haven't. Maybe now is the time.

        Is there a benefit to doing that vs using two systemd services?

        Docker is one of those things I've been meaning to sit down and learn but haven't. Maybe now is the time.

        1 vote
    2. [2]
      mild_takes
      Link Parent
      I've never used VS Code. I actually like nano and vim, just not for moving or removing blocks of code/text. Maybe if I just took the time to learn vim properly... In the same vein as VS Code...

      I've never used VS Code. I actually like nano and vim, just not for moving or removing blocks of code/text. Maybe if I just took the time to learn vim properly...

      In the same vein as VS Code though, I saw SSHFS discussed recently on reddit. Doing that and then using a text editor would accomplish the same thing.

      2 votes
      1. post_below
        Link Parent
        You can also use any of various FTP programs that can handle file transfer via SSH to edit the file locally in any app and then upload it. Filezilla is a good open source option.

        You can also use any of various FTP programs that can handle file transfer via SSH to edit the file locally in any app and then upload it. Filezilla is a good open source option.