Syncthing: Difference between revisions
Syncthing removed the default folder concept after 2.0.0. |
Note that ids are not sensitive |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 15: | Line 15: | ||
To install Syncthing as a system service that runs in the background and survives reboots, add the following to your <code>/etc/nixos/configuration.nix</code>: | To install Syncthing as a system service that runs in the background and survives reboots, add the following to your <code>/etc/nixos/configuration.nix</code>: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"># Example for /etc/nixos/configuration.nix | ||
# Example for /etc/nixos/configuration.nix | |||
services.syncthing = { | services.syncthing = { | ||
enable = true; | enable = true; | ||
openDefaultPorts = true; # Open ports in the firewall for Syncthing | openDefaultPorts = true; # Open ports in the firewall for Syncthing. (NOTE: this will not open syncthing gui port) | ||
}; | };</syntaxhighlight> | ||
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"> | |||
# port 8384 is the default port to allow access from the network. | |||
networking.firewall.allowedTCPPorts = [ 8384 ]; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Configuration == | == Configuration == | ||
| Line 39: | Line 42: | ||
}; | }; | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight>Note: If you want to use [[Agenix]] to set the GUI password use [https://search.nixos.org/options?channel=unstable&query=syncthing&show=services.syncthing.guiPasswordFile services.syncthing.guiPasswordFile] instead of setting.gui.password. | ||
==== Advanced ==== | ==== Advanced ==== | ||
| Line 70: | Line 73: | ||
}; | }; | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight>Note: As per syncthing Device ids are not sensitive and should be okay to keep in your config file.<ref>[https://docs.syncthing.net/users/faq.html#should-i-keep-my-device-ids-secret Should I keep my device IDs secret?]</ref> | ||
== Tips and tricks == | == Tips and tricks == | ||