I Gave My Coding Agent a Server of Its Own. Here’s How to Do It Safely.
说明与用途
作者展示了如何使用 agentic-hosting 在个人服务器上安全部署 AI 生成的应用,赋予代理完整控制权,同时通过 REST API 保持隔离和监督。
问题
Agents can write, test, and fix code but lack a safe, isolated deployment environment, leaving the final deployment step in human hands.
结果
The agent can autonomously deploy and manage applications on a dedicated server, reducing human intervention to oversight and security checks.
工作流
- Install Docker, gVisor, Go, and Nixpacks on a Linux server
- Configure Docker to use gVisor runtime and create a network
- Run a local registry and start the agentic‑hosting service
- Generate a bootstrap token and start the service with it
- Register a tenant via POST /v1/tenants/register to obtain an API key
- Create a service with POST /v1/services
- Trigger a build with POST /v1/services/{serviceID}/builds specifying source_type and source_url
- Provision a database with POST /v1/databases and wire it to the service via POST /v1/services/{serviceID}/env
- Stream build and runtime logs with GET /builds/{buildID}/logs and GET /v1/services/{serviceID}/logs
- Use guardrails such as sandboxing, circuit breakers, and rate limits to ensure safety
证据
agentic-hosting is a self-hosted PaaS whose main user is an agent talking to a REST API
One build system (Nixpacks, which turns source code into a container image with no config)
A reconciler checks every 30 seconds that what the database thinks is running matches what Docker is actually running
- 记录日期: 2026-10-27T17:26:51.150Z