Self-Hosting Gratonite

Run your own instance — own your data, set your own rules, stay connected to everyone via federation.

Looking for the quick deploy page? Go to Deploy →

Why Self-Host?

Own Your Data

Messages and files live on your server. If gratonite.chat goes down, your community keeps running.

Your Rules

No platform-wide content policies overriding your moderation. Schools, companies, and communities set their own rules.

Stay Connected

Federation links all instances. Your users can join communities on gratonite.chat and vice versa.

Learn more about how federation works: Federation →

Option A: One-Command Installer

The fastest way. Works on any Linux server, Mac, or Windows (WSL). The installer asks one question (local or server), then handles Docker setup, secret generation, TLS certificates, and federation.

curl -fsSL https://gratonite.chat/install | bash

Option B: Desktop App

Download Gratonite Server, double-click, done. No terminal needed. Available for macOS (.dmg), Windows (.exe/.msi), and Linux (.deb/.rpm/.AppImage).

Download Gratonite Server →

Option C: Manual Setup

Full control over every step.

What You Need

  • A Server

    Any Linux machine, VPS, or home PC. 1 GB RAM is enough for small communities.

  • Docker

    Docker Engine 24+ and Docker Compose v2.

  • A Domain

    Point an A record to your server. TLS certificates are handled automatically.

Step 1: Install Docker

curl -fsSL https://get.docker.com | sh

sudo usermod -aG docker $USER

# Log out and back in, then verify:

docker --version && docker compose version

Step 2: Point Your Domain

Create an A recordin your DNS pointing to your server's IP address. Example: chat.yourdomain.com203.0.113.1

Step 3: Configure & Launch

git clone https://github.com/CoodayeA/Gratonite.git

cd Gratonite/deploy/self-host

cp .env.example .env

# Edit .env — set INSTANCE_DOMAIN, ADMIN_EMAIL, ADMIN_PASSWORD, DB_PASSWORD

nano .env

# Launch

docker compose up -d

That's it. HTTPS certificates are auto-obtained via Let's Encrypt. JWT secrets are auto-generated. Open https://your-domain.com and log in with your admin credentials.

What You Get

Federation

Your instance joins the Gratonite network. Users can cross-join communities.

Relay Network

Works behind NAT — no ports to open, no firewall rules.

Voice & Video

Optional LiveKit integration for voice channels and screen sharing.

E2E Encryption

All DMs are end-to-end encrypted. Relay traffic is encrypted too.

Auto-Updates

One command to update: docker compose pull && docker compose up -d.

Backups

pg_dump your database. Migrations run automatically on update.

Enable Voice & Video

Voice and video require LiveKit. Start the voice profile:

docker compose --profile voice up -d

Home Hosting

Running from your home computer? Use your own tunnel or reverse proxy in front of Gratonite if you cannot open ports.

# Standard self-host stack

docker compose -f deploy/self-host/docker-compose.yml up -d

# Then connect your own tunnel/proxy to 443

Enable Federation

Federation is enabled by default in the self-host preset. To explicitly enable or confirm federation settings:

# In your .env file, set:

FEDERATION_ENABLED=true

FEDERATION_DISCOVER_REGISTRATION=true

# Restart

docker compose restart api

Your public communities will appear on Discover within 48 hours. Learn more: How Federation Works →

Updating

cd Gratonite

git pull

docker compose -f deploy/self-host/docker-compose.yml pull

docker compose -f deploy/self-host/docker-compose.yml up -d

Migrations run automatically. Data is preserved.

Recommended VPS Providers

Any provider works. These are popular choices:

Full Documentation

For the complete configuration reference, troubleshooting, backup/restore, and resource usage guide:

View Full Docs on GitHub →