Getting started on headless linux

Hello,

Is there a documented approach on how to configure Syncthing on a headless linux?

If possible something fast and painless :slight_smile:

Thanks,

Thomas

Exposing Syncthing’s UI to the world (taking usual security measures depending on your use-case) or doing an ssh tunnel are the usual methods that come to mind - both methods should be searchable.

Thanks for your response,

So there are not any known way to do this?

Obviously there are, you’re not the first person to do this (by far), and that’s also what I wrote.

Have you checked the docs?

Sorry simon, your response sounded vague but it wasn’t.

Exposing the UI sound too complicated, I’m gonna skip this one.

I don’t understand what SSH tunneling could do for me in this case, could you explain it?

Create a tunnel between localhost:8384 on the headless device and e.g. localhost:8385 on the device your currently on, to access the web UI there.

Thanks !

If it works as I expect it could be a very handy trick :no_good_woman:

I just did this recently myself, so while it’s still fresh in my mind, here’s a quick and dirty tutorial:

Let’s say you have a Linux laptop, and the headless Linux box where you want to run syncthing has a working hostname of “headless”, (within your LAN). The username on the headless box we’ll run Syncthing as is called “admsync”.

On the laptop, in a terminal:

ssh -L 9988:localhost:8384 admsync@headless

Then once ssh’ed in as admsync, run the syncthing command.

Now on your laptop, in a web browser, visit the URL:

https://localhost:9988

…and you should see the Syncthing GUI from the headless box.

Note: on the headless box, in /etc/ssh/sshd_config, “AllowTcpForwarding” must not be “no”, for this tunneling to work.

I had no idea ssh had this feature, i’m glad I digged into it.

Works on windows also, perfect.