Comment on page

Linux Full License Software Fresh Installation Guide

Please note that this document is out of date. Please visit https://xaminer.net/docs/index-documents/ for up to date documents and guides for the Xa-Miner.

This guide will help DIY Linux users to setup a brand new provider with their Full License to run the Xa-Miner software. To do this you will need to have purchased a Full License or a Full License Upgrade from a Basic or free XM Basic license from the Xa-Miner Store. The installer supports all major Linux distros including Ubuntu, CentOS and Alpine Linux. For this installation guide, Ubuntu Desktop 22.04.1 will be installed.
The first step is to install the Linux version of your choice (ensure it’s a supported version, for example as of writing this guide, Ubuntu 21 is no longer supported). If running the installation from the Linux Desktop UI, you can open a Terminal window and proceed from there. If you are running the installation from another computer, you may need to install openssh-server to be able to then SSH to the Linux provider. To do this open a Terminal window and enter ‘sudo apt install openssh-server’, answer Y to the prompt and then you will be able to SSH to the Linux PC from another computer and you can continue the installation from there. ‘Curl’ may also need to be installed if it’s not already installed with your Linux distro. To install, in the terminal window enter ‘sudo apt install curl’ and answer Y to the prompt. The final prerequisite is that you should physically install, partition, format and mount your storage drives. Please ensure that the storage drives will be automatically mounted each time Linux boots up, whichever method you use to set it up.
Note - the above commands to install openssh-server and curl are specific to Ubuntu and Debian based Linux distros, for other distros like CentOS or Alpine, different commands to install those packages will be required.

Full Software License Installer

Whichever method you have used above, from the command line, if you are logged in to your Linux Provider with a user account (not root), enter the following command (note this is all one command):
curl -fsSL https://releases.scpri.me/storage_appliance/diy/xm-installer.sh | sudo bash
If you are logged in as root, then enter the following command:
curl -fsSL https://releases.scpri.me/storage_appliance/diy/xm-installer.sh | bash
This will start the installation script, install any necessary components for your Linux install and finally present you with the following page:
The URL in the above text will be for the local IP address of your provider. Now copy (note do NOT use Ctrl-C to copy the URL as that will quit the installer and stop it running, in most terminal apps just highlighting the URL copies it into the clipboard) and paste this into a browser to continue the installation.
NOTE:- keep this terminal window open until it shows the message ‘Installer Finished’ which will happen after the UI installation is complete.
You will see the following page in your browser or something similar depending on the browser you use:
If the page fails to load, it might be due to a local firewall running on the Linux Provider blocking TCP port 8135, if this is the case you will need to open that port on the firewall to allow it through.
In this case for Chrome, click Advanced and then ‘Proceed to 192.168.254.115 (unsafe)’ (this will contain your Provider’s IP address). This will bring you to the following page:
Click on Next. You’ll now be presented with the following options:
To perform a fresh install of a new provider, click on the Fresh Installation icon. This will take you to the following screen:
You can if you wish change the Application Config Folder but for most instances the default location is recommended. Click on Next.
On this page you can add your storage folders. Click on Add Storage Folder.
Click on Goto Home Folder and then click on the Up arrow until the Current Folder is /.
From here, navigate to where your drives are mounted, in this case it’s ‘/media/scprime’. Then click on Add Folder and give the folder a name like ‘data’. Click on Create.
You will be taken back to the list of storage folders. Should you wish to add multiple storage folders, repeat the above process for each one.
Once finished, click on Next.
The next page shows the Application Folder path chosen and the list of Storage Folders added, if all looks correct click on Finish.
The installer will now download and create the docker container running spd and supervisor on your provider. This typically takes 1-2 minutes.
Once complete, the installer will show the following page and you can click on the link to open the Xa-Miner UI to setup and register your new Xa-Miner.

Xa-Miner UI Setup

After opening up the Xa-Miner UI for the first time, you will be presented with the following screen where the blockchain is being downloaded and extracted. This can take a few mins depending on the speed of your internet connection and the specs of the PC.
Once this is completed the Please wait button will change to Next.
Click on Next to proceed to the following page.
Here you are shown your wallet recovery seed phrase. This can also be downloaded as a PDF. It is important to save this somewhere safe as you will need the seed to send SCP coins from the wallet to another wallet address. Once the seed has been saved, click on Next.
Enter your e-mail address used for the XNS Console and to purchase your Full or Basic to Full upgrade license to register your new Xa-Miner. Click on Register.
The next page allows you to change your ports from the default 4282 and 4283 if you want or need to. If this is your first provider then the default ports will in most cases work fine and you can click on Goto Dashboard. If you need to change the ports as this is not your first provider, click on Configure Ports.
Choose the Hosting and Relayer ports you wish to use. We recommend keeping them at least 10 apart, so typically using 4292/4923 or 4272/4273 for example. In the above example we’re going to use 4252 and 4253. Click on Set ports.
You will see the following page showing your ports were successfully set. Now click on Goto Dashboard to go to the main Xa-Miner Dashboard page.
Here you will see at the top of the page your provider ID. This is needed to register against your Full license in the XNS Console. Simply copy it from here, go to the console.xapro.net link, select Licenses from the left menu and paste the provider ID in against your license key. If you have not yet purchased your license, please visit the store to complete your purchase.
Congratulations, your new Xa-Miner is now fully setup. To learn more about the Xa-Miner UI and all its functions, please visit the Xa-Miner UI Walkthrough page.

