Syncthing: Difference between revisions

m nudge to not store plaintext credentials in config file
added instruction for creating a password hash
Line 8: Line 8:
   openDefaultPorts = true;
   openDefaultPorts = true;
   # Optional: GUI credentials (can be set in the browser instead if you don't want plaintext credentials in your configuration.nix file)
   # Optional: GUI credentials (can be set in the browser instead if you don't want plaintext credentials in your configuration.nix file)
  # or the password hash can be generated with "syncthing generate --config <path> --gui-password=<password>"
   settings.gui = {
   settings.gui = {
     user = "myuser";
     user = "myuser";
Line 56: Line 57:


To generate a new key.cert and key.pem for a deployment, you can use the -generate argument:
To generate a new key.cert and key.pem for a deployment, you can use the -generate argument:
  <syntaxhighlight lang="bash">$ nix-shell -p syncthing --run "syncthing -generate=myconfig"
  <syntaxhighlight lang="bash">$ nix-shell -p syncthing --run "syncthing generate --config myconfig/"
2024/04/23 11:41:17 INFO: Generating ECDSA key and certificate for syncthing...
2024/04/23 11:41:17 INFO: Generating ECDSA key and certificate for syncthing...
2024/04/23 11:41:17 INFO: Device ID: DMWVMM6-MKEQVB4-I4UZTRH-5A6E24O-XHQTL3K-AAI5R5L-MXNMUGX-QTGRHQ2
2024/04/23 11:41:17 INFO: Device ID: DMWVMM6-MKEQVB4-I4UZTRH-5A6E24O-XHQTL3K-AAI5R5L-MXNMUGX-QTGRHQ2