Prerequisites
- A Dash repo set up locally (setup)
- A Railway account
- The Railway CLI installed and authenticated (
railway login)
Step 1: Provision the project
Use.env.production to keep production credentials separate from local dev:
.env.production and set OPENAI_API_KEY. Leave JWT_VERIFICATION_KEY empty for now. You’ll add it in Step 2.
- Creates a Railway project called
dash. - Adds a
pgvectorservice with a persistent volume at/var/lib/postgresql/data. - Creates the
dashapplication service and forwards the env vars in.env.production. - Deploys the app and assigns a public domain.
JWT_VERIFICATION_KEY is set.
Step 2: Get a JWT key from AgentOS
The key comes from AgentOS:- Open os.agno.com and log in.
- Click Add OS → Live, paste your Railway URL, click Connect.
- Go to Settings and click Generate key pair.
- Copy the public key.
- Paste it into
.env.production, wrapped in single quotes:
Step 3: Push env and redeploy
railway_env.sh reads .env.production and pushes every variable to the Dash service. It handles multiline values like PEM keys correctly. Safe to run repeatedly.
railway_redeploy.sh triggers a fresh build of the Dash service.
Step 4: Load data into the production database
Thepgvector service is only reachable from inside Railway’s network (pgvector.railway.internal). Run the data scripts via SSH:
Verify
Update Slack to point at production
If you set up Slack against an ngrok URL, swap it for your Railway URL:- Open your Slack app at api.slack.com/apps.
- Go to Event Subscriptions.
- Update the Request URL to
https://your-dash.up.railway.app/slack/events. - Wait for the green Verified check, then Save Changes.
Operations
| Task | Command |
|---|---|
| Tail logs | railway logs --service dash |
| Open the dashboard | railway open |
| Run a command in the container | railway ssh --service dash |
Sync env after a .env.production change | ./scripts/railway_env.sh |
| Redeploy after a code change | ./scripts/railway_redeploy.sh |
How RBAC works
Dash holds a structural boundary between company data (public, read-only) and agent-managed data (dash, read/write). RBAC adds a complementary boundary at the API: every query is scoped to a user_id so multi-user deployments stay isolated.
Local development sets RUNTIME_ENV=dev (via Docker Compose) and skips RBAC so you can iterate. Production defaults to RUNTIME_ENV=prd and enforces it.
See AgentOS Security and RBAC.