Skip to content

Pick your style: Denkbaar

Book a conversation

Articles

Knowledge

Agents on your own server at Hetzner

An agent that works for hours does not belong on your laptop. This is how you set up a server of your own where agents keep working safely.

A closed laptop stands beside an active server and a worker with a tablet.
Agents on your own server keep working when the laptop is closed. Illustration: Denkbaar.

Our agents do not work on a laptop, but on servers of our own at Hetzner. They keep working when we close the laptop, and their work is in one fixed place.

Plain technical English A VPS is a virtual server that you rent. Agents run there in their own session, each in its own git worktree. Secrets are stored encrypted in git, with SOPS.

Why it matters

An agent that works on a task for three hours stops when your laptop goes to sleep. And an agent on your laptop can reach everything on your laptop. A separate server solves both: it always runs, and it only has what you put on it.

A network cable passes through one opening in a gate towards a server.
Open only what is needed in the firewall. Illustration: Denkbaar.

How it works

private network

Your laptop

Server at Hetzner

Firewall: all closed except what is needed

Session per project

Agent 1 in worktree A

Agent 2 in worktree B

Secrets encrypted with SOPS

Snapshot before a risky step

Your laptop talks to the server over a private network; there, each agent works in its own folder, with encrypted secrets.

Two separate work folders sit beside a locked box and a backup drive.
Give agents separate work folders and store secrets encrypted. Illustration: Denkbaar.

What you do

  1. Create a server with an SSH key. According to Hetzner’s documentation, you cannot add an SSH key through the console after the server is created. So do it at once.
  2. Turn on a firewall. Without rules, the Hetzner firewall blocks all inbound traffic and allows outbound traffic. Open only what you need.
  3. Work as a normal user, not as root, and keep the server up to date.
  4. Install your coding agents, such as Claude Code or Codex.
  5. One git worktree per agent. Then agents work at the same time without touching each other’s files.
  6. Store secrets encrypted in git with SOPS. SOPS encrypts the values and keeps the keys readable, so you see what is there without seeing the secret.
  7. Take a snapshot before a risky change. With a snapshot, you can make a copy of the server again.
  8. Keep temporary work and fixed services apart. Agents and tests run on a work server; what must always run is on another server.

What we can do with you: we set up a work server for your agents, configured safely, and teach your team to work with it. Book a conversation.

Sources

  1. Hetzner Docs: Creating a server
  2. Hetzner Docs: Firewalls overview
  3. SOPS: Secrets OPerationS

Topics: agentsinfrastructurehetzner