github.com/dmmcquay/sia@v1.3.1-0.20180712220038-9f8d535311b9/cmd/siac/README.md (about) 1 Siac Usage 2 ========== 3 4 `siac` is the command line interface to Sia, for use by power users and 5 those on headless servers. It comes as a part of the command line 6 package, and can be run as `./siac` from the same folder, or just by 7 calling `siac` if you move the binary into your path. 8 9 Most of the following commands have online help. For example, executing 10 `siac wallet send help` will list the arguments for that command, 11 while `siac host help` will list the commands that can be called 12 pertaining to hosting. `siac help` will list all of the top level 13 command groups that can be used. 14 15 You can change the address of where siad is pointing using the `-a` 16 flag. For example, `siac -a :9000 status` will display the status of 17 the siad instance launched on the local machine with `siad -a :9000`. 18 19 Common tasks 20 ------------ 21 * `siac consensus` view block height 22 23 Wallet: 24 * `siac wallet init [-p]` initilize a wallet 25 * `siac wallet unlock` unlock a wallet 26 * `siac wallet balance` retrieve wallet balance 27 * `siac wallet address` get a wallet address 28 * `siac wallet send [amount] [dest]` sends siacoin to an address 29 30 Renter: 31 * `siac renter list` list all renter files 32 * `siac renter upload [filepath] [nickname]` upload a file 33 * `siac renter download [nickname] [filepath]` download a file 34 35 36 Full Descriptions 37 ----------------- 38 39 #### Wallet tasks 40 41 * `siac wallet init [-p]` encrypts and initializes the wallet. If the 42 `-p` flag is provided, an encryption password is requested from the 43 user. Otherwise the initial seed is used as the encryption 44 password. The wallet must be initialized and unlocked before any 45 actions can be performed on the wallet. 46 47 Examples: 48 ```bash 49 user@hostname:~$ siac -a :9920 wallet init 50 Seed is: 51 cider sailor incur sober feast unhappy mundane sadness hinder aglow imitate amaze duties arrow gigantic uttered inflamed girth myriad jittery hexagon nail lush reef sushi pastry southern inkling acquire 52 53 Wallet encrypted with password: cider sailor incur sober feast unhappy mundane sadness hinder aglow imitate amaze duties arrow gigantic uttered inflamed girth myriad jittery hexagon nail lush reef sushi pastry southern inkling acquire 54 ``` 55 56 ```bash 57 user@hostname:~$ siac -a :9920 wallet init -p 58 Wallet password: 59 Seed is: 60 potato haunted fuming lordship library vane fever powder zippers fabrics dexterity hoisting emails pebbles each vampire rockets irony summon sailor lemon vipers foxes oneself glide cylinder vehicle mews acoustic 61 62 Wallet encrypted with given password 63 ``` 64 65 * `siac wallet unlock` prompts the user for the encryption password 66 to the wallet, supplied by the `init` command. The wallet must be 67 initialized and unlocked before any actions can take place. 68 69 * `siac wallet balance` prints information about your wallet. 70 71 Example: 72 ```bash 73 user@hostname:~$ siac wallet balance 74 Wallet status: 75 Encrypted, Unlocked 76 Confirmed Balance: 61516458.00 SC 77 Unconfirmed Balance: 64516461.00 SC 78 Exact: 61516457999999999999999999999999 H 79 ``` 80 81 * `siac wallet address` returns a never seen before address for sending 82 siacoins to. 83 84 * `siac wallet send [amount] [dest]` Sends `amount` siacoins to 85 `dest`. `amount` is in the form XXXXUU where an X is a number and U is 86 a unit, for example MS, S, mS, ps, etc. If no unit is given hastings 87 is assumed. `dest` must be a valid siacoin address. 88 89 * `siac wallet lock` locks a wallet. After calling, the wallet must be unlocked 90 using the encryption password in order to use it further 91 92 * `siac wallet seeds` returns the list of secret seeds in use by the 93 wallet. These can be used to regenerate the wallet 94 95 * `siac wallet addseed` prompts the user for his encryption password, 96 as well as a new secret seed. The wallet will then incorporate this 97 seed into itself. This can be used for wallet recovery and merging. 98 99 #### Host tasks 100 * `host config [setting] [value]` 101 102 is used to configure hosting. 103 104 In version `1.2.2`, sia hosting is configured as follows: 105 106 | Setting | Value | 107 | -------------------------|-------------------------------------------------| 108 | acceptingcontracts | Yes or No | 109 | maxduration | in weeks, at least 12 | 110 | collateral | in SC / TB / Month, 10-1000 | 111 | collateralbudget | in SC | 112 | maxcollateral | in SC, max per contract | 113 | mincontractprice | minimum price in SC per contract | 114 | mindownloadbandwidthprice| in SC / TB | 115 | minstorageprice | in SC / TB | 116 | minuploadbandwidthprice | in SC / TB | 117 118 You can call this many times to configure you host before 119 announcing. Alternatively, you can manually adjust these parameters 120 inside the `host/config.json` file. 121 122 * `siac host announce` makes an host announcement. You may optionally 123 supply a specific address to be announced; this allows you to announce a domain 124 name. Announcing a second time after changing settings is not necessary, as the 125 announcement only contains enough information to reach your host. 126 127 * `siac host -v` outputs some of your hosting settings. 128 129 Example: 130 ```bash 131 user@hostname:~$ siac host -v 132 Host settings: 133 Storage: 2.0000 TB (1.524 GB used) 134 Price: 0.000 SC per GB per month 135 Collateral: 0 136 Max Filesize: 10000000000 137 Max Duration: 8640 138 Contracts: 32 139 ``` 140 141 * `siac hostdb -v` prints a list of all the know active hosts on the 142 network. 143 144 #### Renter tasks 145 * `siac renter upload [filename] [nickname]` uploads a file to the sia 146 network. `filename` is the path to the file you want to upload, and 147 nickname is what you will use to refer to that file in the 148 network. For example, it is common to have the nickname be the same as 149 the filename. 150 151 * `siac renter list` displays a list of the your uploaded files 152 currently on the sia network by nickname, and their filesizes. 153 154 * `siac renter download [nickname] [destination]` downloads a file 155 from the sia network onto your computer. `nickname` is the name used 156 to refer to your file in the sia network, and `destination` is the 157 path to where the file will be. If a file already exists there, it 158 will be overwritten. 159 160 * `siac renter rename [nickname] [newname]` changes the nickname of a 161 file. 162 163 * `siac renter delete [nickname]` removes a file from your list of 164 stored files. This does not remove it from the network, but only from 165 your saved list. 166 167 * `siac renter queue` shows the download queue. This is only relevant 168 if you have multiple downloads happening simultaneously. 169 170 #### Gateway tasks 171 * `siac gateway` prints info about the gateway, including its address and how 172 many peers it's connected to. 173 174 * `siac gateway list` prints a list of all currently connected peers. 175 176 * `siac gateway connect [address:port]` manually connects to a peer and adds it 177 to the gateway's node list. 178 179 * `siac gateway disconnect [address:port]` manually disconnects from a peer, but 180 leaves it in the gateway's node list. 181 182 #### Miner tasks 183 * `siac miner status` returns information about the miner. It is only 184 valid for when siad is running. 185 186 * `siac miner start` starts running the CPU miner on one thread. This 187 is virtually useless outside of debugging. 188 189 * `siac miner stop` halts the CPU miner. 190 191 #### General commands 192 * `siac consensus` prints the current block ID, current block height, and 193 current target. 194 195 * `siac stop` sends the stop signal to siad to safely terminate. This 196 has the same affect as C^c on the terminal. 197 198 * `siac version` displays the version string of siac. 199 200 * `siac update` checks the server for updates.