Deploy IronClaw
Deploy IronClaw on Railway with PostgreSQL and pgvector.
ironclaw
Just deployed
Postgres
Just deployed
/var/lib/postgresql/data
Deploy and Host IronClain on Railway
IronClaw is a secure AI assistant with a modern web interface, persistent memory, jobs, routines, and tool-based workflows. It combines chat, automation, and long-term state in one system, making it useful for personal assistants, hosted AI workspaces, and experimental agent-style deployments backed by PostgreSQL and pgvector.
About Hosting IronClaw
Hosting IronClaw involves running the main application service together with a PostgreSQL database that supports pgvector for persistence and memory-related features. In a hosted environment like Railway, deployment also requires handling a few practical concerns such as public web access, internal service networking, persistent storage, non-interactive startup, and port separation between the UI proxy and internal channels. This template is designed to simplify that process by packaging IronClaw in a Railway-friendly way, so users can deploy the app with less manual setup and fewer environment-specific issues.
Common Use Cases
- Personal AI assistant with persistent memory and chat history
- Hosted AI workspace for jobs, routines, and automation flows
- Demo or evaluation environment for IronClaw on managed infrastructure
Dependencies for IronClaw Hosting
- PostgreSQL with pgvector
- OpenAI-compatible or supported LLM provider credentials
Deployment Dependencies
- Upstream IronClaw project: https://github.com/nearai/ironclaw
- pgvector Docker image: https://hub.docker.com/r/pgvector/pgvector
- Railway platform: https://railway.com/
Implementation Details
This template deploys IronClaw using two services:
- IronClaw application service
- PostgreSQL database service with pgvector
Recommended environment setup for the IronClaw service:
DATABASE_URL=postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@Postgres.railway.internal:5432/${{Postgres.POSTGRES_DB}}?sslmode=disable
LLM_BACKEND=openai
OPENAI_API_KEY=your_openai_api_key
ONBOARD_COMPLETED=true
SANDBOX_ENABLED=false
PORT=8080
HTTP_HOST=0.0.0.0
HTTP_PORT=8081
HTTP_WEBHOOK_SECRET=${{ secret(32) }}
Recommended environment setup for the Postgres service:
POSTGRES_DB=ironclaw
POSTGRES_USER=ironclaw
POSTGRES_PASSWORD=${{ secret(16) }}
PGDATA=/var/lib/postgresql/data/pgdata
Recommended Postgres image:
pgvector/pgvector:pg16-trixie
Gateway Login Token
IronClaw’s web interface is protected by a gateway login token.
After deployment, users may be asked to enter the gateway token before accessing the full UI. In this Railway template, the application is deployed with a hosted wrapper so the web interface can be accessed publicly, while the internal IronClaw gateway remains protected.
Important notes:
- The gateway token is a login/authentication token for the IronClaw web UI
- It is separate from your LLM provider API key
- It helps prevent unauthorized access to the hosted assistant
- In some deployments, IronClaw may generate or expose the token during startup
For a smoother user experience, this template can be extended to predefine and inject a stable gateway token through environment configuration so users do not need to inspect logs manually.
Why Deploy IronClaw 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 IronClaw 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
ironclaw
omryatia/ironclaw-railwayPostgres
pgvector/pgvector:pg16-trixie