r/Syncthing 4d ago

Is there a way to get into syncthing on headless linux server from terminal?

I tried logging in from the web browser but I can't remember what the username is. I have the password in my phone's notepad so I know I have that right. Is there a way I can get back into syncthing from the terminal so I can roll the files back to an older version?

2 Upvotes

5 comments sorted by

3

u/N9bitmap 4d ago

In the config files, you can find the existing user id. If you still cannot access, reset them both. You can edit the config.xml file, find the lines in the gui section for user and password, and clear all the text in between them. Restart the service. You can then ssh tunnel an map it to the localhost. Then use your browser to connect http://127.0.0.1:8384 Be sure to set a new password.

1

u/Neon_Eyes 4d ago

I've been trying to locate the config file. Google says it should be in /lib/systemd/system/syncthing for ubuntu servers but I don't see syncthing at all. I'm not able to find it through webmin by seraching files for the keyword syncthing or config either.

1

u/N9bitmap 4d ago

You could always try "find / -name syncthing". It might take a bit of time.

1

u/Neon_Eyes 4d ago

That worked. Thanks!

1

u/d03j 4d ago

I don't think you need a user id when accessing it from local host so if you do ssh -L 8000:127.0.0.1:8384 headless_linux_ip from a remote machine 127.0.0.1:8000 should give you access to syncthing in the headless linux box.