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.

GitHub
marchat logo

Self-host marchat

v1.3.8

Terminal chat with WebSocket server and TUI client

ReleaseOpen SourceMIT
Updated8 hours ago
LanguageGo
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
139
Ports
8080 (WebSocket server (ws://)), 8443 (HTTPS/WebSocket with Caddy reverse proxy (wss://))
Docker
codecodesxyz/marchat
Install with Docker
Server startup and web admin panelServer diagnostics (doctor) outputClient reactions and helpClient theme switching (:theme)Client diagnostics (doctor) output

What is marchat?

marchat is a command-line chat application aimed at developers. It provides a Go-based WebSocket server paired with a Bubble Tea terminal interface, plus separate graphical clients. The server can use SQLite, PostgreSQL, or MySQL for storage. Core capabilities include real-time messaging with editing, deletion, pinning, and emoji reactions, private direct messages, multi-room channels, typing indicators, and read receipts. Optional end-to-end encryption uses a shared ChaCha20-Poly1305 key. Files up to 1 MB can be transferred. A plugin system pulls extensions from a remote registry. Both terminal and web-based admin panels are included. Themes, notifications with scheduling, and health endpoints round out the feature set. Supported platforms include Linux, macOS, Windows, and Android via Termux. Deployment options cover Docker, Docker Compose, standalone binaries, and several package managers. The codebase is MIT-licensed and under active development.

Should you self-host marchat?

marchat scores 49/100 on selfhost.directory (how scoring works) and ranks #51 of 110 in Chat. It has 139 GitHub stars.

It shipped 12 stable releases in the past year. The latest, v1.3.8, came out on 1 October 2026. New versions land roughly every 2 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Zulip (82/100, 26 127 stars). It scores higher overall, so compare the two before you pick. See marchat vs Zulip side by side.

Features

  • Admin Controls
  • Channels
  • Direct Messages
  • E2E EncryptionUses shared symmetric key model, not pairwise Signal-style key exchange
  • File sharing
  • Health Monitoring
  • Message management
  • Plugin System
  • Read Receipts
  • Real-time Chat
  • Smart Notifications
  • Terminal Admin PanelRequires terminal environment (auto-disabled in systemd/non-terminal)
  • Terminal UI
  • Typing Indicators

marchat README

How to install marchat

Install marchat with Docker

Environment variables
MARCHAT_ADMIN_KEY, MARCHAT_USERS, MARCHAT_PORT, MARCHAT_DB_PATH, MARCHAT_TLS_CERT_FILE, MARCHAT_TLS_KEY_FILE, MARCHAT_GLOBAL_E2E_KEY, MARCHAT_MAX_FILE_BYTES, MARCHAT_MAX_MESSAGE_BYTES, MARCHAT_ALLOWED_USERS, MARCHAT_ALLOWED_ORIGINS, MARCHAT_TRUSTED_PROXIES, MARCHAT_LOG_LEVEL, MARCHAT_CONFIG_DIR, MARCHAT_BAN_HISTORY_GAPS, MARCHAT_PLUGIN_REGISTRY_URL

docker pull codecodesxyz/marchat:v1.3.8 docker run -d -p 8080:8080
-e MARCHAT_ADMIN_KEY=$(openssl rand -hex 32)
-e MARCHAT_USERS=admin1,admin2
codecodesxyz/marchat:v1.3.8

Pin a tag in production

How to configure marchat

  • MARCHAT_ADMIN_KEYAdmin authentication key (required)

    Admin authentication key (required)

    values: 64 hex characters

  • MARCHAT_ALLOWED_ORIGINSExtra WebSocket Origin values (comma-separated URLs or hostnames)

    Extra WebSocket Origin values (comma-separated URLs or hostnames)

    values: comma-separated URLs/hostnames

  • MARCHAT_ALLOWED_USERSUsername allowlist (comma-separated)

    Username allowlist (comma-separated)

    values: comma-separated usernames

  • MARCHAT_BAN_HISTORY_GAPSfalseEnable ban history gaps

    Enable ban history gaps

    values: true/false

  • MARCHAT_CONFIG_DIRConfig directory override

    Config directory override

    values: directory path

  • MARCHAT_DB_PATH./config/marchat.dbDatabase path/DSN. Supports SQLite file path, postgres://..., or mysql:...

    Database path/DSN. Supports SQLite file path, postgres://..., or mysql:...

    values: SQLite path or DSN

  • MARCHAT_GLOBAL_E2E_KEYBase64 32-byte global E2E key (server and/or client)

    Base64 32-byte global E2E key (server and/or client)

    values: base64-encoded 32 bytes

  • MARCHAT_LOG_LEVELLog level

    Log level

    values: log level

  • MARCHAT_MAX_FILE_BYTES1048576Max file size in bytes

    Max file size in bytes

    values: bytes

  • MARCHAT_MAX_FILE_MB1Max file size in MB (alternative to bytes)

    Max file size in MB (alternative to bytes)

    values: megabytes

  • MARCHAT_MAX_MESSAGE_BYTES32768Max chat content in bytes

    Max chat content in bytes

    values: bytes

  • MARCHAT_MAX_MESSAGE_MBMax chat content in MB (alternative to bytes)

    Max chat content in MB (alternative to bytes)

    values: megabytes

  • MARCHAT_PLUGIN_REGISTRY_URLhttps://raw.githubusercontent.com/Cod-e-Codes/marchat-plugins/main/registry.jsonPlugin registry URL

    Plugin registry URL

    values: URL

  • MARCHAT_PORT8080Server port

    Server port

    values: port number

  • MARCHAT_TLS_CERT_FILETLS certificate (enables wss://)

    TLS certificate (enables wss://)

    values: certificate file path

  • MARCHAT_TLS_KEY_FILETLS private key

    TLS private key

    values: key file path

  • MARCHAT_TRUSTED_PROXIESReverse-proxy IPs/CIDRs for X-Forwarded-For/X-Real-IP

    Reverse-proxy IPs/CIDRs for X-Forwarded-For/X-Real-IP

    values: IPs/CIDRs

  • MARCHAT_USERSComma-separated admin usernames (required)

    Comma-separated admin usernames (required)

    values: comma-separated usernames

marchat releases & version history

More in Terminal

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…