I Gave My Coding Agent a Server of Its Own. Here’s How to Do It Safely.
说明与用途
通过自托管 PaaS agentic‑hosting,开发者可以安全地部署和管理 AI 代理生成的代码,使用隔离容器和严格的安全限制。
问题
Agents can write and deploy code but lack safe, isolated infrastructure to run on, forcing developers to manually manage deployment and security.
结果
Agentic‑hosting enables coding agents to autonomously build, deploy, and manage applications on a dedicated server with strong isolation and guardrails, reducing manual intervention and improving security.
工作流
- Install Docker, gVisor, Go, and Nixpacks on a Linux server.
- Configure Docker to use gVisor runtime and set address pools.
- Create Traefik network and run local registry.
- Build the agentic‑hosting binary and generate master key and bootstrap token.
- Run the service as systemd and verify health endpoint.
- Register a tenant via API to obtain API key.
- Create services and trigger Nixpacks builds from git repositories.
- Provision databases and set environment variables via API.
- Deploy services and access them through Traefik‑managed subdomains.
- Use Claude Code skill or bash scripts to automate deployment flows.
- Monitor guardrails such as reconciler, circuit breaker, disk watermarks, rate limits, idempotency, and backups.
证据
agentic-hosting is an attempt at a third option. It's a self-hosted PaaS for your own bare-metal box where the primary user is an AI agent and the primary interface is a REST API.
Secure by default. Every tenant container runs under gVisor, with a read-only root filesystem, all Linux capabilities dropped, and no-new-privileges. Secrets are encrypted with AES-256-GCM.
A circuit breaker stops restarting a service after 5 crashes in 10 minutes, so a confused agent can't thrash your box.
- 记录日期: 2026-10-14T14:56:12.998Z