This guide explains how to securely back up Fiber node data to safeguard funds, maintain node identity, and ensure smooth migration or upgrades. Never store plaintext private keys, as they risk theft if exposed.
Backups protect:
- Funds: The encrypted private key (
ckb/key) and its password (FIBER_SECRET_KEY_PASSWORD) are critical for accessing funds. Losing either makes funds unrecoverable. - Node Identity: The network ID key (
fiber/sk) allows other nodes to recognize your node. Losing it disrupts network communication.
Warning: Always stop the node before backing up to prevent data corruption, which could cause errors or loss of funds.
Back up the entire node directory (fiber-dir), which includes:
ckb/key(encrypted private key)fiber/sk(network ID key)fiber/store(database files)config.yml(configuration)
Steps:
- Stop the Node:
# Check for running node processes ps aux | grep fnn # Example output: ckb 3585187 0.7 2.4 756932 194052 ? Sl May07 71:52 ./fnn -c ./fiber-dir/config.yml -d ./fiber-dir # Terminate it (replace 3585187 with your process ID) kill 3585187
- Create Backup:
tar -zcvf fiber-dir.tar.gz fiber-dir
- Store Securely: Save
fiber-dir.tar.gzand theFIBER_SECRET_KEY_PASSWORDin an offline, encrypted environment (e.g., an encrypted drive or password manager).
Note: A future update will allow backups without stopping the node. Check release notes for updates.
Steps:
- Extract Backup:
tar -zxvf fiber-dir.tar.gz
- Start Node:
FIBER_SECRET_KEY_PASSWORD='YOUR_PASSWORD' ./fnn -c ./fiber-dir/config.yml -d ./fiber-dir
Warning: Using the wrong password will trigger a startup error (Secret key file error: decryption failed). Double-check the password before starting.
If you lose the FIBER_SECRET_KEY_PASSWORD but have a plaintext private key (not recommended), you can reset the password.
Steps:
- Extract Backup:
tar -zxvf fiber-dir.tar.gz
- Remove Encrypted Key:
rm -rf fiber-dir/ckb
- Add Plaintext Key:
mkdir fiber-dir/ckb echo "YOUR_PLAINTEXT_KEY" > fiber-dir/ckb/key
- Start Node with New Password:
FIBER_SECRET_KEY_PASSWORD='NEW_PASSWORD' ./fnn -c ./fiber-dir/config.yml -d ./fiber-dir - Secure the Key: The
ckb/keyfile will be re-encrypted with the new password. Store the new password securely.