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 16, React 19Web dashboard

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

Don't want to run a Node dashboard process?

The web dashboard above is also available as a separate, static single-page app — same features and look, but it compiles to plain HTML/CSS/JS with no Node runtime needed to serve it. See Self-Hosting the Dashboard (Static SPA) if you'd rather skip running web entirely (or want to run the dashboard on a different, cheaper host than the bot/API).

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. AI Model — Optional: run the local model that powers the AI features, or use Groq
  7. Troubleshooting — Common problems and solutions