3. Connect the repo; Render uses `render.yaml` at the root.
4. Click **Deploy Blueprint**. When prompted:
- **REDIS_PASSWORD**: leave blank (or set if your Key Value instance uses auth).
- **ROOT_URL**: leave blank for now.
5. After the first deploy, open your web service → **Environment** → set **ROOT_URL** to your service URL (e.g. `https://agentforge.onrender.com`) → **Save** (redeploys).
6. Open `https://<your-service>.onrender.com` → create the first user (admin) → copy that user’s **security token**.
| `DATABASE_URL` | Postgres service → Variables / Connect |
| `REDIS_HOST` | Redis service → Variables (host) |
| `REDIS_PORT` | Redis service → Variables (port, e.g. 6379) |
| `REDIS_PASSWORD` | Redis service → Variables (password; can leave empty if none) |
| `JWT_SECRET_KEY` | Any long random string (e.g. `openssl rand -hex 32`) |
| `ACCESS_TOKEN_SALT` | Another long random string |
| `ROOT_URL` | The URL from step 5 (e.g. `https://agentforge-production.up.railway.app`) |
**Tip:** For Postgres/Redis, Railway can “Reference” variables from the other services so you don’t copy-paste secrets.
7. **Deploy**
Save variables; Railway redeploys. Wait for the deploy to finish.
8. **Create first user**
Open **ROOT_URL** in a browser → **Get started** → create an account (this user is admin).
9. **Get token for the agent**
In the app: open that user’s **Account** / **Settings** → copy the **security token**.
10. **Agent auth**
- `POST <ROOT_URL>/api/v1/auth/anonymous`
- Body: `{ "accessToken": "<security_token>" }`
- Use the returned **authToken** as `Authorization: Bearer <authToken>` on all API requests.
---
## Option B: Railway
## Alternative: Render
1. Push this repo to GitHub.
2. [Railway](https://railway.app) → **New Project** → **Deploy from GitHub** → select this repo (Railway uses the root `Dockerfile` and `railway.toml`).
3. In the same project: **+ New** → **Database** → **PostgreSQL**; then **+ New** → **Database** → **Redis**.
4. Open your **app service** → **Variables** → add: