Synology Full License Software Migration Guide
This guide will help DIY Synology users to upgrade an existing basic 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. This has been tested on DSM version 7.1 but other versions should work as well. This guide assumes that the scprime container has been setup and configured as per the Synology Guide here.
The first step is to SSH to the Synology IP address on your local LAN using your local account details. Then you need to change to the root user by entering ‘sudo su’ followed by your local account password. This will change the prompt to ‘ash-4.4#’. Then change directory to your volume created during the initial setup, for example ‘cd /volume1/docker’ (note the prompt won’t change based on the folder you’re in but you can check with the ‘pwd’ command). Next download the linux installer by running the following command - ‘curl -fsSL https://releases.scpri.me/storage_appliance/diy/xm-installer-linux -o xm-installer && chmod +x xm-installer && ./xm-installer’. This will download and run the installer. You will see the following in your terminal window:
Copy the URL shown (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 into a browser, click on Advanced and then Proceed to…. (unsafe). This is just down to the self signed certificate used for the installer web page and not a security risk.
This will bring you to the initial installer page. Click on Next to proceed.
At this point the installer shows a menu with 4 options, only the Fresh Installation and Migrate from DIY will be available.
While you are looking to migrate from an existing DIY install, for docker setups we need to deploy a Fresh Installation and then later perform some manual steps to migrate the existing provider over to it.
Click on Fresh Installation.
Click on Advanced Configuration.
You’ll be presented with a page with various options which allows you to customise the setup which must be followed. Starting with Application Folder, click on the path to change it, in the popup folder selection window, click on Goto Home Folder, click on Up to get to the root folder and then click on the ‘volume1’ folder (assuming that’s what you called your volume) and then ‘docker’, you should see the ‘scp-data’ folder here, click on Add Folder, call is ‘xa-miner’, click Create and then select it so the path looks like below and click Select Folder.
Repeat the above steps to create a metadata folder called ‘meta’ under the /volume1/docker/xa-miner folder. This will be where we’ll move the existing metadata to later in the process.
Next the UI port needs changing as the Synology UI uses port 80 already. You can choose any other unused port like 8080 for example, if it’s available it will display ‘Port available’ in green to confirm it can be used. If you’re using non-default ports for the provider then you’ll need to enter them in the Hosting Port and Relayer Port sections. Finally you’ll need to add your existing storage folders one by one, click on Add Storage Folder, navigate to each one and click Select Folder.
Once you’ve configured each option, the page should look like this:
Click on Finish to proceed. This will download the xa-miner container and start it up, finally displaying this page with a link to the Xa-Miner UI.
Click on the link to proceed to the Xa-Miner UI setup. The first setup screen you should see the blockchain being downloaded a below.
At this point, there is no need to wait for the blockchain to download, we just need to stop both the new xa-miner container and the existing sprime container using the Docker app in the Synology UI. Once both have stopped, open up the File Station app in the Synology UI and navigate to the scp-data folder, this should be where the existing provider metadata is stored. Select all the files and folders in the scp-data folder (should be folders like consensus, gateway, host, renter, siamux, transactionpool and wallet plus any files in there like apipassword), click on Action -> Copy to/Move to -> Copy to, then navigate to the xa-miner/meta folder created earlier, select the Overwrite option for if the file already exists and click on OK.
Once the files have been copied to the meta folder, we now need to make a couple of changes to the xa-miner container. In the Docker app, click on the xa-miner container and then Edit.
Tick the option to Enable auto-restart.
Click on Advanced Settings
Under Environment, click on Add, enter SCPRIME_WALLET_PASSWORD for the Variable and then paste your wallet seed in for the value, ensuring there’s no space at the end of the seed. Click on Save. Next click on Volume Settings and for each of the storage folders, under Mount Path, remove the ‘/volume1’ part so the Mount Path is just for example /vol1_1.
Your Volume Settings should then look like this:
Finally, open up File Station, navigate to the /volume1/docker/xa-miner/ folder and you should have a file called storage.json. We need to edit this text file. Either from the Synology UI you can install the Text Editor app from the Package Center or use the SSH session and edit it from the CLI. The file will look something like this:
With multiple sections of information for each folder you have. The “container” value needs editing to again remove the ‘/volume1’ part, similar to in the previous step. The file should look like this after editing:
Click on File -> Save and then close the Text Editor.
Now start up the xa-miner container in the Docker app. Once it’s started up, refresh the browser page for the Xa-Miner UI. The Blockchain should already be downloaded and extracted, click on Next.
The next page displays the recovery seed phrase for your provider wallet, this is your existing seed phrase which you should already have saved. You can download the PDF containing it if you wish. In case this page gets stuck at 'Fetching seed...' then you can just click on Next to proceed as you should already have the wallet seed phrase from the existing provider.
After clicking on Next you are taken to the registration page where you should register the Xa-Miner with the SAME e-mail address you used when ordering the license. This will help with ensuring all of your Xa-Miners and licenses are displayed together in the XNS Console page as they are linked by your e-mail address. If you are registering a 2nd or 3rd provider you should use the same e-mail address as the 1st is registered to (and the same address as any Xa-Miners you may have).
On the next screen click on Goto Dashboard:
This will bring you to the main Xa-Miner UI Dashboard:
The GUI defaults to the Financials page where you can see your wallet balance, you can send or receive coins to the provider’s wallet, see a summary of your provider’s contracts and Income.
On the Stats page, you can see your provider’s stats. This is essentially your Grafana page that you are used to shown within the Xa-Miner UI. You can click on the Open in Grafana button to open up your public Grafana page in a new tab.
On the Storage page, you can see the storage folders which were discovered on the provider during the installation process. Here you can remove storage folders if you need to. See the Provider Maintenance section later in this guide for how to add new storage folders to a Full License DIY Xa-Miner.
On the Settings page, you can see your provider’s pricing config. Note these are now set for auto pricing so you do not need to change these settings and your provider will update them regularly to keep in line with the standard pricing structure for Xa-Miners. You can set your desired fiat currency which is used throughout the Xa-Miner UI from the drop down list at the bottom of the page.
Finally on the Support page, the status of Supervisor and the Daemon (spd) are shown, if either are offline there will be an Orange Restart button next to them where you can try to restart the processes. The rest of the buttons are as follows:
Download logs - this will zip up all the log files from your provider and the browser will download them to its default download location.
Reannounce - this is a manual reannounce button, Supervisor will now automatically re-announce your provider should the public IP address or ports change (so DDNS is no longer required for your provider). This button can be used should that not work or if the Support Team instructs you to use it.
Redownload - this button will redownload a fresh copy of the blockchain. Occasionally the consensus.db file can get corrupted and requires a fresh copy downloading.
Change Ports - should you need to change the ports your Xa-Miner is running on, click this button and enter the desired hosting port and relayer port. Typically these are consecutive ports like 4272 and 4273 or 14282 and 14283.
Reset Ports - this will reset your provider back to the default 4282 and 4283 ports.
Upload logs - this button will zip up your log files and then upload them to the Support Team’s server so they can be inspected to help in troubleshooting issues with a provider. Only use this at the instruction of the Support Team.
Open Chat Window - this feature allows you to chat 1:1 with a member of the Support Team without having to visit Discord. Please note that the Support Team is not necessarily available 24/7 and if no one is available, the chat button is disabled and will indicate that no one is online.
To learn more about the Xa-Miner UI and all its functions, please visit the Xa-Miner UI Walkthrough page.
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.
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 - In the Docker app on your Synology, stop the container by clicking on the toggle to the right of the xa-miner container.
Step 2 - Identify where your Xa-Miner app folder is located, the default location is in /volume1/docker/xa-miner/. The spd binary is located in the /config/spd folder. You need to delete this file using either the File Station app or from the CLI using 'sudo rm /volume1/docker/xa-miner//config/spd/spd'. 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 /volume1/docker/xa-miner/ in the above commands
Step 3 - Start up the container again using the Docker app.
If you refresh the Xa-Miner UI now, you will see on the Dashboard the updated SPD version.
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 Installation 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.