License File

Prev Next

WHAT TO EXPECT

In this article, users will learn the appropriate steps for licensing their cloudSwXtch instance via a License File provided by swXtch.io. First, they will need to open swx-top on their cloudSwXtch VM and copy the swXtchID or use a command in command line to get the id (see steps 2-5 below for both methods. They will then provide the cloudSwXtch ID number to swXtch.io, requesting a license. Finally, they will move the new license.json file into the cloudSwXtch directory and check swx-top to see if the license has taken hold.

Note that the swXtchID is the instance id in AWS, therefore is AWS it can also be obtained via the AWS Console.  

This is one of the methods for licensing a cloudSwXtch. To license via a licensing server, see here.

Locating the SwXtchID and Requesting a License

In order to receive a license file from swXtch.io Support, users will need to provide a cloudSwXtch ID number. This is something that can be found in swx-top or through a command.

  1. Log in to the newly created cloudSwXtch VM.

  2. Run the command:

    swx-top
  3. Expand the Information bar at the top by clicking the [+] or pressing F2
    Expanding Information bar

  4. The swx-top dashboard will display a line saying swXtch Id.
    cloudSwXtch ID revealed

  5. Alternatively, the following commands can be used on the console to get the cloudSwXtch ID:

    curl -s http://127.0.0.1/api/top/dashboard | grep -m 2 -Eo '"fingerprint"[^,]*' | head -1
  6. Copy the SwXtchID and send it to support@swxtch.io, requesting a license file.

Adding the License File to the cloudSwXtch VM

After receiving a license file from swXtch.io, users will now need to upload it to their cloudSwXtch VM.

  1. Upload the license.json file onto the cloudSwXtch VM in the user’s home directory.

  2. Move the license.json file to the /var/opt/swxtch directory using the following command, replacing <user> with the appropriate value:

    sudo mv /home/<user>/license.json /var/opt/swxtch
  3. Return to the swx-top dashboard and check if the license has taken hold (the red “Not Authorized” message should disappear and be replaced with a green “OK”)

Alternatively, users can create the file with a shell editor, copy the license content to the clipboard, and paste the content into the editor. For example, using nano:

sudo nano /var/opt/swxtch/license.json

If the cloudSwXtch has an old license, or the user wants to replace the current one, remove the current line with CTRL+K and paste the new license.

Save the file with CTRL+X, accepting the “Save modified buffer?” prompt with Y, and hitting Enter to the “File Name to Write: /var/opt/swxtch/license.json” prompt.

NOTE

The cloudSwXtch will automatically change the license when the file is saved.