Hedgehog Panel is a personal project that is being built to gain experience and to create a C# alternative to existing server management panels like Pterodactyl or Portainer.
Hedgehog Panel consists of two main components:
- Backend (C#) — Handles API requests, user management, and service configuration.
- Daemon (Rust) — A lightweight and secure background service responsible for directly controlling server processes and services. It lives in its own repository, HedgehogDaemon, and runs on every machine the panel manages. One machine with a daemon is a node in the panel.
| Component | Language / Framework |
|---|---|
| Backend | C# (.NET 8) |
| Daemon | Rust |
| Frontend | HTML/CSS/JS |
| Database | PostgreSQL |
A node is the panel's record of one machine running a daemon. Adding a node and pairing it takes four steps, all on the Nodes page, which only admins can change.
- Start the daemon. A daemon that has no panel paired yet prints a one-time code at startup (
Pairing code: XXXX-XXXX) and writes it to./data/pairing-code. To get a new code, runhedgehog-daemon pairin the daemon's directory; any earlier code stops working. A code is valid for 15 minutes and can be used once. - Add the node. Choose Add node and enter a name, the address of the machine and the daemon's port (50051 by default).
- Pair it. The pairing dialog opens right after, or use Pair on the node. Enter the code; case and the dash do not matter. The panel checks the daemon's protocol version first, and a daemon it cannot work with is refused before the code is spent.
- Check on it. Ping asks the daemon for a handshake, and the node's details show its versions, when it was last seen and the load of its host (CPU, memory, processes, uptime).
Paired nodes are also checked in the background, every 30 seconds by default, so their status stays current.
| Status | Meaning |
|---|---|
| Unpaired | The node has no daemon token yet. |
| Online | The daemon answered the last check and its protocol works with this panel. |
| Offline | The daemon could not be reached, did not answer in time, or the node's address is unusable. The error is shown. |
| Incompatible | The daemon answered, but its protocol version cannot work with this panel. Pairing and reading the load are blocked until the daemon is updated. |
| Unknown | The daemon failed in some other way, for example it rejected the panel's token. The error is shown. |
A daemon on a different minor protocol version works with limited features, and one on a pre-release protocol gets a warning. Both are marked on the node.
The Daemon section of appsettings.json, or environment variables written as Daemon__PollIntervalSeconds:
| Setting | Default | Meaning |
|---|---|---|
RequestTimeoutSeconds |
10 |
Deadline of every call to a daemon |
RetryCount |
3 |
Retries of a call that failed as unavailable or timed out; pairing is never retried |
RetryDelayMilliseconds |
200 |
Wait before the first retry; each further retry waits longer |
AllowInsecureConnections |
false |
Skip certificate validation. Only relevant once daemons offer TLS |
PollingEnabled |
true |
Switches the background checks off |
PollIntervalSeconds |
30 |
Pause between rounds of checks |
PollMaxParallelism |
8 |
How many daemons are checked at once |
A daemon trusts a panel by the token it issued and the panel's UUID, which the panel keeps in data/panel-identity next to itself, not in the database. A fresh install pointed at the same database therefore has a new identity: the daemons it was paired with accept only a handshake from it, so Ping still works but the load cannot be read. The node details say so. To get out of it, pair the node again with a new code.
Keep data/panel-identity with the panel (in Docker, on a volume), so that an update does not change the identity.
- No TLS. The connection between panel and daemon is plain HTTP/2, so use it only on a network you trust, such as a private network or a VPN.
- The daemon token is stored unencrypted in the
nodes.daemon_tokencolumn of the database. It is never sent to the browser. Encrypting it is planned. - Nodes cannot be edited or deleted from the page yet, only through the API.