selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

xEdit logo

Self-host xEdit

Markdown editor with live preview, wiki links, MCP for AI

BetaOpen SourceMIT
Updatedlast week
LanguageTypescript
Setup difficultyModerate
ThemeDark mode
Stars
185
CPU
1 CPU
RAM
1 GB RAM (2 GB recommended)
Port
3000 (HTTP web server)
Requires
PostgreSQL
Install with Docker Compose

What is xEdit?

Should you self-host xEdit?

xEdit scores 44/100 on selfhost.directory (how scoring works) and ranks #56 of 81 in Notes & Editors. It has 185 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Memos (86/100, 64 136 stars). It scores higher overall, so compare the two before you pick. See xEdit vs Memos side by side.

Features

  • AI review (beta)Beta; daily cap per account; model runs on site's keys
  • Callouts
  • Cloud sync with offline support
  • Export to Multiple Formats
  • Image and video hostingRequires Alibaba Cloud OSS configuration
  • Live preview Markdown editor
  • Mac appmacOS 12+, Apple Silicon only; installer not code-signed
  • MCP server for AI access
  • Nested folders with drag-and-drop
  • Share links with comments
  • Slash Commands
  • To-dos with Today view
  • Version History
  • WeChat/Zhihu copy with CSS inlining
  • Wiki Links

xEdit README

How to install xEdit

Install xEdit with Docker Compose

Environment variables
POSTGRES_PASSWORD, AUTH_SECRET, AUTH_URL, NEXT_PUBLIC_SITE_URL, plus optional OAuth/OSS/AI vars

git clone https://github.com/rotbit/xedit.git cd xedit cp .env.example .env

Edit .env: set POSTGRES_PASSWORD, AUTH_SECRET, AUTH_URL, NEXT_PUBLIC_SITE_URL

docker compose up -d --build

Recommended; runs PostgreSQL + app; tables created automatically

