This is the agent program of NodeCook. It is responsible for run the jobs like ping, tcping, http, etc from the NodeCook server. Which is written in Rust and need only a few system resources.
- Lightweight: Only a few system resources are needed.
- Fast: Written in Rust, it is very fast.
- Secure: It is safe to run the agent on your server and protect by api key.
- Open Source: All source code is open source and you don't need to worry about the security.
You can install the agent by the following methods.
First of all, you need to get the api key from the NodeCook website.
- Docker or Docker Compose installed.
- A server with public ip address or the NodeCook server can access the agent.
- Firewall rules to allow the NodeCook server can access the agent, default port is
4000
.
wget https://raw.githubusercontent.com/nodecook/agent/main/compose.yaml -O compose.yaml
export NCA_API_KEY=your_api_key
docker compose up -d
docker run -d --user=root --name nodecook-agent -e NCA_API_KEY=your_api_key --restart=always --network=host ghcr.io/nodecook/agent
There are some environment variables you can use to configure the agent.
The port the agent listens on. Default is 4000
.
The api key you get from the NodeCook website.
If set to true
, the agent will print debug information. Default is false
.
Endpoint for agent to access, default is http://your_server_ip:${NCA_PORT}
, if you are behind proxy, you should set this to your public address.
If set to true
, the agent will only use ipv4 to access the server. Default is false
.
If set to true
, the agent will only use ipv6 to access the server. Default is false
.
Please check your api key and the agent's status. If the agent is running, you can check the logs or set NCA_DEBUG
to true
to see the debug information.
The agent requires access to some system resources, such as network interfaces, and therefore needs to be run as root.
No, the agent only run the jobs from the server and send the result back to the server. It doesn't collect any data from your server. You can check the source code to make sure.
No, the agent is written in Rust and only need a few system resources.
Just stop the container and remove it.
If you use docker compose
, you can just run docker compose up -d --pull always
to update the agent. If you use docker, you can just pull the latest image and run the container again.