Sync-Client as Windows Service
If luckycloud is to start automatically in the background on a server to synchronize data, it is necessary to set up luckycloud as a service. This ensures that luckycloud will start without user login and synchronize data if/when the server is restarted.
To run luckycloud as a service, an additional tool is needed, which allows to run any program under Windows as a service.
This is needed
- Internet access
- luckycloud account with luckycloud One, Teams, luckycloud Business or Enterprise (recommendation: additional user which is only used for luckycloud as a service)
- Administrator rights on the server
- luckycloud Sync Client
Download from NSSM
- first download the NSSM (Non-Sucking Service Manager) tool.
http://nssm.cc/download
- unpack the archive and rename the contained folder. e.g.
nssm-2.24
to nssm
.
- then copy the folder
nssm
e.g. to C:\
. After that the path C:\nssm\win64
should exist.
Prepare luckycloud
- Install the luckycloud Sync Client as usual
- It is recommended to set up an additional "service user" for "luckycloud as a service" to avoid any interference with password changes.
- log in to luckycloud Client and synchronize the desired directories with local folders.
- open luckycloud options and disable automatic start of luckycloud ((right click icon in taskbar and select "Settings", then disable "Automatically start luckycloud after login", confirm with "OK").
Exit luckycloud completely (right click icon in the taskbar and select "Exit").
Set up luckycloud Service
- open the command prompt or Powershell with administrator rights (right click on START and then select the appropriate option).
- open the nssm GUI.
C:\nssm\win64\nssm.exe install luckycloud_service
.
- now a GUI of the NSSM appears, with which luckycloud is set up as a service. Paths may need to be adjusted if you have not installed luckycloud in the default directories.
Tab Application
Option |
Value |
Notes |
Path |
C:\Program Files\luckycloud\bin\luckycloud-daemon.exe |
Path may need to be adjusted if you have not installed luckycloud in the default directories. |
Startup directory |
C:\Program Files\luckycloud\bin |
Path may need to be modified if you have not installed luckycloud in the default directories. |
Arguments |
-c C:\Users\Administrator\luckycloud_config -d C:\Users\Administrator\luckycloud_data -w C:\Users\Administrator\luckycloud |
"Administrator" is the username of the active user. The paths may have to be adapted to your environment. |
Tab Details
option |
value |
annotations |
Display name |
luckycloud Service |
- |
Description |
- |
Optional |
Startup type |
Automatic |
- |
Tab Log on
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 |
- Then press "Install service".
- The installation of the service will be confirmed via the NSSM GUI, you can accept this by pressing "OK".
Start/stop luckycloud Service
- You can now start the luckycloud Service for the first time. To do this, enter the following command in the admin prompt/powershell console:
net start luckycloud_service
- to stop the luckycloud Service, type the following command in the admin prompt/powershell console:
net stop luckycloud_service
luckycloud will now run as a service in the background and synchronize your data.
Making changes with the luckycloud Client
If you want to make changes to the luckycloud Client, it is important that the luckycloud Service has been stopped before. Otherwise the parallel operation of the service plus GUI client can lead to database conflicts.
- stop the luckycloud Service (see ## Start/Stop luckycloud Service)
- start the luckycloud Client manually
- make the changes
- stop the luckycloud Client
- restart the luckycloud Service (see ## Start/Stop luckycloud Service)