Troubleshooting

Installer GUI Not Loading Fully

After running the installer script and opening the URL, if you see the following page in your browser, you likely need to change your browser's language settings to English.

Xa-Miner Maintenance Tasks

Some typical maintenance tasks which a user needs to perform on their provider will now be slightly different with the UI. These are documented below.

Upgrading to a new SPD Release

When a new version of the SPD daemon is released, for example, prior to the fork in January 2023, the process for full license installations is very straightforward.
Step 1 - On the Linux CLI, stop the container running using 'sudo docker stop xa-miner' (if logged in as root you don't need to use sudo)
Step 2 - Identify where your Xa-Miner app folder is located, the default location is in the root folder /root/xa-miner/app. The spd binary is located in /config/spd in the app folder. You need to delete this file using 'sudo rm /root/xa-miner/app/config/spd/spd' (again if logged in as root you don't need to use sudo). If you chose a different location for the xa-miner app folder during installation of the software then you will need to use the path to the custom folder in place of /root/ in the above commands
Step 3 - Start up the container again using 'sudo docker start xa-miner'. Within a few secs after starting the container, supervisor will automatically download the latest spd binary and place it in the same location in the app folder. If you refresh the Xa-Miner UI now, you will see on the Dashboard the updated SPD version.

Upgrading to a new Xa-Miner Software Release

When a new version of the Software Xa-Miner is released, the process to update the software is to run the installer script from the CLI of the provider PC using the same command used when first installing the software from the Full Software License Installer section. Then access the URL the script shows to bring up the installer UI as below:
Click on Next.
If there is a new version of the Xa-Miner container detected by the installer, the Update Existing button will be active and show Update Required underneath. Simply click on Update Existing, the installer will perform the upgrade (takes 1-2 mins) and when it's finished, the updated version will be running and the installer will exit. Refresh the Xa-Miner UI and the updated versions of the SPD, Supervisor and UI versions will show on the Dashboard.

Adding new storage folders

To add a new storage folder to your provider, you will first need to create a partition, format and mount the drive in Linux as you would normally and ensure the drive auto mounts on reboot in the /etc/fstab file. Also create a single folder on the drive which will be the storage folder. In Linux there is no need to create multiple folders on a single drive, except if your drive is larger than 16TB and you are using ext4 format as ext4 can only support up to 16TB file sizes. In the case of 18TB and greater drives, you will need to create 2 folders, one 16TB and one for the rest of the drive space or 2 equal sized folders.
Once you have the folder created, run the installer script again using the same curl command in the installation section of this guide, then open a browser to the installer GUI with the 4 options as below:
When the installer is run and it detects an existing installation, the Configure Existing button is active and note the Fresh Installation and Migrate from DIY are deactivated now.
After clicking on Configure Existing, you’ll be presented with the following screen showing all the existing provider’s storage folders.
Click on Add Storage Folder
Create Folder will create the new folder at the default path shown. Most likely you will want to create the folder on a newly mounted drive, click Goto Home Folder.
From here you can navigate to the mounted drive and folder you previously setup either by typing in the path in the Current Folder box or by clicking the Up arrow to get to the root folder and then choose your path from there, for example /mnt/disk7/hostdata. Note folders can also be created at this step using the Add Folder button.
Once you have your new folder selected, click Select Folder.
Then you will see your new folder added to the list of storage folders.
Click on Finish. This GUI will show it configuring your Xa-Miner and then will present you with the following screen at which point you can close the browser tab.
Now return to the main Xa-Miner UI, go to the Storage page and you’ll see the added storage folder there.
Enter the size in GB you want to set the folder size to and click Assign. Note, be careful not to over provision the folders here, the units are in GB which don’t equate to the drive sizes you see in Linux when running lsblk for example. In the above example, the /mnt/disk5/hostdata folder is on a 6TB drive, lsblk reports this as 5.5T (which is 5.5TiB), using spd from the CLI this folder was created as a 5.4TB folder but the UI reports it as 5029GB. So if disk7 was a 6TB drive, you would want to configure 5029GB in the UI as the capacity.

Removing Storage Folders

A similar process can be used in reverse to remove storage folders in a similar way to using ‘spc host folder remove <PATH>’ from the CLI. First navigate to the Storage page on the Xa-Miner UI, find the folder from the first column you wish to remove and click on the Remove button to the right.
Any data stored in the folder being removed will be moved by spd to other folders. This process may take some time depending on how much data needs moving so it’s recommended to remove just one folder at a time.
Once the folder is removed from the Xa-Miner UI, run the installer script again and choose Configure Existing:
The following screen will show all the drives which have been added to the Xa-Miner, note if you have more than 10 drives/folders then you may need to go to the next page or change the rows per page value to All to see the one(s) you want to remove.
Simply click on the red icon in the Action column against the folder you wish to remove and then click Finish. Now the drive can be safely unmounted in Linux and removed.

Recovering the Wallet Seed Phrase

Should the wallet seed phrase be forgotten, this can be recovered from the CLI of the provider. The spc application has been added into the xa-miner container now, if spc is not available, an update of the Xa-Miner software will be required using the process above in the Upgrading to a new Xa-Miner Software Release section.
Assuming you are logged in to Linux with a non-root account, run the following command to show the wallet seed:
sudo docker exec -it xa-miner spc wallet seeds
This will display the Primary Seed.