Why use the Hivenet agent for servers?
The Hivenet agent allows you to contribute your unused storage space to Hivenet. By doing this, you support the Hivenet ecosystem and earn storage space that can be used with your Hivenet account on different devices. It's particularly suitable for servers, NAS, or other systems where the traditional Hivenet desktop application might not be ideal.
Getting started:
Prerequisites:
You need a Hivenet user account. If you don't have one, sign up at hivenet.com.
Step 1: Install the Hivenet agent
You can download the Archive based on your processor architecture. The latest download commands are on our Downloads page.
Extract the files:
For amd64: tar -xvzf hive-disk-1.16.4_linux-amd64.tar.gz
For arm64: tar -xvzf hive-disk-1.16.4_linux-arm64.tar.gz
Move and set permissions:
sudo cp hive-agent /usr/local/bin/hive-agent
sudo chmod 755 /usr/local/bin/hive-agentCopy
Verify the installation:
hive-agent versionCopy
Step 2: Configure the Hivenet agent
Setup the configuration file:
Create a config.yaml file in your ~/.hive directory with the command:
hive-agent config init or copy the content provided.Copy
or copy the content below:
class: user
uploadplanelistenaddress: 0.0.0.0
uploadplanelistenport: 4443
uploadplaneprivatekey: MIIEowIB...ZuYFDLBYAaIQ5tWQ
uploadplanenodeid: QmVoN4xH9...pbZDqa1
ipfsnodeprivatekey: CAAS...b4GVQ==
ipfsnodeid: Qmf...EL
peerselectiontimeout: 2
loglevel: DEBUG
logrotationsize: 10
logrotationdays: 1
datalocation: ~/.hiveCopy
Important: Do not modify this file unless specifically instructed by support or as detailed in this documentation.
Validate configuration by running the code:
Run hive-agent config validateCopy
Set the contribution path: If you want to contribute from a specific directory, modify the data location field in the config.yaml file to your preferred path. Ensure the user operating the hive-agent has appropriate permissions for this directory.
Step 3: Start contributing
Launch the hive-agent daemon, specifying the space in GB you'd like to offer (at least 5 GB). Replace 'XX' with your contribution amount:
hive-agent contribute XXCopy
You can follow the on-screen instructions to complete the authentication challenge.
Important: Authentication Process Clarification
After running the command, the terminal will attempt to launch a browser session to link the Hivenet Agent with your Hivenet account. The session will not launch automatically if you're using a headless Linux environment or a setup without a browser installed.
In such cases, carefully observe the terminal output. It will provide a URL for authentication. Manually copy this URL and open it on an alternative device with browser access, like your smartphone or another computer. This step is crucial to successfully authenticate and link your agent.
After authentication, a refresh token will be encrypted and saved in your ~/.hive directory. You won't have to re-authenticate in the future.
To confirm a successful startup, look for the message: Agent started in: XXXXms in the logs.
Congratulations! By following these steps, you are now an integral part of the Hivenet network, actively offering your storage space to the network.