---
title: "Deploy Deft"
description: "Workspace where people and AI agents share chat, tasks and docs"
category: "AI/ML"
url: https://railway.com/deploy/deft
---

# Deploy Deft

Workspace where people and AI agents share chat, tasks and docs

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

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

- **Creator:** Two Workspaces
- **Category:** AI/ML

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** pgvector/pgvector@sha256:ccc6e83d6e35e931dc7c5def2022729d5a6c370318d099181995567ff1fb4d6b

### Deft https://raw.githubusercontent.com/two-workspaces/deft/main/icon.png

- **Source:** https://github.com/two-workspaces/deft
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Deft on Railway

Deft is a self-hosted workspace where people and AI agents work side by side: team chat in spaces and threads, tasks and projects, a knowledge base of pages, approvals for what agents want to do, and MCP connections so your agents (and Claude, Codex or Cursor) can read and act on the workspace. It is licensed AGPL-3.0. This template runs Deft 0.3.0-preview.157 on Railway with Postgres and pgvector, the owner account ready on the first boot.

This is a community template, not made or supported by the Deft authors. Deft is still in preview, with frequent releases.

## About Hosting Deft

Before deploying, set `ADMIN_EMAIL` to your email. Deploy, wait for the green check (the first boot creates the database, which takes a minute or two), and open the Railway domain. Sign in with `ADMIN_EMAIL` and the generated `ADMIN_PASSWORD`, both on the Deft service's Variables tab. Change the password in your profile afterwards; the variable is only used on the first boot.

**Why the owner is created for you:** a fresh Deft server makes whoever signs up first the owner of the workspace. On a public address that could be a stranger, so this template creates the owner from your variables before the site opens. After that, direct sign-up is closed and people join through invite links you create under Settings > Members.

**AI features:** paste provider keys under Settings > AI (Anthropic, OpenAI, OpenRouter, or an Ollama server you run). You can also set `ANTHROPIC_API_KEY`, `OPENAI_API_KEY` or `OPENROUTER_API_KEY` on the Deft service as fallbacks. Without a key, chat, tasks and pages work and the AI features stay off.

**Your data:** messages, tasks, pages and settings are in the Postgres service; uploaded files are on the Deft service's volume at `/data`. Redeploys keep both, and the database is upgraded automatically when Deft is.

**Custom domain:** add it under the Deft service's Settings > Networking, set `PUBLIC_URL=https://deft.example.com` and redeploy.

**Telemetry:** like upstream, Deft sends one anonymous ping to get.deft.ing when the workspace is created and when someone joins (an install ID, the event, the version, the time). Set `DEFT_TELEMETRY=off` on the Deft service to turn it off.

## Common Use Cases

- A team chat and task tracker where AI agents take work, report back and ask for approval
- A shared knowledge base that your agents read and update over MCP
- Giving Claude, Codex or Cursor scoped access to a team's tasks and docs
- A self-hosted alternative to Slack plus Linear plus Notion for a small team
- Trying agent workflows on your own data without a hosted service

## Dependencies for Deft Hosting

- Postgres with pgvector (included)
- For AI features: an API key from Anthropic, OpenAI or OpenRouter, or your own Ollama server

### Deployment Dependencies

- [Deft on GitHub](https://github.com/Maneek21/Deft)
- [Self-hosting guide](https://github.com/Maneek21/Deft/blob/main/docs/self-hosting.md)
- [Template source](https://github.com/two-workspaces/deft)

### Implementation Details

- **Services:** Deft (its web app and API in one container, behind Caddy on one port) and Postgres 16 with pgvector on Railway's private network.
- **Database:** a fresh database gets Deft's tables and seed data on the first boot; every later boot runs Deft's own upgrade step before the app starts.
- **Secrets:** the owner password, both token secrets, the encryption key for stored AI keys and the database password are generated per deploy. Never change `ENCRYPTION_KEY` after saving AI keys, or Deft can't read them.
- **Never crash-looping on a variable:** if a secret is too short, `PUBLIC_URL` or `ADMIN_EMAIL` is malformed, or Postgres can't be reached, the service shows a page saying what to fix instead of restarting over and over, and the deploy logs say the same.
- **Image:** upstream's official `ghcr.io/maneek21/deft:0.3.0-preview.157`, pinned and unmodified, plus a small entrypoint and Caddy.
- **Memory:** MEMORY_PLACEHOLDER

## Why Deploy Deft 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 Deft 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/deft
