Skip to main content

Self-Hosting ArkenBot

This section covers everything you need to host ArkenBot on your own server. ArkenBot is a pnpm monorepo made up of three long-running services:

ServiceTechnologyPurpose
BotDiscord.js v14, TypeScriptThe Discord bot process
APIFastify 5, TypeScriptREST API + WebSocket gateway
WebNext.js 15, React 19Web dashboard

All three services read from a single .env file at the repository root and are managed by PM2.

Prerequisites Overview

Before you start, you need the following installed on your server:

  • Node.js 20+ and pnpm 9+
  • PostgreSQL 15+ — the primary database
  • Redis 7+ — used for caching, rate limiting, and pub/sub
  • PM2 — process manager that keeps services alive
  • Git

See the Prerequisites page for installation commands.

WorkloadRAMCPUStorage
Small community (<500 members)1 GB1 vCPU20 GB
Medium community (500–5,000 members)2 GB2 vCPU40 GB
Large community (5,000+ members)4 GB+4 vCPU80 GB+

Ubuntu 22.04 LTS is the recommended operating system.

Setup Steps

Follow these pages in order:

  1. Prerequisites — Install Node.js, pnpm, PostgreSQL, Redis, PM2
  2. Discord Setup — Create the Discord application and bot token
  3. Installation & Configuration — Clone the repo, configure .env, build
  4. Database Setup — Create the PostgreSQL database and apply the schema
  5. Deployment — Run with PM2, configure Nginx, enable HTTPS
  6. Troubleshooting — Common problems and solutions