Skip to main content
All CollectionsStoreHivenet cloud
How can I run the Hivenet agent with Docker?
How can I run the Hivenet agent with Docker?

This guide details setting up and running the Hivenet agent in a Docker container to earn storage space for your Hivenet account.

Thanasis Karavasilis avatar
Written by Thanasis Karavasilis
Updated over a month ago

Applies to: Individuals with servers, NAS, or other support systems looking to contribute to Hivenet.


How to install

1. Pull the latest docker image:

docker pull hivecomputing/hive-disk:latest

How to use

1. Set up a default configuration:

  • Create a directory for persistent data and configuration:

mkdir hivedata
sudo chown :4200 hivedata
sudo chmod 775 hivedata
sudo chmod g+s hivedata
  • Run the following command to generate a config.yaml file:

docker run -p 8080:8080 -p 4443:4443 -p 4001:4001 -v /etc/machine-id:/etc/machine-id -v /var/lib/dbus/machine-id:/var/lib/dbus/machine-id -v ${PWD}/hivedata:/home/hive/.hive hivecomputing/hive-disk:latest hive-agent config init

This command will save the configuration in your docker ~/.hive directory.

2. Start the hive-agent Daemon:

Begin contributing storage space by starting the hive-agent daemon. Replace XX with the amount of space in GB (minimum 5 GB):

docker run -p 8080:8080 -p 4443:4443 -p 4001:4001 -v /etc/machine-id:/etc/machine-id -v /var/lib/dbus/machine-id:/var/lib/dbus/machine-id -v ${PWD}/hivedata:/home/hive/.hive hivecomputing/hive-disk:latest hive-agent contribute XX
  • Follow the authentication instructions in the output, including accessing the challenge URL in a web browser.

  • Once authenticated, a refresh token will be securely stored in your ~/.hive directory, negating the need for future challenges.

  • Upon successful start, you will see a confirmation message indicating your contribution to the Hivenet network.

Note: Ensure that the hive-agent daemon user has appropriate permissions for the specified path. This setup is critical for securing and effectively contributing to the Hivenet network.


Troubleshooting: If you encounter any issues during the setup or operation, ensure that:

  • The Docker commands are executed correctly.

  • The user has the necessary permissions.

  • The network settings are correctly configured for Docker.

For further assistance, visit our Support Page or contact Hivenet support.

Did this answer your question?