f627b95
# syncthing
f627b95
e97e5e2
## Usage
e97e5e2
e97e5e2
By default, the syncthing service isn't enabled after installation. Depending on
e97e5e2
the use-case, syncthing can be run as a system-wide service for a specific user,
e97e5e2
or as a real user-session service.
e97e5e2
e97e5e2
Once enabled, the syncthing service exposes a web interface (the port can be
9b6eeb8
changed in the configuration later) at address [localhost:8384](http://localhost:8384).
e97e5e2
e97e5e2
For manual (or offline) configuration, the settings file of syncthing (XML
e97e5e2
format) lives at `$HOME/.config/syncthing/config.xml`.
e97e5e2
e97e5e2
An empty, default "Sync" folder is created at the first startup in the user's
e97e5e2
home directory.
e97e5e2
e97e5e2
e97e5e2
### User Session service
e97e5e2
e97e5e2
To enable the syncthing service as a user-session service for the current user,
e97e5e2
run:
e97e5e2
e97e5e2
```sh
e97e5e2
systemctl --user enable --now syncthing.service
e97e5e2
```
e97e5e2
e97e5e2
The service will be started now and each time you log in.
e97e5e2
e97e5e2
The syncthing user session service will not automatically be restarted after
e97e5e2
package updates. Instead, the user has to either restart syncthing from the web
e97e5e2
interface, log out and back in, or run the following commands manually:
e97e5e2
e97e5e2
```sh
e97e5e2
systemctl --user daemon-reload
e97e5e2
systemctl --user restart syncthing.service
e97e5e2
```
e97e5e2
e97e5e2
### System service
e97e5e2
e97e5e2
To enable the syncthing service as a system-wide service for user `USER`,
e97e5e2
run:
e97e5e2
e97e5e2
```sh
e97e5e2
sudo systemctl enable --now syncthing@USER.service
e97e5e2
```
e97e5e2
e97e5e2
The service will be started now and each time the system boots.
e97e5e2
e97e5e2
Enabling the syncthing service this way has the benefit that it will even be
e97e5e2
automatically restarted when the syncthing package is updated by the package
e97e5e2
manager. The drawback of this method is that the syncthing service cannot be
e97e5e2
restarted from within the web interface (due to it being a system service).
e97e5e2