Skip to content
Skip to Content

The OpenPanel agent

The program on each server that runs your services, why it only connects out, what it can do, how it is installed with one command, and how its signed releases are checked.

The OpenPanel agent is one program, openpanel-agent, that runs on every connected server as the systemd service openpanel-agent. It is how OpenPanel runs your services there: it starts and stops their containers, builds them from Git, carries their traffic, and reports back what it sees.

It only connects out

The agent makes one outbound connection, over TLS, to gateway.openpanel.sh on port 443, and keeps it open. Nothing connects in to the server for it, and the server opens no port for OpenPanel.

  • Traffic to your services arrives through that connection. A visitor's request for an opnl.app address, your own domain or a public TCP or UDP port reaches OpenPanel's edge, which sends it down the agent's connection to the right container. Containers publish no ports on the server.
  • If the connection drops, the agent dials again after a wait that grows from 1 second to 1 minute. Containers keep running while it is away, and while the agent itself restarts.
  • It checks who it talks to. The agent dials only wss://, accepts only the gateway certificate whose key it has pinned (the installer carries the pin, so no other certificate is accepted, even one a certificate authority issued), and connects only to the gateway it enrolled with.

A server added with One command is reached only through the agent. For a server connected over SSH, OpenPanel also signs in over SSH for the setup, the live reading, the system log, joining the private network and a clean disconnect. See How OpenPanel reaches a server.

What it does

JobWhat the agent does
Runs your servicesStarts each service's containers with Docker as OpenPanel says, with their variables, resources and volumes, on a network of their project's own, and removes what OpenPanel no longer asks for. It touches only the containers, networks and volumes it made itself.
Rolls out deploymentsStarts the new containers beside the old ones, and stops the old ones only when every new one on the server is ready. A service with a volume stops before it starts again, so two containers never write one volume.
Checks healthRuns each service's HTTP or TCP health check from the server itself.
Builds from GitClones the repository and builds it with its Dockerfile or with Railpack, using the server's git and Docker Buildx. See How builds work.
Carries trafficServes the edge's HTTP, TCP and UDP traffic to the containers through its own connection.
ReportsSends what runs, what failed and why, deployment events, and CPU, memory and network use every 15 seconds.
Keeps the disk tidyEvery 6 hours, and after each build, removes old deployment images (it keeps the five newest of each service), images its builds left behind, and build cache beyond 5 GB. It warns OpenPanel when the disk is 80 % full.

What it is allowed to touch

The agent drives Docker, which is the same as root on a server. Everything else on the system is read-only to it: its systemd unit sets ProtectSystem=strict, ProtectHome=yes, PrivateTmp=yes and NoNewPrivileges=yes, and it may write only /etc/openpanel and its own folder, /var/lib/openpanel.

How it signs in

The agent has one credential: an Ed25519 key it makes on the server when it enrolls.

  1. OpenPanel makes a one-time token for the server, starting ope_. It works once, within an hour, and OpenPanel stores only its SHA-256 hash. A new token replaces the server's earlier unused ones.
  2. The installer hands the token to the agent on its input, never on a command line, where other users of the server could read it.
  3. The agent makes its key, sends the public half with the token, and keeps the private half in /etc/openpanel/agent.key, readable by root only. The private key never leaves the server.
  4. Each time it connects, the agent signs a fresh challenge from the gateway with that key.

When you disconnect the server, OpenPanel revokes the key: the gateway refuses it from then on and ends an open connection within a minute.

How the agent is installed

With one command

One command is the main way to add a server: in Servers, choose Add server, open One command, name the server and choose Create install command. The console shows the command and a one-time token. The installer runs as root on any 64-bit Linux server with systemd:

curl -fsSL https://openpanel.sh/install.sh | sudo sh

It asks for the one-time token, with the typing hidden, so the token never appears in your shell history or in the list of running processes. Then it:

  1. downloads the agent for the server's processor (amd64 or arm64) and the release's signed list of checksums;
  2. checks the list's signature and the agent's checksum, and installs nothing if either fails;
  3. installs /usr/local/bin/openpanel-agent and its systemd unit;
  4. installs Docker from Ubuntu's own packages if it is missing, and git and Docker Buildx for builds;
  5. enrolls with the token and starts the agent.

It ends with "the agent is running; the server appears in OpenPanel within a minute", and the console's dialog changes to Connected.

The token works once and expires. On a server's page, under Agent, the Owner or an Admin can choose New install token to make another one, for example for a machine that was reinstalled; the earlier unused token stops working.

