Deploy Agent Zero
Open-source AI agent with its own Linux shell, memory and a secured web UI
Agent Zero
Just deployed
/a0/usr
Deploy and Host Agent Zero on Railway
Agent Zero is an open-source (MIT) general-purpose AI agent. Instead of a fixed set of tools it gets its own Linux environment: it writes and runs code, uses the terminal, searches the web, keeps long-term memory, learns from documents you give it and hands subtasks to subordinate agents, all from a chat-style web UI.
About Hosting Agent Zero
This template runs Agent Zero v2.16 from the official image, pinned by version and digest and built from a public GitHub repo, as one service with a public HTTPS domain and a health check on /api/health. Everything you create (settings, saved API keys, chats, memory, knowledge, projects, skills, scheduled tasks and the agent's work folder) lives on a volume at /a0/usr, so it survives redeploys and updates. The agent can run any command inside its container, so the web UI needs a login from the first request: the user name is admin and the password is generated for each deploy. The image is large (about 3 GB), so the first build takes a few minutes.
Common Use Cases
- A coding assistant that clones a repository, reads it, runs the tests and writes changes in its own sandboxed terminal
- A research agent that searches the web, reads sources and keeps findings in long-term memory and a knowledge base
- Scheduled jobs and multi-step automations, such as a daily report written to a file or sent to a chat
Dependencies for Agent Zero Hosting
- An API key for a model provider (OpenRouter, OpenAI, Anthropic and others), or your own model server such as Ollama, entered under Settings after deploying
- A Railway volume at
/a0/usr(included in this template)
Deployment Dependencies
- Agent Zero on GitHub and its v2.16 release
- Official Docker image
- Template repo with the Dockerfile, start script and changelog
Implementation Details
After deploying:
- Wait for the Agent Zero service to turn green. The first build pulls a large image and takes a few minutes.
- Open the service's Variables tab and copy
AUTH_PASSWORD. The user name isAUTH_LOGIN(defaultadmin). - Open the public URL, sign in, and open Settings. Add a model provider's API key and pick the chat and utility models. Agent Zero's default preset uses OpenRouter.
- Ask it for something real, such as "clone this repository and summarise how it handles auth".
The service won't start if AUTH_LOGIN or AUTH_PASSWORD is empty, so the agent is never exposed without a login. The start script also removes numpy 2.x files that the upstream image deletes but that come back at runtime on Railway, so memory and knowledge work.
Updates: when a new Agent Zero release is pinned in the template repo, Railway shows an "update available" notice in your project, and you choose when to apply it. Your data stays on the volume. Read the repo's CHANGELOG first. Don't use Agent Zero's built-in self-update here: a redeploy would go back to the image's version.
Why Deploy Agent Zero on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Agent Zero on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Agent Zero
aalfath/agent-zero-railway-template
