Deploy to Railway
Build the image, push it to Railway, set your env vars.
1. Build
axon build
# → .agent/image.tar
2. Push to a registry
Railway deploys from a container registry. Push the image to Docker Hub, GitHub Container Registry, or any registry Railway can pull from.
docker load < .agent/image.tar
docker tag my-agent ghcr.io/you/my-agent:latest
docker push ghcr.io/you/my-agent:latest
3. Create a Railway service
In the Railway dashboard, create a new project → Deploy from Registry → paste the image URL.
Or via the Railway CLI:
railway login
railway init
railway up --image ghcr.io/you/my-agent:latest
4. Set environment variables
In Railway's service settings under Variables, add:
AXON_API_KEY=axon_...
PORT=3000
# plus any keys your agent declared in axon.config.ts
5. Expose the port
Railway auto-detects PORT. Set it to 3000 and Railway will generate a public URL.
Your agent is live. Call it the same way as Axon Cloud — same routes, same auth header, different base URL.