Force folder remove

Generally, in case you run into folder data corruption or inaccessibility you need to send this api POST call:

(From CLI and not from inside the UI)

curl -A "SiaPrime-Agent" -u "":<apipassword> --data "path=<the shared folder path>&force=true" localhost:4280/host/storage/folders/remove

to force removal of that folder from the shared folders list. Replace the <apipassword> with the string you can find in the apipasssword file and the <the shared folder path> with the path it is listed in the host folder list.

But that (the&force=true part of the post data) should be used only after trying to remove folder “normally” with spc or ui terminal, that is suggest first try the ways without the force.

Note that:

is the api endpoint

SiaPrime Wallet batch file and additional information

Windows 8/10 info:

Locate your SiaPrime 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 minimised (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!

SiaPrime Wallet Commands

If you’re comfortable with the command-line, you can interact with SiaPrime in powerful ways. This is a list of all the commands that SiaPrime understands, and a brief description of what they do.

These can be accessed at any time by using spc help.

All commands start with spc and are followed by a flag or a command.


spc [flags]

spc [command]


You can also use the Terminal in SiaPrime-UI. When doing so, you can type commands without adding spc.


Print the current state of consensus such as current block, block height, and target.


spc consensus [flags]


-h or --help – help for consensus

-v or --verbose – Display full consensus information

Example output

Synced: Yes

Block:      00000000000000009e74c12f68393e108e3d7d2faad15b46c8a76dd42015fb58

Height:     211104

Target:     [0 0 0 0 0 0 0 9 143 142 0 142 95 25 215 124 32 25 172 35 130 182 56 62 38 203 72 1 134 122 250 161]

Difficulty: 1929422247688414200


View and manage the gateway’s connected peers.


spc gateway [flags] or spc gateway [command]


-h or --help – help for gateway

Example output

Address: (this is the address of your SiaPrime node)

Active peers: 80


Help about any command.


spc [flags] or spc [command]

Example output

SiaPrime Client v1.3.5.2


  spc [flags]

  spc [command]

Available Commands

  consensus   Print the current state of consensus

  gateway     Perform gateway actions

  help        Help about any command

  host        Perform host actions

  hostdb      Interact with the renter's host database.

  miner       Perform miner actions

  renter      Perform renter actions

  stop        Stop the SiaPrime daemon

  update      Update SiaPrime

  utils       various utilities for working with SiaPrime's types

  version     Print version information

  wallet      Perform wallet actions


View or modify host settings.


spc host [flags] or spc host [command]

Available Commands

  announce    Announce yourself as a host

  config      Modify host settings

  contracts   Show host contracts

  folder      Add, remove, or resize a storage folder

  sector      Add or delete a sector (add not supported)


-h or --help – help for host

-v or --verbose – Display detailed host info


View the list of active hosts, the list of all hosts, or query specific hosts. If the ‘-v’ flag is set, a list of recent scans will be provided, with the most recent scan on the right. a ‘0’ indicates that the host was offline, and a ‘1′ indicates that the host was online.


spc hostdb [flags] or spc hostdb [command]

Available Commands

  view        View the full information for a host.


-h or --help – help for host

-v or --verbose – Display detailed host info

-n, or —numhosts int – Number of hosts to display from the hostdb


Perform miner actions and view miner status.


spc miner [flags] or spc miner [command]

Available Commands

  start       Start cpu mining

  stop        Stop mining


-h or --help – help for miner


Perform renter actions – upload, download, rename, delete, load, or share files.


spc renter [flags] or spc renter [command]

Available Commands

  allowance            View the current allowance

  contracts            View the Renter's contracts

  createbackup         Create a backup of the renter's SiaPrime files

  delete               Delete a file

  download             Download a file

  downloads            View the download queue

  export               export renter data to various formats

  list                 List the status of all files

  loadbackup           Load a backup of the renter's SiaPrime files

  prices               Display the price of storage and bandwidth

  recoveryscanprogress Returns the recovery scan progress.

  rename               Rename a file

  setallowance         Set the allowance

  triggerrecoveryscan  Triggers a recovery scan.

  upload               Upload a file or folder

  uploads              View the upload queue


-h or --help – help for renter

-v or --verbose – Display detailed renter info


Stop the SiaPrime daemon.


spc stop [flags]


-h or --help – help for stop


Check for (and/or download) available updates for SiaPrime.


spc update [flags] or spc update [command]

Available Commands

  check       Check for available updates


-h or --help – help for update


Various utilities for working with SiaPrime’s types. These commands do not require spc.


spc utils [command]

Available Commands

  bash-completion Creates bash completion file.

  checksig        verify a signature of the specified hash

  decoderawtxn    convert a base64-encoded transaction to JSON

  encoderawtxn    convert a JSON-encoded transaction to base64

  hastings        convert a currency amount to Hastings

  man-generation  Creates unix style manpages.

  sighash         calculate the SigHash of a transaction

  verify-seed     verify seed is formatted correctly


-h or --help – help for utils


Print version information.


spc version [flags]


-h or --help – help for version

Example output

SiaPrime Client


Git Revision 15b9779

Build Time  Mon Dec 17 20:54:32 CST 2018

SiaPrime Daemon


Git Revision 15b9779

Build Time  Mon Dec 17 20:54:32 CST 2018


Perform wallet actions – generate a new address, send coins to another wallet, or view info about the wallet.


spc wallet [flags] or spc wallet [command]

Available Commands

  address         Get a new wallet address

  addresses       List all addresses

  balance         View wallet balance

  broadcast       Broadcast a transaction

  change-password Change the wallet password

  init            Initialize and encrypt a new wallet

  init-seed       Initialize and encrypt a new wallet using a pre-existing seed

  load            Load a wallet seed, v0.3.3.x wallet, or spcg keyset

  lock            Lock the wallet

  seeds           View information about your seeds

  send            Send either SiaPrimeCoins or SiaPrimeFunds to an address

  sign            Sign a transaction

  sweep           Sweep SiaPrimeCoins and SiaPrimeFunds from a seed.

  transactions    View transactions

  unlock          Unlock the wallet


-h or --help – help for wallet


The smallest unit of SiaPrimeCoins is the hasting. One SiaPrimeCoin is 10^24 hastings. Other supported units are:

  pS (pico,  10^-12 SCP)

  nS (nano,  10^-9 SCP)

  uS (micro, 10^-6 SCP)

  mS (milli, 10^-3 SCP)


  KS (kilo, 10^3 SCP)

  MS (mega, 10^6 SCP)

  GS (giga, 10^9 SCP)

  TS (tera, 10^12 SCP)

Global flags

  -a, --addr string            which host/port to communicate with (i.e. the host/port spc is listening on) (default "localhost:9980")

      --apipassword string     the password for the API's http authentication

  -h, --help                   help for spc

  -d, --spc-directory string   location of the SiaPrime directory (default "/Users/username/Library/Application Support/SiaPrime")

      --useragent string       the useragent used by spc to connect to the daemon's API (default "SiaPrime-Agent")a


error when calling /wallet/siacoins: unable to fund transaction: wallet has coins spent in incomplete transactions – not enough remaining coins

If you are trying to send 100% of your wallet balance, you should know that the wallet does have a fee built in so you can’t send 100% of the balance in your wallet – you can try sending smaller amounts.

If that does not solve your problem then: Reinitialize the wallet. Please, before doing this, make sure you have your seed words available.. then Go to the terminal tab in the wallet and type: wallet init-seed –force It will prompt you for your seed words – after it loads, try again to send coins at this point.

If you get a message at this point saying “API authentication failed” then go to the about tab and click on Show SiaPrime Data which on Windows will place you on a path like: C:\Users\username\AppData\Roaming\SiaPrime-UI

At this point, close out of the wallet, including right clicking the icon on the task bar and quitting from there and then you want to rename the SiaPrime-UI folder to SiaPrime-UI-backup then open the wallet again.  The wallet will re-sync and you will need to type in your seed words to open the wallet and should now be able to send coins.


SiaPrime allows for local passwords for a seed to be set. By default the password will be the seed. If a custom password is set, it may not be saved through version updates, so try the seed again.

You may notice the seed and password are (by default) identical; this is expected behavior. SiaPrime allows users to create an easy to remember passphrase distinct from the seed, but the seed is the true password and the only way a user can recover a wallet in the case of corruption of wallet loss or on a different installation.

Wallet Re-Initialize (Force rescan)

Occasionally a transaction pertaining to your wallet can be missed. To force a rescan, open the ‘Terminal’ tab of the UI, and use the command ‘wallet init-seed –force’. Use your seed when asked. The rescan will take some time to complete.

Loading a Seed

On a fresh install: open the ‘Wallet’ tab of the UI and select “Load a wallet from a seed”. Enter your seed for both the seed and password fields. Password can be changed afterward via ‘Change Password’ in the ‘Wallet’ tab, but note this password applies only to this specific installation of SiaPrime (and never touches the blockchain).

On an existing install/wallet already loaded: either recover/sweep the seed (see above FAQ), or force the UI to switch primary wallet to new seed by opening the ‘Terminal’ tab and using the command ‘wallet init-seed –force’. As always, keep backups of seeds.

Recover Seed

Recover Seed “sweeps” or transfers all of the balance of the entered seed in to the wallet currently loaded.

Updating SiaPrime

Close SiaPrime completely. Download the latest wallet. Extract the downloaded files in to a new location, or on top of an existing install (when asked to replace or duplicate the files, click replace all).

Moving the Consensus Database or Internal Data Files

1) Run SiaPrime at least once. This will generate the necessary files.

2) Find the files by clicking ‘Show SiaPrime Data’ in the ‘About’ tab of the SiaPrime-UI.

3) Close SiaPrime completely (see below FAQ).

4) Move the ‘siaprime’ folder from this internal data folder to your desired location (ex. D:\)

5) Edit ‘config.json’ from the root of the internal data folder, and change the ‘datadir’ to the new ‘siaprime’ folder location. Leave the remaining handful of files (including ‘config.json’) in their original location.