ScPrime Wallet batch file and additional information

You are here:
  • KB Home
  • Hosting
  • ScPrime Wallet batch file and additional information

Windows 8/10 info:

Locate your ScPrime wallet.
Right click and make a new text document then edit it to include the following:

start /MIN “ScPrime daemon” %LocalAppData%\Programs\SiaPrime-UI\resources\bin\spd -d %AppData%\SiaPrime-UI\siaprime -M gctwh
start “ScPrime UI” %LocalAppData%\Programs\SiaPrime-UI\SiaPrime-UI.exe

Then do a file/save as
change the type to “all files”
then give the file a name that ends in .bat such as test.bat

Now we’re going to do the steps to have this be included in your computer’s startup.

Right click on the new.bat file you made and select copy from the drop downs.

Press Start, type Run, and press Enter.
In the Run window, type shell:startup
Press enter. This will open the Startup folder.

Then right click inside the startup folder and right click and paste a shortcut to your bat file.



Additional information:

To explain the spd start line:

start launches a new process
/MIN sets the window state to minimized (optional)
“ScPrime daemon” is the title of the window where the spd daemon runs
%LocalAppData%\Programs\SiaPrime-UI\resources\bin\spd is the path to the spd executable. This particular is the default location if you have the UI installed.
-d %AppData%\SiaPrime-UI\siaprime specifies the path to the node metadata directory. Again, this particular is the default if you installed the UI. You have to specify the right path if you want the metadata directory reside somewhere else (for example, different drive would look something like -d D:\scprime)
-M gctwh is the modules list. g=gateway c=consensus t=transactionpool w=wallet and h=host
That gctwh is the minimum set of modules required for hosting. The default (if you don’t specify) is gctwhr meaning the renter module added to all the hosting modules. You can omit the h for renting nodes, then the daemon does not start the host module.

If you do not need the UI or anything else after launching the daemon you can omit the start /MIN “ScPrime daemon” part.


you can put the autounlock password in that batch file too.
Add a line before the start /MIN “ScPrime daemon” %LocalAppData%\Programs\Si…
And put @SET SCPRIME_WALLET_PASSWORD=<your wallet unlock password> in it.
the @ means do not display that line,
SET means set the environment variable.
SCPRIME_WALLET_PASSWORD is the name of the env variable.
<your wallet unlock password> is your wallet unlock password without quotation or any other (< and >) characters not belonging to the password.
And again, I suggest to set a custom password to your wallet so you don’t need to put your seed in that file.
The local (custom) password for your wallet is valid only on the instance you put it, if someone copies your batch file the password found in there won’t work on any other machine



Linux info:


Write a small batch file, there insert your commands there and start the file when booting the computer.

All variables are then valid only within the shell of the call.

Here is an example of a file: Place the location of the file in the /etc/rc.local so that the host will be started on startup ….

Example of file you can edit and use.


HOME=/Directory/where/ScPrime/Saved/SIA # <– change /Directory/where/ScPrime/Saved/SIA
cd $ HOME
date >> ./start_spd.log

# change Especially_secure_password !!
export SCPRIME_WALLET_PASSWORD=”Especially_secure_password”
# start with user right –> change not_privileged_user !!
su not_privileged_user -c “./spd -M gctwh -d ScPrimeDB/ >> ./start_spd.log &”

# have fun!