---
title: "Deploy OpenLore"
description: "Agent-native shared knowledge repo for AI agents over MCP"
category: "AI/ML"
url: https://railway.com/deploy/openlore
---

# Deploy OpenLore

Agent-native shared knowledge repo for AI agents over MCP

**[Deploy OpenLore on Railway](https://railway.com/template/openlore)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/openlore/manifest.json

- **Creator:** My Projects
- **Category:** AI/ML

## Template content

### OpenLore https://raw.githubusercontent.com/aakarim/OpenLore/main/internal/passkeys/app-icon.svg

- **Source:** aakarim/OpenLore
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host OpenLore on Railway
[OpenLore](https://github.com/aakarim/OpenLore) is a minimal, agent-native knowledge repository. Point it at a folder of Markdown and every AI agent on your team (Claude Code, Codex, Cursor, CI jobs) reads and writes the same shared files over MCP, a JSON API or SSH, using tools they already know like `cat`, `grep` and `find`. A policy file decides who can see and change what.

## About Hosting OpenLore
This template runs the official OpenLore server, built from the upstream `deploy/render/Dockerfile` on top of the published `ghcr.io/aakarim/openlore` image.

- **OpenLore service**: web front page, dashboard at `/dashboard/`, MCP at `/mcp`, JSON API at `/api`, OAuth endpoints for agent sign-in. Listens on port 8080 behind a Railway HTTPS domain.
- **Volume** at `/var/lib/openlore`: server config, policy (`lore.json`), documents, passkeys, token signing keys and SSH host key. Everything survives redeploys and upgrades.
- **Authentication on by default**: on first boot the server writes a starter config with no anonymous access. MCP and the API require a bearer token, the dashboard requires a passkey, and the only identity is `admin`. Signing keys are generated on the volume at first boot, so there is no shared default password.

**After deploy:**
1. Wait for the deploy to finish and open `https://YOUR-RAILWAY-DOMAIN`. You should see the OpenLore front page.
2. Mint a short-lived admin token from inside the container with the Railway CLI: `railway ssh --service OpenLore` and then run `./out token mint --identity admin --ttl 15m --config /var/lib/openlore/config/openlore.yml`.
3. Use the token once to create a passkey registration link: `curl -s https://YOUR-RAILWAY-DOMAIN/api/shell -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -d '{"command":"passkey register --identity admin --name laptop"}'`. Open the printed `/passkey/r/...` link within 5 minutes and create the passkey.
4. Connect an agent, for example `claude mcp add --transport http openlore https://YOUR-RAILWAY-DOMAIN/mcp`, then sign in with the passkey in the browser.
5. Add more people and agents by editing `/var/lib/openlore/config/lore.json` (or `./out identity add --name alice --role user --auth /var/lib/openlore/config/lore.json`) and restarting the service.

## Common Use Cases
- Give every coding agent on a team the same up-to-date architecture notes, runbooks and conventions over MCP.
- Shared, inspectable memory for multi-agent workflows, with per-identity private homes and shared channels.
- Serve public docs and private internal notes from one corpus with per-docset access rules.
- Let CI jobs read and publish knowledge with scoped tokens instead of long-lived secrets.

## Dependencies for OpenLore Hosting
- Source repository: [aakarim/OpenLore](https://github.com/aakarim/OpenLore) (Apache-2.0)
- Base image: `ghcr.io/aakarim/openlore` (tag set by `OPENLORE_VERSION`, default `latest`)
- No external API keys or databases are required.
- The Railway CLI (`railway ssh`) for the one-time admin bootstrap.

### Deployment Dependencies
- [OpenLore README](https://github.com/aakarim/OpenLore#readme)
- [Auth model](https://github.com/aakarim/OpenLore/blob/main/docs/concepts/auth.md)
- [openlore.yml reference](https://github.com/aakarim/OpenLore/blob/main/docs/reference/openlore-yml.md)
- [Railway SSH](https://docs.railway.com/cli/ssh)

### Implementation Details
- The service builds from the repository with root directory `/deploy/render` and `Dockerfile`, the same image the upstream Render blueprint uses. Its start script writes the starter `openlore.yml` and `lore.json` only when they are missing, so your edits on the volume are never overwritten.
- `OPENLORE_PUBLIC_URL` is set to `https://${{RAILWAY_PUBLIC_DOMAIN}}`. It becomes the token issuer and the passkey origin on first boot. If you later move to a custom domain, update `tokens.issuer`, `tokens.audience`, `passkeys.rp_id` and `passkeys.rp_origins` in `openlore.yml` and register new passkeys.
- `OPENLORE_VERSION` is passed to the Docker build to pin a release such as `0.7.3`. Redeploy to upgrade.
- The healthcheck is `/` on port 8080. OpenLore's SSH port 2222 is not exposed publicly; agents use MCP or the HTTP API over HTTPS.

## Why Deploy OpenLore 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 OpenLore 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.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/openlore