To pass the token without a prompt, for example from a script, save the installer first and give it the token on its input:

curl -fsSL https://openpanel.sh/install.sh -o openpanel-install.sh
sudo sh openpanel-install.sh --token-stdin < token.txt
Option or variableWhat it does
--token-stdinReads the token from the installer's input.
--no-startInstalls and checks the agent only: no enrolment, and the service is not started.
OPENPANEL_ENROL_TOKENThe token, from the environment (with sudo --preserve-env=OPENPANEL_ENROL_TOKEN).
OPENPANEL_AGENT_VERSIONA release other than the latest, such as 0.1.0.

The installer refuses a token given on the command line (--token).

The installer needs Linux with systemd, root, a 64-bit x86 or ARM processor, curl or wget, sha256sum, and OpenSSL 3 or later to check the signature. Ubuntu 22.04 and 24.04 have all of them.

By the SSH setup

When you connect a server over SSH, the setup step Install the OpenPanel agent installs it for you: it downloads the signed release, checks it (see below), and runs the same installer with a token made for this server. When it is done, the step says, for example, "Agent 0.2.3 installed; it connects to gateway.openpanel.sh on its own, and nothing connects in".

This step never stops the setup. If the agent cannot be installed, for example because the gateway does not answer, the step ends with "Not installed (…)" and the server is set up without it. The server's page then shows the agent as Not installed, and the Owner or an Admin installs it from there with Install the agent.

Signed releases

Every release of the agent is signed by OpenPanel, and nothing is installed unless the signature checks out.

  • Where they are. https://openpanel.sh/download/agent/<version>/<file>, where <version> is a release such as 0.1.0 or latest. The files are install.sh, SHA256SUMS, SHA256SUMS.sig, VERSION, openpanel-agent-linux-amd64 and openpanel-agent-linux-arm64. A released version never changes; latest moves to each new release. https://openpanel.sh/install.sh is the latest install.sh.
  • What is signed. SHA256SUMS lists the SHA-256 of every file in the release, and SHA256SUMS.sig is an Ed25519 signature over that list, made with a private key that never leaves OpenPanel's release machine.
  • What is checked. The installer carries OpenPanel's public key. It checks the signature of SHA256SUMS with that key, then the agent's checksum against the list. The setup also checks install.sh itself against the signed list before it runs it.

Verify the installer yourself

Before you run install.sh, you can check it the same way, on the server:

base=https://openpanel.sh/download/agent/latest
curl -fsSL -o install.sh "$base/install.sh"
curl -fsSL -o SHA256SUMS "$base/SHA256SUMS"
curl -fsSL -o SHA256SUMS.sig "$base/SHA256SUMS.sig"

cat > openpanel-release.pub <<'KEY'
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAZiy6ojkFIt0ALSPRc29mwRWP1u9D1k8HCFYgiRecfiE=
-----END PUBLIC KEY-----
KEY

openssl pkeyutl -verify -pubin -inkey openpanel-release.pub -rawin -in SHA256SUMS -sigfile SHA256SUMS.sig
sha256sum --check --ignore-missing SHA256SUMS

OpenSSL answers "Signature Verified Successfully" and sha256sum answers "install.sh: OK". Then run it with sudo sh install.sh. The public key is the same one inside install.sh.

See the agent's state

In the console, open the server and look under Agent. It shows the agent's State (online when it answered in the last 90 seconds), its Version, when it was Last seen, the address it Connected from, whether its Services are up to date with what OpenPanel last asked the server to run, and anything the agent could not apply. The CLI and the API show the same:

openpanel servers status web-1
server   web-1 (203.0.113.10)
setup    ready
agent    online, 0.1.0, seen 2026-12-01 19:47
applied  revision 12 of 12, 2026-12-01 19:47

agent says whether the agent is online (heard from in the last 90 seconds), its version and when it was last seen, or "not installed". applied says whether it has applied the latest instructions OpenPanel wrote for the server. See A server's live status in the API reference.

Remove the agent

A clean disconnect stops and removes the agent with the rest of what OpenPanel put on the server. To remove it by hand:

sudo systemctl disable --now openpanel-agent; sudo rm -rf /etc/openpanel /usr/local/bin/openpanel-agent /etc/systemd/system/openpanel-agent.service && sudo systemctl daemon-reload

Removing it by hand does not disconnect the server in OpenPanel: disconnect it there too, which revokes the agent's key.