ServerLink Installation and Configuration


Introduction

The main steps for ServerLink Configuration are as follows:

Configuring ServerLink on a Primary Server

Enabling ServerLink on a Primary Server

To enable ServerLink options in the Admin Portal, add the following key to cloudconfig.php

Windows Location : C:\xampp\htdocs\config\cloudconfig.php

Linux Location : /var/www/html/config/cloudconfig.php

define("TONIDOCLOUD_SERVERLINK_SHOW", 1);

If ServerLink is disabled, any local data changes that follow are not replicated to other servers even if ServerLink is later re-enabled.

  1. In the FileCloud admin portal's left navigation bar, scroll down and click Settings. Then, on the Settings navigation page, click ServerLink .
    The ServerLink Status page opens by default.
  2. In the inner navigation bar on the the left of the Settings page, expand the ServerLink menu, and click Settings, as shown below.

  3. Enable the field Enable ServerLink
  4. Enter a ServerLink Nickname for this server. Once set, this name can not be changed. Make sure this name is unique among all the servers performing ServerLink. replication. For example: you can set a name like newyorkhq for the headquarters and names like parisbranch, singaporebranch for the branch offices.
  5. Enter a strong ServerLink security key. This key is used for all ServerLink communications.
  6. Click Save.

Configuring ServerLink on a Secondary Server

If you are setting up a secondary server for an existing primary server, it is important that you copy the primary site completely to the secondary site first.
Enabling ServerLink on a site without an original copy of primary data may result in data missing on the secondary site if the primary data is not fully replicated.


For every secondary FileCloud ServerLink server, the following steps must be done:

  1. Copy all data from primary ServerLink server (primary should have ServerLink enabled when copy is done).
  2. Install a license with ServerLink component enabled.
  3. Enable ServerLink.
  4. Set the primary URL and the primary Password.
  5. Run the ServerLink client app.

Step 1: Copy data from the Primary ServerLink server

To start a secondary server, make sure first to enable ServerLink on the primary and then copy the file data as well as the MongoDB databases to the secondary server. In many cases, it might be simple just to clone the primary (if it is a virtual machine).
It is important to ensure that the copy is done only after ServerLink is enabled. Making a copy without enabling ServerLink will mean changes made after the copy might not get replicated to the secondary servers.

Step 2: Install a ServerLink enabled License

To enable serverlink on a secondary server, you need a special license file, as ServerLink is licensed separately from the main product.

To use ServerLink for a secondary FileCloud Server, you need a license with ServerLink functionality enabled. Once installed, you can check if the functionality is enabled by opening your Settings->License Tab and verifying the component shown.
 

Step 3: Enable ServerLink on the secondary server

To enable ServerLink on the secondary server:

  1. Add the following key to cloudconfig.php

    define("TONIDOCLOUD_SERVERLINK_SHOW", 1);
  2. Access the ServerLink Settings sub-page using the instructions above, under Configuring ServerLink on a Primary Server

  3. Enable the field Enable ServerLink.

  4. Enter a ServerLink Nickname for the secondary server. Once set, this name can not be changed. Make sure this name is unique among all the servers performing ServerLink. replication. 

  5. Enter a strong ServerLink security key for the secondary server. This key is used for all ServerLink communications.

  6. Enable the field Enable replication with primary.
  7. Enter the primary server URL in Primary server URL. This should be publicly available and accessible from the secondary site. 
  8. Enter the primary Server's security key; this should match what was entered as the security key on the primary site. ServerLink will not work if the security key doesn't match.
  9. Click Save.

Step 4: Running the ServerLink Client

Windows

  1. Open an Administrator command prompt 
  2. Navigate to the XAMPP folder

    cd c:\xampp
  3. Register the ServerLink Client service

    slclient.exe /registerService /displayName="FileCloud ServerLink Client Service"
  4. Start the ServerLink Client service. The server link client is now running and server to server replication should start.

    net start slclient
  5. To stop the ServerLink Client Service

    net stop slclient
  6. To completely remove the ServerLink Client Service

    slclient.exe /unregisterService

Ubuntu

For Ubuntu versions of Linux, run the following commands:

curl --location https://patch.codelathe.com/tonidocloud/live/3rdparty/slclient/deb/slclient.service -o /etc/systemd/system/slclient.service
systemctl daemon-reload
systemctl enable slclient.service
service slclient start

RHEL

For RHEL versions of Linux, run the following commands:

curl --location https://patch.codelathe.com/tonidocloud/live/3rdparty/slclient/rpm/slclient.service -o /etc/systemd/system/slclient.service
systemctl daemon-reload
systemctl enable slclient.service
service slclient start