Starting a Node

To start your Fermah Prover Node, follow the instructions below.

Machine Limits

We need to modify the maximum open files and unix socket buffers to increase their limits.

Open Files

sudo echo "fermah	soft	nofile	65535" >> /etc/security/limits.conf
sudo echo "fermah	hard	nofile	65535" >> /etc/security/limits.conf

Unix Socket Buffers

sudo sysctl -w net.core.wmem_max=16777216
sudo sysctl -w net.core.rmem_max=16777216

Start

Run the command:

fpn

This command will start the prover-node binary, which connects you to our network using the provided key and wait for Proof Requests. It will also periodically check for updates and install them in the background.

Make sure the configuration file exists at ~/.fermah/config/prover-node-config.toml

Daemonization

Service File

  1. Create the file /etc/systemd/system/fermah.service

  2. Set permissions sudo chmod 644 /etc/systemd/system/fermah.service

Logrotate

  1. Create the file /etc/logrotate.d/fermah

  2. Set permissions sudo chmod 644 /etc/logrotate.d/fermah

Enable service

Headless Password

If you are using a password for your machine keystore file, you can start the process headless with no prompts, by using the env var FERMAH_KEYSTORE_PW_FILE and setting it to the absolute path to the file containing the password.

Keep in mind these security considerations:

  • Set password file permissions to 600

  • Ensure the keystore file has 600 permissions.

  • Run the systemd service with a non root user and owning both keystore file and password file

Last updated

Was this helpful?