AntiRaidAntiRaid

Self-Hosting Guide

How to deploy AntiRaid on your own infrastructure using Docker Compose or native systemd.

Updated April 11, 2026

AntiRaid is a multi-service system. Running it yourself means deploying several components together: the Discord bot (Rust), the HTTP API (Go), the job server (Go), the template worker (Rust), a PostgreSQL database, object storage, and a reverse proxy. This guide explains your options and helps you choose the right approach.

This is for advanced users

Self-hosting requires Linux server administration experience, familiarity with Docker or systemd, and the ability to troubleshoot service failures. If you just want to use AntiRaid in your server, invite the hosted bot instead.

Deployment options

All services are defined in a single docker-compose.yml. Docker handles networking, dependency ordering, and restarts automatically. This is the fastest way to get a working stack.

Best for: developers who want a reproducible environment, or anyone new to self-hosting AntiRaid.

Native / systemd

Each service runs as a native Linux process managed by systemd. You build each binary yourself, write unit files, and manage configuration manually. This gives you full control over the process lifecycle, resource limits, and system integration.

Best for: production servers where you want tight OS integration, custom monitoring, or minimal container overhead.

Comparison

Docker ComposeNative (systemd)
Setup difficultyLowHigh
ReproducibilityHighMedium
OS integrationLimitedFull
Monitoringdocker logs, Compose CLIjournalctl, systemd status
Upgradingdocker compose pull && upRebuild binaries, restart units
CustomisationMediumFull

What you'll need

Regardless of the deployment method, you'll need:

  • A Linux server (Ubuntu 22.04+ or Debian 12+ recommended)
  • PostgreSQL 15+
  • A Discord application with bot token and OAuth2 credentials
  • S3-compatible object storage (MinIO works well for self-hosted setups)
  • A domain name with TLS (if exposing the API externally)

Services overview

ServiceLanguagePurpose
botRustHandles Discord gateway events, slash commands, and moderation
apiGoHTTP API for the dashboard and external integrations
jobserverGoBackground jobs — backups, pruning, scheduled tasks
template-workerRustExecutes user-defined Luau scripts in a sandboxed environment

For detailed information on each service, see the Services docs.