Managing Node Service
This section explains how to start, stop, and restart your HOPRd node, as well as where to find important files such as the database, log files, identity key, and configuration.
Winning tickets that haven't been redeemed are lost when you stop or restart your node. Before a planned stop, follow Unredeemed tickets and restarts.
Select the platform where your HOPRd node is running to view the relevant service management instructions and file paths:
- Docker
- Docker Compose
- Dappnode
- Binary
After installing the HOPRd node using Docker, the following directories and files are created:
| Purpose | Path | Description |
|---|---|---|
| Identity file | $HOME/hoprd/hopr.id | Stores the node’s identity. |
| Configuration file | $HOME/hoprd/hoprd-docker.cfg.yaml | Stores the node’s configuration. |
| Data directory | $HOME/hoprd/data | Contains the node’s database. Mounted inside the container at /app/hoprd-db/data. |
When using Docker, your HOPRd node runs inside a container in the background.
Start the HOPRd node
-
Remove the old container
Ensure that you have removed the old HOPR Docker container. You can find more details here.
-
Ensure your configuration file is filled in
Ensure that your configuration file
~/hoprd/hoprd-docker.cfg.yamlis filled in, as described in Configure your node. -
Run your HOPR command
Run the Docker command by pasting it into the terminal.
Stop the HOPRd node
To stop your current HOPR node, we will perform the HOPR Docker container removal procedure.
-
Find the container ID
Connect to your machine and execute the command
docker ps. This will provide you with a list of Docker containers you are currently running. Among them, locate the container with the label europe-west3-docker.pkg.dev/hoprassociation/docker-images/hoprd:stable and note the container ID. -
Remove the container
Remove the container using the following command:
docker rm -f <Your_Container_ID>. Replace<Your_Container_ID>with your container ID.Example:
docker rm -f 4951b2990936
Using the installation method with Docker Compose, here is a list of folders and files that are downloaded and prepared in advance:
| Purpose | Path | Description |
|---|---|---|
| Configuration & Identity | $HOME/compose/hoprd/conf/ | Contains pre-downloaded configuration file hoprd.cfg.yaml and identity file hopr.id. |
| Secrets File | $HOME/compose/.env-secrets.sample | Contains sensitive values like the identity DB password, REST API token, and metrics push key. |
| Environment Configuration | $HOME/compose/.env.sample | Defines general node settings, such as ports and the HOPRd release version. |
| Data Directory | $HOME/compose/hoprd/data/ | Placeholder directory to store the node’s database and runtime data at runtime. |
When using Docker Compose, your HOPRd node runs in a managed container environment in the background.
Start the HOPRd node
-
Go to your compose folder
-
Start the hoprd profile
Use the profiles feature to start only the hoprd profile associated with the hopr node.
Run the following command:
COMPOSE_PROFILES=hoprd docker compose up -d
Stop the HOPRd node
-
Go to your compose folder
-
Stop the hoprd profile
Use the profiles feature to stop only the hoprd profile associated with the hopr node.
Run the following command:
COMPOSE_PROFILES=hoprd docker compose down
After installing the HOPRd package via DAppNode, the following directories and files are created inside the container:
| Purpose | Path | Description |
|---|---|---|
| Configuration files | /app/hoprd/conf | Contains configuration files like hoprd.cfg.yaml and hopr.id. |
| Data directory | /app/hoprd/data | Stores the node’s database and runtime data. |
The HOPRd package operates within a managed containerized environment, managed by DAppNode using Docker Compose to ensure reliable and autonomous background execution.
Start the HOPRd node
-
Connect to your Dappnode dashboard
-
Start your HOPR node
Start your HOPR node based on your current needs:
- To resume an existing HOPR package, navigate to Packages, select the HOPR package, and click the Play icon to activate it.
- To set up a new HOPR package, please refer to this guide.
Stop the HOPRd node
-
Connect to your Dappnode dashboard
-
Pause the HOPR package
Go to Packages, click HOPR package, click on Pause icon to stop HOPR package.
After installing the HOPRd node with the Binary guide, the following directories and files are used:
| Purpose | Path | Description |
|---|---|---|
| Binary | /root/hoprd/hoprd | The HOPRd binary. |
| Configuration file | /root/hoprd/conf/hoprd-binary.cfg.yaml | Stores the node’s configuration. |
| Identity file | /root/hoprd/conf/hopr.id | Stores the node’s identity. |
| Data directory | /root/hoprd/data | Contains the node’s database. |
The Binary guide sets up a systemd service named hoprd, which you can manage using systemctl. The node writes its logs to the systemd journal.
Start the HOPRd node
-
Open Terminal application
-
Run the start command
Run the following command to start HOPRd node:
sudo systemctl start hoprd
Stop the HOPRd node
-
Open Terminal application
-
Run the stop command
Run the following command to stop HOPRd node:
sudo systemctl stop hoprd
Restart the HOPRd node
-
Open Terminal application
-
Run the restart command
Run the following command to restart HOPRd node:
sudo systemctl restart hoprd
Check the HOPRd node status
Displays the current status, including whether it's active and recent log output.
-
Open Terminal application
-
Run the status command
Run the following command to check HOPRd node status:
sudo systemctl status hoprd
View logs
sudo journalctl -u hoprd -f
If you need help, save the logs to a file and share it with the Ambassadors or Moderators:
sudo journalctl -u hoprd > "hoprd_$(date +%F).log"
Upgrade to a new version
Download and check the new binary as in Download the HOPRd binary, using the new version in the URL. Then replace the binary and restart:
sudo systemctl stop hoprd
sudo mv hoprd-<ARCH>-linux /root/hoprd/hoprd
sudo chmod +x /root/hoprd/hoprd
sudo systemctl start hoprd
Keep your hopr.id, identity password and configuration file. If the release notes mention configuration changes, update hoprd-binary.cfg.yaml and check it again with hoprd-cfg.
Uninstall
Uninstalling deletes your identity file. Back up /root/hoprd/conf/hopr.id and your identity password first, or you can't restore this node.
sudo systemctl disable --now hoprd
sudo rm /etc/systemd/system/hoprd.service
sudo systemctl daemon-reload
sudo rm -rf /root/hoprd