How to configure xEdit

  • ADMIN_EMAILSSuper-admin email allowlist (comma-separated, case-insensitive). After logging in, listed accounts see 「管理后台」 (Admin) (/admin) in the account menu: account list, read-only bans, storage quota adjustment, account deletion. If empty, the admin is closed to everyone.

    Super-admin email allowlist (comma-separated, case-insensitive). After logging in, listed accounts see 「管理后台」 (Admin) (/admin) in the account menu: account list, read-only bans, storage quota adjustment, account deletion. If empty, the admin is closed to everyone.

  • AI_DAILY_LIMIT(Claude / GPT on Replicate use the REPLICATE_API_TOKEN above)

    (Claude / GPT on Replicate use the REPLICATE_API_TOKEN above)

  • AI_ENCRYPTION_KEYPlatform keys users enter in 「AI 设置」 (AI settings) are AES-256-GCM encrypted with this before being stored. If empty, it's derived from AUTH_SECRET; once in use don't change it, or stored keys can't be decrypted and must be re-entered.

    Platform keys users enter in 「AI 设置」 (AI settings) are AES-256-GCM encrypted with this before being stored. If empty, it's derived from AUTH_SECRET; once in use don't change it, or stored keys can't be decrypted and must be re-entered.

  • AUTH_GITHUB_IDGitHub OAuth (create an OAuth App at https://github.com/settings/developers) Callback URL: http://localhost:3000/api/auth/callback/github

    GitHub OAuth (create an OAuth App at https://github.com/settings/developers) Callback URL: http://localhost:3000/api/auth/callback/github

  • AUTH_GITHUB_SECRET
  • AUTH_GOOGLE_IDGoogle OAuth (create an OAuth client at https://console.cloud.google.com) Callback URL: http://localhost:3000/api/auth/callback/google

    Google OAuth (create an OAuth client at https://console.cloud.google.com) Callback URL: http://localhost:3000/api/auth/callback/google

  • AUTH_GOOGLE_SECRET
  • AUTH_SECRETSigning secret for sessions and MCP tokens; generate with `openssl rand -base64 32`

    Signing secret for sessions and MCP tokens; generate with `openssl rand -base64 32`

  • AUTH_URLRecommended to set explicitly behind a reverse proxy so Auth.js can build callback URLs, e.g. https://example.com

    Recommended to set explicitly behind a reverse proxy so Auth.js can build callback URLs, e.g. https://example.com

  • AUTH_WECHAT_ENABLEDExplicit switch for WeChat login; set to 1 or true to enable. WeChat login needs a business-verified Open Platform account (individual developers can't apply), a higher bar than the two above; leave empty to disable; the WeChat login button won't appear even if the ID/Secret below are filled in.

    Explicit switch for WeChat login; set to 1 or true to enable. WeChat login needs a business-verified Open Platform account (individual developers can't apply), a higher bar than the two above; leave empty to disable; the WeChat login button won't appear even if the ID/Secret below are filled in.

  • AUTH_WECHAT_IDAppID / AppSecret of a 「网站应用」 (Website app) on the WeChat Open Platform (https://open.weixin.qq.com). Set the authorized callback domain to your site's domain (domain only, no protocol or path); the actual callback URL is http://localhost:3000/api/auth/callback/wechat

    AppID / AppSecret of a 「网站应用」 (Website app) on the WeChat Open Platform (https://open.weixin.qq.com). Set the authorized callback domain to your site's domain (domain only, no protocol or path); the actual callback URL is http://localhost:3000/api/auth/callback/wechat

  • AUTH_WECHAT_PLATFORMwebsite (default) = Open Platform website app, PC QR-code login; official = WeChat Official Account web authorization, only works in WeChat's in-app browser.

    website (default) = Open Platform website app, PC QR-code login; official = WeChat Official Account web authorization, only works in WeChat's in-app browser.

  • AUTH_WECHAT_SECRET
  • COVER_GENERATE_DAILY_LIMITMax generations per account per calendar day; defaults to 20 if empty

    Max generations per account per calendar day; defaults to 20 if empty

  • COVER_GENERATE_TIMEOUT_SECTimeout per generation (seconds); defaults to 90 if empty

    Timeout per generation (seconds); defaults to 90 if empty

  • DATABASE_URLPostgreSQL connection string. When deploying with docker compose, skip DATABASE_URL and set POSTGRES_PASSWORD below instead.

    PostgreSQL connection string. When deploying with docker compose, skip DATABASE_URL and set POSTGRES_PASSWORD below instead.

  • DEEPSEEK_API_KEY---- Optional: AI article review ---- Which provider's model and each provider's token are configured in 「AI 设置」 (AI settings) in the admin (/admin); tokens are encrypted with AI_ENCRYPTION_KEY above (or AUTH_SECRET if unset) before being stored; if you change that key, tokens entered in the admin must be re-entered. The env vars below are only a fallback: read only for providers not filled in the

    ---- Optional: AI article review ---- Which provider's model and each provider's token are configured in 「AI 设置」 (AI settings) in the admin (/admin); tokens are encrypted with AI_ENCRYPTION_KEY above (or AUTH_SECRET if unset) before being stored; if you change that key, tokens entered in the admin must be re-entered. The env vars below are only a fallback: read only for providers not filled in the

  • DEFAULT_STORAGE_QUOTA_MBPer-account asset storage quota (MB); new uploads are blocked once exceeded. Defaults to 10240 (10GB) if empty; adjustable per account in the admin (including unlimited).

    Per-account asset storage quota (MB); new uploads are blocked once exceeded. Defaults to 10240 (10GB) if empty; adjustable per account in the admin (including unlimited).

  • MOONSHOT_API_KEY
  • NEXT_PUBLIC_SITE_URLPublic URL. The landing page's canonical, Open Graph images, robots.txt and sitemap.xml all use it; defaults to https://xedit.me if empty. Self-hosters set their own domain, without a trailing slash.

    Public URL. The landing page's canonical, Open Graph images, robots.txt and sitemap.xml all use it; defaults to https://xedit.me if empty. Self-hosters set their own domain, without a trailing slash.

  • OPENAI_API_KEY
  • OSS_ACCESS_KEY_ID
  • OSS_ACCESS_KEY_SECRET
  • OSS_BUCKET
  • OSS_CDN_DOMAINBound CDN/custom domain, e.g. https://img.example.com

    Bound CDN/custom domain, e.g. https://img.example.com

  • OSS_REGION
  • PORTHost port mapping, default 3000

    Host port mapping, default 3000

  • POSTGRES_PASSWORDcompose uses it to create the database and build the in-container DATABASE_URL

    compose uses it to create the database and build the in-container DATABASE_URL

  • REPLICATE_API_TOKENGet one at https://replicate.com/account/api-tokens (starts with r8_); stays server-side, never sent to the browser

    Get one at https://replicate.com/account/api-tokens (starts with r8_); stays server-side, never sent to the browser

  • REPLICATE_ASPECT_RATIOCover aspect ratio; empty = auto: try 21:9 first, and if unsupported use the widest landscape ratio the model supports

    Cover aspect ratio; empty = auto: try 21:9 first, and if unsupported use the widest landscape ratio the model supports

  • REPLICATE_MODELImage model; defaults to black-forest-labs/flux-schnell if empty (a few seconds per image, the cheapest tier). To pin a version, write owner/name:version. Switching models needs no manual input checks: aspect ratios and optional fields the model rejects (num_outputs / output_format / output_quality) are adjusted automatically from the upstream error and retried

    Image model; defaults to black-forest-labs/flux-schnell if empty (a few seconds per image, the cheapest tier). To pin a version, write owner/name:version. Switching models needs no manual input checks: aspect ratios and optional fields the model rejects (num_outputs / output_format / output_quality) are adjusted automatically from the upstream error and retried

  • ZHIPU_API_KEY

FAQ

Is there a Mac app? What about Windows?

Mac app exists for Apple Silicon macOS 12+ (not code-signed yet). No Windows app yet; web version works fully on Windows.

What export formats are supported? Can I share notes?

Export to Markdown, HTML, PDF, long PNG, and Word (Feishu-compatible). Logged-in users can generate share links; readers view without login and can comment on text/images/video.

What does AI review do?

Reads the full document and flags awkward phrasing, wordiness, poor word choice, and logic gaps. Suggestions are pinned to sentences; accept or ignore with one click. Beta, daily limit, model costs covered by xEdit during beta.

Can AI clients like Claude manage my notes?

Yes, xEdit has a built-in MCP server with OAuth 2.1. Authorize in the AI client, then it can list, search, create, edit, and delete your cloud notes and images. Free to connect; AI client's own costs apply.

How do wiki links and to-dos work?

Type [[ to autocomplete note titles; renaming a note updates all links. To-dos are - [ ] with date tags like @tomorrow or @daily; they roll up into the Today sidebar.

Can I write offline?

Yes. Unlogged mode is always local. Logged in: edits save to an offline mirror and sync automatically when back online. Mac app switches to an offline shell when disconnected.

Can I use a folder on my computer as the vault?

Yes, in local mode (not logged in), click 'Open folder as vault' in the sidebar. Requires Chrome/Edge (File System Access API). Notes stay in that folder only, no cloud sync.

Where are my notes stored?

Unlogged: in the current browser (or a local Markdown folder in Chrome/Edge). Logged in: synced to cloud with an offline mirror on each device.

How does xEdit differ from Obsidian and Notion?

Like Obsidian, xEdit uses plain Markdown and wiki links; like Notion, it has slash commands, callouts, and drag-and-drop. It runs in the browser with free cloud sync and built-in MCP for AI. It lacks backlinks panel, graph view, databases, plugins, mobile apps, and real-time collaboration.

Is xEdit free? Do I have to register to use it?

Yes, xEdit is free with no paid plans. You can write without registering; notes save to the browser. Register for cloud sync, version history, image uploads, and share links.

More in Notes & Editors

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…