Deploy AgentRQ
Real-time human-in-the-loop task manager for AI agents.
Just deployed
/var/lib/postgresql/data
AgentRQ
Just deployed
/_storage
Deploy and Host AgentRQ on Railway
About Hosting AgentRQ
AgentRQ is an agent infrastructure platform designed to provide a centralized environment for running and managing AI agents, tools, and related workflows. It can be deployed as a self-hosted Docker application and provides web access through its HTTP server.
Railway hosts AgentRQ using the published agentrq/agentrq:latest Docker image. The application listens internally on port 2026 and binds to 0.0.0.0, allowing Railway to route incoming traffic to the service.
This template uses SQLite for persistent application data. A Railway Volume is mounted at /_storage, where AgentRQ stores its SQLite database, file attachments, and other persistent data. Railway handles the public TLS layer, so AgentRQ's built-in TLS is disabled.
The deployment uses Railway environment variables for the public URL, authentication secrets, SQLite configuration, and production settings.
Common Use Cases
- AI Agent Infrastructure: Deploy a self-hosted AgentRQ instance for running and managing agent-based workflows.
- Agent Workspaces: Provide a persistent environment for agent data, attachments, authentication, and workspace configuration.
- Self-Hosted Agent Platform: Run AgentRQ on Railway with persistent storage and a publicly accessible HTTPS endpoint.
Dependencies for AgentRQ Hosting
- AgentRQ Docker Image —
agentrq/agentrq:latest. - Railway Volume — Required for the SQLite database, file attachments, and persistent application data.
- Authentication Secrets — Required for JWT signing, MCP token encryption, and root access.
- Railway Public Domain — Used to construct AgentRQ's public URL and domain configuration.
Deployment Dependencies
Implementation Details
Docker
Deploy the published Docker image:
agentrq/agentrq:latest
Railway uses the Docker image directly, so no Dockerfile or custom build command is required.
Set the Railway service builder/runtime to use the Docker image:
Builder: Docker Image
Runtime: Docker
The application listens on port 2026 and binds to 0.0.0.0.
Public Networking
| Setting | Value |
|---|---|
| Proxy Type | HTTP Proxy |
| Target Port | 2026 |
| Application Port | 2026 |
| Public Port | 80 |
| Private Port | 2026 |
| HTTPS | Railway-managed |
Railway terminates TLS before forwarding requests to AgentRQ. Therefore, AgentRQ's internal SSL should remain disabled:
AGENTRQ_SSL_ENABLED=false
Generate a Railway domain from Settings → Networking → Generate Domain.
The generated domain is used by the AgentRQ URL variables.
Environment Variables
| Variable | Required | Description |
|---|---|---|
ENV | Yes | Production environment mode. |
PORT | Yes | Internal HTTP server port. Set to 2026. |
AGENTRQ_BASE_URL | Yes | Full public AgentRQ URL. |
AGENTRQ_DOMAIN | Yes | Railway public domain without protocol. |
AGENTRQ_PROXY_DOMAIN | Yes | Public domain used by the reverse-proxy configuration. |
AGENTRQ_COOKIE_SECURE | Yes | Enables secure cookies when using HTTPS. |
AGENTRQ_SSL_ENABLED | Yes | Keeps AgentRQ's built-in TLS disabled because Railway handles TLS. |
AGENTRQ_SQLITE_ENABLED | Yes | Enables SQLite. |
AGENTRQ_SQLITE_DSN | Yes | SQLite database path on the persistent volume. |
AGENTRQ_POSTGRES_ENABLED | Yes | Disables PostgreSQL for this deployment. |
AGENTRQ_AUTH_JWT_SECRET | Yes | Secret used for signing session JWTs. |
AGENTRQ_AUTH_WORKSPACE_TOKEN_KEY | Yes | 32-byte AES-256-GCM key used for MCP token encryption. |
AGENTRQ_AUTH_ROOT_LOGIN_ENABLED | Yes | Enables root login. |
AGENTRQ_AUTH_ROOT_ACCESS_TOKEN | Yes | Root access token. |
Configure the variables in Railway:
ENV=production
PORT=2026
AGENTRQ_BASE_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
AGENTRQ_DOMAIN=${{RAILWAY_PUBLIC_DOMAIN}}
AGENTRQ_PROXY_DOMAIN=${{RAILWAY_PUBLIC_DOMAIN}}
AGENTRQ_COOKIE_SECURE=true
AGENTRQ_SSL_ENABLED=false
AGENTRQ_SQLITE_ENABLED=true
AGENTRQ_SQLITE_DSN=/_storage/agentrq.db
AGENTRQ_POSTGRES_ENABLED=false
AGENTRQ_AUTH_JWT_SECRET=${{secret(32)}}
AGENTRQ_AUTH_WORKSPACE_TOKEN_KEY=${{secret(32)}}
AGENTRQ_AUTH_ROOT_LOGIN_ENABLED=true
AGENTRQ_AUTH_ROOT_ACCESS_TOKEN=${{secret(32)}}
Railway generates the secret values used by the secret(32) references. Keep authentication secrets private and do not commit them to source control.
Persistent Storage
A Railway Volume is required.
Open:
AgentRQ Service → Settings → Volumes → Add Volume
Configure:
Volume Name: storage
Mount Path: /_storage
The volume is required because AgentRQ stores its SQLite database and persistent files at this location.
The SQLite database is:
/_storage/agentrq.db
Without the volume, data stored inside the container filesystem can be lost when the service is redeployed or recreated.
The volume also stores file attachments and other persistent application data documented by the deployment configuration.
Database
This template uses SQLite rather than PostgreSQL.
Enable SQLite:
AGENTRQ_SQLITE_ENABLED=true
AGENTRQ_SQLITE_DSN=/_storage/agentrq.db
PostgreSQL is explicitly disabled:
AGENTRQ_POSTGRES_ENABLED=false
No separate Railway PostgreSQL service is required for this configuration.
The SQLite database resides on the Railway Volume mounted at:
/_storage
Build & Start
No custom build or start commands are required.
Railway should deploy:
agentrq/agentrq:latest
and use the Docker image's default startup configuration.
The application is configured to listen on:
0.0.0.0:2026
Do not add a custom docker run or Docker Compose command as the Railway start command.
Accessing the Application
After deployment:
- Open the AgentRQ service in Railway.
- Go to Settings → Networking.
- Select Generate Domain.
- Wait for the deployment to become healthy.
- Open the generated HTTPS URL.
The Railway domain is automatically injected into:
AGENTRQ_BASE_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
AGENTRQ_DOMAIN=${{RAILWAY_PUBLIC_DOMAIN}}
AGENTRQ_PROXY_DOMAIN=${{RAILWAY_PUBLIC_DOMAIN}}
AgentRQ is configured for secure cookies:
AGENTRQ_COOKIE_SECURE=true
while built-in TLS remains disabled:
AGENTRQ_SSL_ENABLED=false
This allows Railway to terminate HTTPS at the public edge while AgentRQ communicates internally over HTTP.
The root login is enabled:
AGENTRQ_AUTH_ROOT_LOGIN_ENABLED=true
The root access token is supplied through:
AGENTRQ_AUTH_ROOT_ACCESS_TOKEN=${{secret(32)}}
Keep this credential secure and use the application's documented authentication flow to access the administrative interface.
Why Deploy AgentRQ 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 AgentRQ 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
