From a5a3c87bb3eda4cd2cec22b08b1065b0d1ab8650 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 3 Mar 2024 13:40:32 +0100 Subject: [PATCH] feat(syncthing): troubleshooting --- knowledge base/syncthing.md | 35 ++++++++++++++++++++++++++++++---- knowledge base/xml.placeholder | 6 ++++++ 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 knowledge base/xml.placeholder diff --git a/knowledge base/syncthing.md b/knowledge base/syncthing.md index 8482284..6ba6b3d 100644 --- a/knowledge base/syncthing.md +++ b/knowledge base/syncthing.md @@ -3,8 +3,11 @@ ## Table of contents 1. [TL;DR](#tldr) +1. [Configuration](#configuration) +1. [Troubleshooting](#troubleshooting) + 1. [I forgot the password](#i-forgot-the-password) 1. [Further readings](#further-readings) -1. [Sources](#sources) + 1. [Sources](#sources) ## TL;DR @@ -20,22 +23,46 @@ syncthing --gui-address '0.0.0.0:8384' --no-default-folder systemctl --user start 'syncthing.service' ``` +## Configuration + +| OS | Path | +| -------- | -------------------------------------------------------------- | +| Linux | `$XDG_STATE_HOME/syncthing`
`$HOME/.local/state/syncthing` | +| Mac OS X | `$HOME/Library/Application Support/Syncthing` | +| Windows | `%LOCALAPPDATA%\Syncthing` | + +## Troubleshooting + +### I forgot the password + +Remove the entry under `gui.password` in the [configuration file][configuration]: + +```sh +# With XMLStarlet +xml ed -L -d 'configuration/gui/password' 'Library/Application Support/Syncthing/config.xml' +``` + +Then enter the settings on the host and set a new password. + ## Further readings - [Website] -## Sources - -All the references in the [further readings] section, plus the following: +### Sources - [The GUI listen address] - [File versioning] +- [Configuration] + +[configuration]: #configuration + +[configuration]: https://docs.syncthing.net/users/config.html [file versioning]: https://docs.syncthing.net/users/versioning.html [the gui listen address]: https://docs.syncthing.net/users/guilisten.html [website]: https://syncthing.net/ diff --git a/knowledge base/xml.placeholder b/knowledge base/xml.placeholder new file mode 100644 index 0000000..4c536d0 --- /dev/null +++ b/knowledge base/xml.placeholder @@ -0,0 +1,6 @@ +https://www.fosslinux.com/114195/ways-to-parse-an-xml-file-on-linux.htm +https://cheat.sh/xmllint +https://cheat.sh/xml + +xml sel -t -v configuration/gui/password 'Library/Application Support/Syncthing/config.xml' +xml ed -L -d 'configuration/gui/password' 'Library/Application Support/Syncthing/config.xml'