Miner Key Encryption and Manual Unlock
Migrate a registered miner on Linux to an encrypted keystore with the native dex binary. Enter the passphrase at startup to unlock the same miner identity.
| Item | Value |
|---|---|
| Startup | Linux dex release binary with keystore flags and an interactive terminal |
| Source file | Private regular file with one 64-character hexadecimal key |
| Plaintext cleanup | The node keeps the source by default. On Linux, opt in to cleanup after startup. |
Switch the key source and start the node
Stop the old instance and confirm it has exited. In the native dex binary, use ./dex --help to check for --keystore, --keystore-import-from, and --delete-keystore-import-source. Replace the miner key FD argument with the keystore arguments. Keep the existing network configuration, peers, bootstrap mode, listen and advertised addresses, miner address, data directory, and --resume=true. Continue supplying the original FROST wrap key through its own FD when FROST is enabled.
- Use private paths and create the keystore parent directory before startup. Set the source file to mode 0600. Use the actual configuration, address, endpoint, and data directory for the miner.
- On first import, enter the same passphrase twice in the terminal. The passphrase must be at least 12 bytes. The node writes the keystore with private permissions, decrypts it to verify the key, then starts. On later starts, enter the passphrase once.
- Manual unlock requires an interactive terminal. A regular systemctl start does not send the prompt to the terminal of the caller. When using manual unlock, arrange an operator for each startup and disable unattended restarts with Restart=no.
- Check synchronization, same-height block IDs, and public TCP and UDP reachability as described in Quick Node Deployment. Startup readiness and mining eligibility are separate checks.
MINER_ADDRESS='REPLACE_WITH_REGISTERED_0X_ADDRESS'
MINER_ENDPOINT='YOUR_PUBLIC_IPV4:19000'
./dex \
--config-dir /etc/dex/miner \
--peers /etc/dex/miner/peers.json \
--bootstrap-mode latejoin \
--advertise-addr "$MINER_ENDPOINT" \
--expected-address "$MINER_ADDRESS" \
--data-dir "/var/lib/dex/$MINER_ADDRESS" \
--resume=true \
--keystore /etc/dex/miner.v3.json \
--keystore-import-from /secure-import/miner.key \
--no-simulatorOptional cleanup after startup
After confirming that a separate offline backup can recover the miner key, add --delete-keystore-import-source after --no-simulator in the same Linux command. Keep both --keystore and --keystore-import-from. The node verifies that the keystore unlocks to the source key, waits until its listeners are ready, and syncs the keystore and its directory before deleting the specified plaintext file.
- Keep the source and keystore paths under the control of root or the node account. Cleanup requires a private regular source file with a single hard link. If startup fails or the files fail verification, the source remains available.
- Fix the failure and retry the same command. An existing keystore unlocks before the node checks the source for cleanup. With the source already removed, the same command unlocks and starts normally.
- Cleanup covers the specified source path. Manage Docker-installed plaintext copies, backups, and snapshots separately. Keep a controlled recovery copy for registration or endpoint tools that take a private-key FD.