If Seafile is to start automatically in the background on a server to synchronize data, it is necessary to set up Seafile as a service. This ensures that Seafile will start without user login and synchronize data if/when the server is restarted.
To run Seafile as a service, an additional tool is needed, which allows to run any program under Windows as a service.
nssm-2.24
to nssm
.nssm
e.g. to C:\
. After that the path C:\nssm\win64
should exist.C:\nssm\win64\nssm.exe install seafileservice
.Option | Value | Notes |
---|---|---|
Path | C:\Program Files (x86)\Seafile\bin\seaf-daemon.exe |
Path may need to be adjusted if you have not installed Seafile in the default directories. |
Startup directory C:\Program Files (x86)\Seafile\bin |
Path may need to be modified if you have not installed Seafile in the default directories. | |
Arguments -c C:\Users\Administrator\ccnet -d C:\Users\Administrator\Seafile\seafile-data -w C:\Users\Administrator\Seafile |
"Administrator" is the username of the active user. The paths may have to be adapted to your environment. |
option | value | annotations |
---|---|---|
Display name | Seafile Service |
- |
Description | - |
Optional |
Startup type | Automatic |
- |
option | value | annotations |
---|---|---|
This account | Administrator |
Username of the active user |
Password | <Password> |
Password of the active user |
Confirm | <Password> |
Password of the active user |
You can now start the Seafile service for the first time. To do this, enter the following command in the admin prompt/powershell console:
net start seafileservice
net stop seafileservice
Seafile will now run as a service in the background and synchronize your data.
If you want to make changes to the Seafile client, it is important that the Seafile service has been stopped before. Otherwise the parallel operation of the service plus GUI client can lead to database conflicts.