Syncthing: Difference between revisions

Advanced: Don't (implicitly) recommend password in config
Lejvin (talk | contribs)
m add requirement for accessing web interface from another computer (bind to 0.0.0.0 instead of 127.0.0.1)
 
(One intermediate revision by one other user not shown)
Line 22: Line 22:
Once you've rebuilt your system, Syncthing will be available as a system service. You can visit http://127.0.0.1:8384/ to configure it through the web interface.
Once you've rebuilt your system, Syncthing will be available as a system service. You can visit http://127.0.0.1:8384/ to configure it through the web interface.


If accessing the web interface from other networked computers you will need to open a tcp port:<syntaxhighlight lang="nix">
If accessing the web interface from other networked computers you will need to change the gui bind address and open a TCP port:<syntaxhighlight lang="nix">
# Example for /etc/nixos/configuration.nix
services.syncthing = {
  enable = true;
  openDefaultPorts = true; # Open ports in the firewall for Syncthing. (NOTE: this will not open syncthing gui port)
 
  guiAddress = "0.0.0.0:8384"; # By default syncthing only listens to localhost
};
 
# port 8384  is the default port to allow access from the network.
# port 8384  is the default port to allow access from the network.
networking.firewall.allowedTCPPorts = [ 8384 ];
networking.firewall.allowedTCPPorts = [ 8384 ];
Line 149: Line 157:


== Troubleshooting ==
== Troubleshooting ==
=== Some settings not being applied ===
Note the [https://search.nixos.org/options?channel=unstable&show=services.syncthing.settings services.syncthing.settings] option accepts anything that can be parsed into JSON, even if it does not have a corresponding config option. Check the logs of the <code>syncthing-init</code> service with <code>systemctl status syncthing-init.service</code>to see if some settings are not being applied.


== See also ==
== See also ==