Keys - guydavis/machinaris GitHub Wiki
Setup
On first run of Machinaris as fullnode or farmer, you'll need to either import a key or generate a new one. (Note, if running a stripped down Machinaris worker such as a harvester or plotter, the private key is not necessary.)
Import Key Mnemonic
If browsing to your localhost running Machinaris, you may simply enter your 24-word single-space single-line mnemonic seed phrase into the form shown. Machinaris will write it to /root/.chia/mnemonic.txt
in the container, add to the Chia keys, and start services.
If not browsing localhost, you may prefer to enter the mnemonic directly into a file yourself, then restart the Machinaris container. Details below.
OR Generate New Key
If you don't have an existing private key to import, just launch Machinaris and browse to the WebUI on port 8926. You'll be presented with a screen where you can choose to have one generated for you. Just click 'Generate New Key' to proceed.
View Public Key
Click the link 'Settings | Keys' in Machinaris to view public key details. Alternatively, you can execute the chia show wallet
command from in-container (docker exec -it machinaris bash
)
View Private Key
However, the Machinaris WebUI won't show your existing private key for security. To view private key details securely, you need to access the file described above on your host filesystem.
Your new key can be found at /root/.chia/mnemonic.txt in the container. This usually maps to these locations on the host OS:
- Linux:
~/.machinaris/mnemonic.txt
- Windows:
C:/Users/USERNAME/.machinaris/mnemonic.txt
- Unraid:
/mnt/user/appdata/machinaris/mnemonic.txt
Alternatively execute chia wallet show --show-mnemonic-seed
from in-container (docker exec -it machinaris bash
).
Using a Cold Wallet
All Chia users, including all Machinaris users, are strongly encouraged to create a cold wallet to send any wins/payouts. Most importantly, a cold wallet can avoid losses if you are hacked.
See How To Create A Cold Wallet For Chia Coin and Chia Forks - a great video tutorial by Digital Spaceport:
NOTES:
- DO NOT add your new cold wallet mnemonic to Machinaris as a 2nd private key. This defeats the purpose of a cold wallet.
- DO enter your cold wallet address (xch123456...) on the Wallets page of the Machinaris WebUI. Choose the blockchain row (like Chia), and click the 'Edit Wallet' button on the right-side of that blockchain row. Enter your cold wallet address (xch12345....) there. This will ensure your cold wallet balance, retrieved from AllTheBlocks, is included in the total "Wallet Balance" amount on the Summary and Wallets pages.
Advanced Configuration
File Mnemonic Import
To manually add your file, with an existing mnemonic-seed (24 words, space-separated, single-line) to use, place the single line into a text file named mnemonic.txt
in above /home/user/.machinaris
or similar (/mnt/user/appdata/machinaris
on Unraid) host volume. In-container, this will be found at /root/.chia/mnemonic.txt
.
Multiple Keys
For farming multiple plots from different sources, you can specify multiple mnemonic key path files (default is just ~/.machinaris/mnemonic.txt
) on your fullnodes (not harvesters and/or plotters).
If you want to use more than one mnemonic key file, you can pass them as a colon-separated list of in-container paths in an environment variable of you docker-compose.yml:
machinaris:
image: ghcr.io/guydavis/machinaris:latest
...
volumes:
...
environment:
...
- keys=/root/.chia/mnemonic1.txt:/root/.chia/mnemonic2.txt
ports:
...
However, be warned that 2nd (and higher) keys/wallets will not sync and thus show as "behind" in the Machinaris WebUI. This is due to the fact that the Chia CLI (just like the GUI) can only sync a single wallet/key at a time! Just the act of calling chia wallet show
and to see details of a wallet by number, actually stops syncing other wallet/keys. Machinaris does not yet have support for time-rotating thru wallet syncing.
Docker Secrets
As an alternative to above, if you wish to use the Secrets mechanism of docker-compose
to store your mnemonic, update your docker-compose.yml as follows:
version: '3.7'
services:
machinaris:
image: ghcr.io/guydavis/machinaris:latest
container_name: machinaris
hostname: aragorn
restart: always
volumes:
- ~/.machinaris:/root/.chia
- "/mnt/plots:/plots1"
- "/mnt/temp:/plotting"
environment:
- TZ=America/Edmonton
- mode=fullnode
- worker_address=192.168.1.129
- plots_dir=/plots1
- blockchains=chia
ports:
- 8926:8926
- 8927:8927
- 8444:8444
- 8447:8447
secrets:
- mnemonic
secrets:
mnemonic:
file: ./mnemonic.txt
You can even use a separate read-only volume to mount just your mnemonic.txt at startup. For example, if your mnemonic is in ~/keyfile on your host, then pass -v ./keyfile:/root/.chia/mnemonic.txt:ro
Persistent Keys
As an advanced user, if you would prefer to not provide a mnemonic phrase, then you are welcome to manage keys yourself. This could include importing a keyring or performing other actions at the CLI. To have Machinaris skip over any key management, simply set the keys
environment variable to persistent
and restart the container.
FAQ
Chia v1.3 changed my first wallet address!
Yes, this change of the 'First wallet address' when one upgrades to Chia v1.3 (Machinaris v0.7.0+) confused many users. Nothing nefarious has happened. Please see details here.