Before you start
Create the agent in Observer: Agents, Add agent, then Cloud platforms. Copy the key. Observer shows it once. You paste it when the platform asks forAGENT_KEY.
The compose file
These platforms run a Docker Compose file. Use this one (also on the Add agent screen):docker-compose.yml
${AGENT_KEY:?} reads it from the
platform’s environment variables and stops the deploy when it is
missing. The volume keeps the local queue
when the container is recreated.
Deploy
- Coolify
- Dokploy
- Portainer
- In a project, New resource, Docker Compose Empty.
- Paste the file and save.
- Under Environment variables, set
AGENT_KEYto your agent key. - Deploy. Do not add a domain: the agent serves nothing.
AGENT_KEY in the
same place and redeploy. Add other
environment variables, such
as PROMETHEUS_SERVER_URL, under environment in the file.
Check that it connected
The Add agent screen shows Connected within a minute of the agent starting, and the Agents page marks the agent as running. If it does not, open the container’s logs in the platform. The agent logs every failed call to Observer with the reason. The most common cause is a wrong or replacedAGENT_KEY.
Upgrades
The file runsghcr.io/useobserver/agent:1, which moves to each new
1.x release. Redeploy with a fresh pull of the image to pick up a new
release. In Portainer, update the stack with Re-pull image and
redeploy turned on.
Remove
Delete the service or stack, then itsobserver-agent-buffer volume.
Delete the agent in Observer (Agents) too if you no longer need
it.
