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

Just deployed

/data

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
#!/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


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1