---
title: "Deploy contextmate"
description: "Zero-knowledge encrypted sync server for AI agent context"
category: "AI/ML"
url: https://railway.com/deploy/contextmate
---

# Deploy contextmate

Zero-knowledge encrypted sync server for AI agent context

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

- **Creator:** My Projects
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### contextmate

- **Source:** https://github.com/contextmate/contextmate
- **Public domain:** Yes

## Documentation

# Deploy and Host ContextMate on Railway

  ContextMate is a zero-knowledge encrypted sync service for AI agent context —
  memories, skills, rules, and identity files. Your passphrase never leaves your
   device; the server only stores encrypted blobs.

  ## About Hosting ContextMate

  This template deploys the ContextMate server with persistent storage.
  Everything works out of the box — no configuration required. A JWT signing
  secret is auto-generated on first boot and persisted to disk.

  After deploying, point your CLI at your new server:

  ```bash
  npm i -g contextmate
  contextmate setup
```
Enter your Railway server URL when prompted

  ## Why Deploy

  - Own your data — Run the sync server on your own infrastructure instead of
  relying on a shared hosted service.
  - Zero-knowledge encryption — AES-256-GCM with Argon2id key derivation. The
  server never sees your plaintext data.
  - Zero config — JWT secret auto-generates, SQLite database initializes on
  first request. Just deploy and go.
  - Earn from Railway — Template creators earn a share of usage revenue from
  deployments.

## Common Use Cases

  - Self-hosting for teams that require data sovereignty or compliance
  - Syncing AI agent context (memories, skills, rules) across multiple devices
  - Real-time sync between Claude Code, OpenClaw, Cursor, and other AI agents
  via WebSocket
  - Running a private MCP-compatible context server for your organization

## Dependencies for

### Deployment Dependencies

  - Node.js 20+ — Included in the Dockerfile (node:20-slim)
  - SQLite — Embedded, no external database required
  - Persistent volume — Mounted at /data for blobs and database storage.
  Provisioned automatically by Railway.

  No external services, databases, or API keys are required.

##  Environment Variables

  - JWT_SECRET — Optional. Auto-generated if omitted. Set explicitly for
  multi-instance deployments.
  - CORS_ORIGINS — Optional. Comma-separated allowed origins for the web
  dashboard. Allows all if blank.
  - PORT — Server port (default: 3000)
  Links

  - [GitHub](https://github.com/contextmate/contextmate)
  - [Documentation](https://github.com/contextmate/contextmate#readme)
  - [Security Model](https://contextmate.dev/security)

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

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