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 starts and synchronizes data even without user login when the server is restarted.

To run luckycloud as a service, an additional tool is required that allows any program to run as a service on Windows.

Requirements

  • Internet access
  • luckycloud account with luckycloud One, Teams, Business, or Enterprise (Recommendation: An additional user that is only used for luckycloud as a service.)
  • Administrator rights on the server
  • luckycloud Sync Client

Download NSSM

  1. First, download the NSSM tool (Non-Sucking Service Manager).
  2. Now you need to extract the archive and rename the contained folder (e.g., nssm-2.24).
  3. Then copy the nssm folder, for example, to your C:\ drive. After that, the path C:\nssm\win64 should exist.

Prepare luckycloud

  1. Install the luckycloud Sync Client as usual. We recommend setting up an additional "Service User" for "luckycloud as a Service" to avoid issues with password changes.
  2. Log in to the luckycloud Sync Client with your credentials and activate the synchronization of the desired directory with the local folder.
  3. Open the options of luckycloud and disable the automatic start of luckycloud. To do this, go to the luckycloud icon in the taskbar, right-click and select "Settings", and disable "Automatically start luckycloud after login". Confirm the change with "OK".
  4. Then completely exit luckycloud. To do this, go to the luckycloud icon in the taskbar again and right-click to select the option "Exit". luckycloud will now be closed.

Set up luckycloud Service

  1. Open the command prompt or PowerShell with administrator rights (right-click on "Start" and then select the appropriate option).
  2. Open the nssm GUI. C:\nssm\win64\nssm.exe install luckycloud_service.
  3. A GUI of NSSM will appear, with which luckycloud is set up as a service. The 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 adjusted 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 need to be adjusted to the environment.


NSSM%20Application

Tab Details

Option Value Notes
Display name luckycloud Service -
Description - Optional
Startup type Automatic -


NSSM%20Details

Tab Log on

Option Value Notes
This account Administrator Username of the active user
Password <Password> Password of the active user
Confirm <Password> Password of the active user


NSSM%20Log%20on

  • Then click on "Install service".
  • The installation of the service will be confirmed via the NSSM GUI. Accept with "OK".

Start/Stop luckycloud Service

  1. You can now start the luckycloud service for the first time. Enter the following command in the admin command prompt/PowerShell console:

    net start luckycloud_service

  2. To stop the luckycloud service, enter the following command in the admin command prompt/PowerShell console:

    net stop luckycloud_service

luckycloud now runs as a service in the background and synchronizes your data.

Make 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 beforehand. Running the service and GUI client in parallel can otherwise lead to database conflicts.

  1. Stop the luckycloud service (see above: Start/Stop luckycloud Service).
  2. Start the luckycloud Client manually.
  3. Make the changes.
  4. Now exit the luckycloud Client.
  5. Restart the luckycloud service (see above: Start/Stop luckycloud Service).