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. 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.
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 them with a cloudSwXtch ID number. This is something that can be found in swx-top or through a command.
Log in to the newly created cloudSwXtch VM.
Run the command:
swx-topThe swx-top dashboard will display.
Alternatively, if the user does not want to open swx-top, he can use the following commands to get the swXtchID:
curl -s http://127.0.0.1/api/top/dashboard | grep -m 2 -Eo '"fingerprint"[^,]*' | head -1
Copy the SwXtchID and email 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.
Upload the license.json file onto the cloudSwXtch VM.
Move the license.json file to the /swxtch directory using the following command, replacing user with the appropriate value:
sudo mv /home/<user>/license.json /var/opt/swxtchReturn to the swx-top dashboard and check if the license has taken hold.
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:
nano /var/opt/swxtch/license.jsonIf 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.