---
title: "Deploy Dexio | (Just Updated) Markdown Wiki For AI Agents With MCP Server And REST API, Admin Generated"
description: "Dexio markdown wiki for AI agents with MCP server, REST API and volume"
category: "AI/ML"
url: https://railway.com/deploy/dexio-or-just-updated-markdown-wiki-for-
---

# Deploy Dexio | (Just Updated) Markdown Wiki For AI Agents With MCP Server And REST API, Admin Generated

Dexio markdown wiki for AI agents with MCP server, REST API and volume

**[Deploy Dexio | (Just Updated) Markdown Wiki For AI Agents With MCP Server And REST API, Admin Generated on Railway](https://railway.com/template/dexio-or-just-updated-markdown-wiki-for-)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/dexio-or-just-updated-markdown-wiki-for-/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** AI/ML

## Template content

### dexio

- **Image:** ghcr.io/dexio-wiki/dexio:1.0.0@sha256:8124288b59d08f39debd9f3ea88edb8d93303e609d00aff58c93d25566cca5b3
- **Start command:** `/bin/sh -c 'echo ZXhwb3J0IERFWElPX0RCPS9kYXRhL2RleGlvLmRiIERFWElPX0ZJTEVTX0RJUj0vZGF0YS9maWxlcwpta2RpciAtcCAiJERFWElPX0ZJTEVTX0RJUiIKIyB0aGUgdm9sdW1lIGlzIG1vdW50ZWQgb3duZWQgYnkgcm9vdDsgdGhlIGFwcCBydW5zIGFzIDEwMDAxOjk5OQpbICIkKHN0YXQgLWMgJXUgL2RhdGEpIiA9IDEwMDAxIF0gfHwgY2hvd24gLVIgMTAwMDE6OTk5IC9kYXRhCmVjaG8gImRleGlvOiBkYXRhIG93bmVyPSQoc3RhdCAtYyAldTolZyAvZGF0YSkgcG9ydD0ke1BPUlQ6LTgwODB9IGFkbWluPSRERVhJT19BRE1JTl9FTUFJTCIKZXhlYyBzZXRwcml2IC0tcmV1aWQ9MTAwMDEgLS1yZWdpZD05OTkgLS1jbGVhci1ncm91cHMgZGV4aW8gc2VydmUgLS1ob3N0IDAuMC4wLjAgLS1wb3J0ICIke1BPUlQ6LTgwODB9Ig== | base64 -d > /tmp/boot.sh; exec sh /tmp/boot.sh'`
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Dexio on Railway

**Built for an LLM agent to deploy and use.** The deploy form has nothing to fill in: the administrator password and the signing key are generated, the administrator account is created at first boot, and every page and attachment survives redeploys on a volume. Dexio is an open-source markdown wiki that people and AI agents share, with a built-in MCP server at `/mcp`, a link graph, page history and search.

## About Hosting Dexio

This template runs one service from the upstream Dexio image (version 1.0.0), pinned by digest. The server keeps its pages in SQLite at `/data/dexio.db` and attachments in `/data/files`, both on the one volume mounted at `/data`. Railway mounts a volume owned by root while the image runs as an unprivileged user, so the start command fixes the ownership of `/data` and then runs the server as that user; without it the database would not be writable.

**No default login.** The administrator is created at first boot from the generated `DEXIO_ADMIN_PASSWORD` with the email `DEXIO_ADMIN_EMAIL` (admin at the service's public domain). Dexio is a multi-user wiki, so its sign-up page stays open on a public domain: a person who registers gets a separate workspace of their own and never sees the administrator's pages.

**What the template fixes for Railway.** The server listens on Railway's injected `PORT`, which is also the port the healthcheck dials, and the public address is set from the service domain so shared links point at the right host. The signing key is generated once and stays stable across redeploys.

**Using it.** Open the service domain, sign in with `DEXIO_ADMIN_EMAIL` and `DEXIO_ADMIN_PASSWORD` (read them from the `dexio` service variables), then start writing. For an agent, mint an API key with the call below and point an MCP client at `/mcp`.

### Agent contract

- Public URL: `https://RAILWAY_SERVICE_DEXIO_URL` (the generated domain of the `dexio` service, also the part of `DEXIO_ADMIN_EMAIL` after the at sign)
- Private URL: `http://dexio.railway.internal:8080`
- Credentials: the variable `DEXIO_ADMIN_PASSWORD` on the `dexio` service
- Login name: the variable `DEXIO_ADMIN_EMAIL` on the `dexio` service (a public identifier, admin at the service domain, not a secret)
- Auth: `POST /login` with form fields `email` and `password` sets a session cookie; with that cookie `POST /api/v1/connect` with `{"client":"other"}` returns the API key `dxk_...` inside the `html` field of the answer. The MCP server at `/mcp` takes it as `Authorization: Bearer KEY` (JSON-RPC over HTTP, send `Accept: application/json, text/event-stream`); every write tool also needs an `agent` argument naming the caller. HTTP Basic with the administrator email and password works on `/api/v1/me`. A request with no key or a wrong one answers `401`, so `write without key: 401`.
- Health: `GET /healthz` returns 200

```bash
#!/bin/sh
# needs: DEXIO_ADMIN_EMAIL, DEXIO_ADMIN_PASSWORD (variables of the dexio service); also curl. DEXIO_ADMIN_EMAIL is admin@ plus the service's public domain.
D="${DEXIO_ADMIN_EMAIL#admin@}"; R="https://$D"; J="Content-Type: application/json"; M="Accept: application/json, text/event-stream"; B=$(mktemp); C=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/healthz")" = 200 ]; do n=$((n+1)); [ "$n" -le 60 ] || break; sleep 5; done
# sign in as the administrator created at first boot (a session cookie), then mint an API key for the agent
c=$(curl -s -c "$C" -o /dev/null -w '%{http_code}' --data-urlencode "email=$DEXIO_ADMIN_EMAIL" --data-urlencode "password=$DEXIO_ADMIN_PASSWORD" "$R/login")
echo "login: $c"
curl -s -b "$C" -o "$B" -w "create key: %{http_code}\n" -H "$J" -d '{"client":"other"}' "$R/api/v1/connect"
K=$(grep -o 'dxk_[A-Za-z0-9_-]*' "$B" | head -1); A="Authorization: Bearer $K"
mcp() { curl -s -H "$J" -H "$M" -H "$1" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"$2\",\"arguments\":$3}}" "$R/mcp"; }
mcp "$A" write_page '{"path":"railway-check","text":"# Railway Check","agent":"deploy-check"}' | grep -c '"isError":false' | sed 's/^/write with key ok: /'
mcp "$A" read_page '{"path":"railway-check"}' | grep -c 'Railway Check' | sed 's/^/page found after write: /'
mcp "$A" delete_page '{"path":"railway-check","agent":"deploy-check"}' | grep -c '"isError":false' | sed 's/^/delete with key ok: /'
curl -s -o /dev/null -w "basic auth /api/v1/me: %{http_code}\n" -u "$DEXIO_ADMIN_EMAIL:$DEXIO_ADMIN_PASSWORD" "$R/api/v1/me"
curl -s -o /dev/null -w "read without key: %{http_code}\n" -H "$J" -H "$M" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"read_page","arguments":{"path":"railway-check"}}}' "$R/mcp"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$J" -H "$M" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"write_page","arguments":{"path":"anonymous","text":"x","agent":"x"}}}' "$R/mcp"
curl -s -o /dev/null -w "write wrong key: %{http_code}\n" -H "$J" -H "$M" -H "Authorization: Bearer dxk_wrong" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"write_page","arguments":{"path":"anonymous","text":"x","agent":"x"}}}' "$R/mcp"
curl -s -o /dev/null -w "api without login: %{http_code}\n" "$R/api/v1/me"
```

A fresh deploy prints `login: 303`, `create key: 200`, `write with key ok: 1`, `page found after write: 1`, `delete with key ok: 1` and `basic auth /api/v1/me: 200`. The refusals print `read without key: 401`, `write without key: 401`, `write wrong key: 401` and `api without login: 401`: a request with no key or a wrong one creates nothing.

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

- **Agent-ready** - a generated administrator password, a contract block and one script that proves sign-in, key creation, an authenticated write, read-back and delete, and the refusal of a read and a write with no key or a wrong one.
- **No setup form and no default login** - the administrator is created at boot from generated secrets.
- **Data survives redeploys** - pages and attachments sit on a volume, with the right ownership set at boot.
- **Built-in MCP server** - point an AI client at `/mcp` with the key.
- **Pinned** - the upstream image is pinned by digest.

## Common Use Cases

- **Shared memory for AI agents** - an agent reads, writes and links pages over MCP and keeps what it learned between runs.
- **Team wiki and knowledge base** - markdown pages with backlinks, search and history.
- **Notes that humans and agents both edit** - one place both can read, with each edit attributed.
- **Self-hosted Notion or Obsidian-style alternative** - own the data, keep it on one domain.

## Dependencies for Dexio Hosting

- The one `dexio` service created by the template with its `/data` volume. Nothing else is required; outgoing email and sign-in providers can be configured with environment variables afterwards.

### Deployment Dependencies

- [Dexio repository](https://github.com/dexio-wiki/dexio)
- [Dexio website and agent guide](https://dexio.wiki)


## 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/dexio-or-just-updated-markdown-wiki-for-
