Skip to content
Guy Davis edited this page Nov 13, 2021 · 59 revisions

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.)

GenerateKey

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. See How To Create A Cold Wallet For Chia Coin and Chia Forks - a great video tutorial by Digital Spaceport:

Digital Spaceport

Advanced Configuration

Import SSH Private Key

Plotman supports an optional Archive feature that will copy completed plots to an archive disk via rsync. It relies upon the plotman process in-container to be able to ssh as the configured archive user into your rsync server. To add the required SSH private at start-up of the machinaris container, add the following to your docker run:

On Windows:

C:\Users\USER\.ssh\id_rsa:/id_rsa:ro

On Linux:

/Users/USER/.ssh/id_rsa:/id_rsa:ro

Be sure to change the USER name. This will mount your id_rsa private key file in the container read-only, configuring the local SSH to use it when connecting out to your rsync server.

Then you'll need to run plotman archive from the in-container CLI which will send plots when completed. For details on configuring the destination rsync server, see the Plotman wiki.

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.

If you want to use more than one mnemonic key file, you can pass them as a colon-separated list of in-container paths for example:

-e keys="/root/.chia/mnemonic1.txt:/root/.chia/mnemonic2.txt"

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.

Clone this wiki locally