Windows Supervisor-Lite Installation Guide
This guide will help DIY Windows users to install the new supervisor-lite software on their providers. To do this you will need to have purchased a Basic License from XaMiner shop and registered it to your DIY Provider ID at on the XNS Console. The software supports Windows 10 and 11. Prior versions of Windows may work but are no longer supported.
Supervisor-lite will run alongside spd as a process on your provider and can perform 2 functions, auto pricing and auto re-announce. Auto pricing will keep the provider’s price settings within recommended values based on a $ price per TB per month in SCP. This value is currently $4 per TB per month but in case this value changes in the future, this can be set in the software. The following provider settings will be set by supervisor-lite:
collateral
collateralbudget
maxcollateral
minbaserpcprice
mindownloadbandwidthprice
minsectoraccessprice
minstorageprice
These values will be updated on an hourly basis so once supervisor-lite is started, it will keep the provider using pricing settings which will keep them within incentives compliance and in line with Xa-Miners and Full License providers.
The other function of supervisor-lite is auto re-announce. This feature will regularly check what the provider’s public IP address is and if it is different to the address the provider is announced on, then it will re-announce on the new public IP address. This will completely remove the need for providers to use Dynamic DNS services like DuckDNS, No-IP.com etc. if they do not have a static IP address from their ISP. This should make the provider and therefore the network more stable and reliable as any DNS issues will not impact the reachability or scanning of the provider network.
Installing the Software
The first step to install the software is to download the zip file to your provider from the ScPrime Software page, unzip the supervisor-lite-v1.0-windows-amd64.zip file (filename may differ based on version) and place the supervisor-lite.exe file in the same folder where you have spd.exe and spc.exe (this is not technically important but helps keep the software together and if you have set the PATH environment variable already to this folder then you will be able to run supervisor-lite without being in the folder where it’s located).
Supervisor-lite needs to know the host port that spd is being run on. In most cases this will be 4282 but this can be confirmed if you are unsure by running the following:
C:\Users\scprime>spc host
Host info:
Provider ID : 986948cbfd72ef8ad76c26c2ec59d9c9a71db82ef86a603178a320710387dc78
Announced as : 213.104.199.250:14282 (automatically determined)
Connectability Status: Nobody is connecting to host. Try re-announcing.
Storage: 0 B (0 B used)
Price: 18.17 SCP / TB / Month
Max Duration: 9 Weeks
Accepting Contracts: Yes
Anticipated Revenue: 0 H
Locked Collateral: 0 H
Revenue: 0 H
Storage Folders:
In this case spd is running on 14282 and so this would be the host port used when starting supervisor-lite.
Starting supervisor-lite with Default Options
Supervisor-lite can be started using the following command in a Command Prompt window with minimum options if you are running spd on the default ports:
supervisor-lite.exe
This command will start the supervisor-lite process running with all the default options (auto pricing enabled, auto re-announce enabled, default host port 4282 etc.). Leave this Command Prompt window open as supervisor-lite needs to be continuously running like spd.
Once supervisor-lite is running, you will see it output the current settings (old) along with the values it will change them to (new), you will see this output once an hour by default:
C:\Users\scprime>supervisor-lite.exe
2022-10-20T12:34:27.235Z [INFO ] v1.0-beta5 supervisor-lite/main.go:47 starting… {“config”: {“Verbose”:false,”Spd”:{“APIAddr”:”localhost:4280″,”APIPassword”:””,”Test”:false},”Announce”:{“NoAnnounce”:false,”HostAddr”:”:4282″,”CheckIpInterval”:”5m”,”AnnounceInterval”:”30m”,”MiningCheck”:”1h”},”Pricing”:{“NoPricing”:false,”UpdateInterval”:”1h”,”Settings”:””,”TargetPriceUSD”:4,”MaxShiftRatio”:0.005,”ForceUpdateDiff”:0.5}}, “commit”: “18d6b11293f68ec2e44c3b5d078155f36ac263a3”}
2022-10-20T12:34:27.595Z [INFO ] v1.0-beta5 spd/service.go:79 provider public key {“pk”: “ed25519:986948cbfd72ef8ad76c26c2ec59d9c9a71db82ef86a603178a320710387dc78”}
2022-10-20T12:34:27.968Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “collateral”, “old”: “4205564972639”, “new”: “4216842880096”}
2022-10-20T12:34:27.991Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “collateralbudget”, “old”: “1907644271589050400000000000000”, “new”: “1912759930411545600000000000000”}
2022-10-20T12:34:28.010Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “maxcollateral”, “old”: “76305770863562016000000000000”, “new”: “76510397216461824000000000000”}
2022-10-20T12:34:28.036Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “minbaserpcprice”, “old”: “36336081363600960000”, “new”: “36433522484029440000”}
2022-10-20T12:34:28.067Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “mindownloadbandwidthprice”, “old”: “4542010170450120”, “new”: “4554190310503680”}
2022-10-20T12:34:28.091Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “minsectoraccessprice”, “old”: “908402034090024000000”, “new”: “910838062100736000000”}
2022-10-20T12:34:28.110Z [INFO ] v1.0-beta5 pricing/service.go:194 host setting is updated {“param”: “minstorageprice”, “old”: “4205564972639”, “new”: “4216842880096”}
2022-10-20T12:34:28.110Z [INFO ] v1.0-beta5 pricing/service.go:204 host settings are up to date
While this command prompt window can be left open, you will want to set supervisor-lite to automatically start every time Windows is started up, this is discussed later in the guide.
Supervisor-lite Command Line Options
Similar to when spd it started, there are various command line options when starting supervisor-lite to tailor it to a user’s particular needs and setup. The following table details those options:
Option | Description |
SPD Options | |
/api-addr: | Spd API address (value of spd –api-addr) (default: localhost:4280) |
/api-password: | Spd API password, can (and should) be defined using SCPRIME_API_PASSWORD environment variable. By default will try to read password from ‘apipassword’ file created by spd [$SCPRIME_API_PASSWORD] |
Autoannounce Options | |
/no-announce | Disable autoannounce |
/host-addr: | Spd daemon host address (value of spd –host-addr) (default: :4282) |
/check-ip-interva: | Interval between two IP checks (default: 5m) |
/announce-interval: | Minimum interval between two announcements (default: 30m) |
/mining-check: | If transaction was not included in the block for that amount of time, host will announce again. Must be >= announce-interval (default: 1h) |
Autopricing Options | |
/no-pricing | Disable autopricing |
/update-interval: | Update settings interval (default: 1h) |
/settings: | Comma-separate list of host settings to update. Available are: maxdownloadbatchsize, maxduration, maxrevisebatchsize, windowsize, collateral, collateralbudget, maxcollateral, minbaserpcprice, mincontractprice, mindownloadbandwidthprice, minsectoraccessprice, minstorageprice, minuploadbandwidthprice, maxephemeralaccountbalance, maxephemeralaccountrisk. Updates all listed settings by default |
/target-price-usd: | Target price in USD (default: 4.0) |
/max-shift-ratio: | Maximum price shift between two updates. Example: current storage price 100 SCP, target price 102 SCP, max shift is 0.005, new price would be 100.5 SCP (default: 0.005 |
/force-update-diff: | Update price to target if target differs from current by this ratio (not take into account max-shift-ratio during update). Example: current price is 100 SCP, target is 160 SCP, force update diff is 0.5, new price would be 160 SCP (default: 0.5) |
While all the available options have been documented above, most can be left as default. The /no-announce and /no-pricing options will disable either of those functions should the user want to only use one of them and not the other.
The main option to be aware of is /host-addr should the provider not be running on the default ports, the port spd is running on needs to be specified. Also an option which may need to be used in the future is the /target-price-usd, while this defaults today to $4 which is the target price to be within incentives range, should this $4 amount change in the future, then this command line flag will need to be used to set the new target price. So for example if the provider is running on port 14282 and the target price is now $3, start supervisor-lite with the following:
supervisor-lite /host-addr:localhost:14282 /target-price-usd:3.0
Auto starting Supervisor-lite
While the above process starts up supervisor-lite and it will continue running while the provider OS is up and running, upon a reboot or power outage, supervisor-lite would need manually restarting. So similar to starting up spd automatically, we recommend adding supervisor-lite to any existing auto startup script the provider may already have setup. If you have no auto startup script for spd currently, refer to the Linux Setup Guide for how to set that up. This guide will assume you already have a script setup to auto start spd.
To automatically start up supervisor-lite, follow the steps documented in the Windows CLI Setup Guide for auto starting the daemon on reboot but create a new bat file called startup_supervisor-lite.bat for example, in this file add the following if using the default 4282/4283 ports:
timeout 60 > NUL
supervisor-lite.exe
Or if using non-default ports, insert your host port in place of <HOST-PORT>:
timeout 60 > NUL
supervisor-lite.exe /host-addr:localhost:<HOST-PORT>
The ‘timeout 60 > NUL’ command is important as it gives spd time to start up fully and the api to be available to supervisor-lite. Now create a new task in Task Scheduler, following the same options but in the Actions section choose the startup_supervisor-lite.bat file to run.
Now test that supervisor-lite starts up automatically by reloading your provider PC, confirm that both spd and supervisor-lite are running by opening Task Manager, click on More Details if needed to see the full list of processes running and look for both spd and supervisor-lite running as below:
This shows both spd and supervisor-lite are running successfully after a reboot.