Skip to content

Self Hosting

EAnathos edited this page Sep 9, 2026 · 1 revision

Self-Hosting

ScholarWatch is open source and can be self-hosted. The easiest way is with Docker.

Docker (recommended)

Prerequisites

Setup

  1. Clone the repository
git clone https://github.com/EAnathos/scholarWatcherForDiscord.git
cd scholarWatcherForDiscord
  1. Configure environment

Copy the example environment file and fill in your credentials:

cp .env.example .env

Required variables:

  • DISCORD_TOKEN — your bot token
  • DISCORD_CLIENT_ID — your application client ID

The DATABASE_URL is set automatically by Docker Compose.

  1. Start the bot
docker compose up -d

This starts both the bot and a PostgreSQL 16 database. Data is persisted in a Docker volume.

  1. Register slash commands

For all guilds (may take up to an hour to propagate):

docker compose exec bot node dist/discord/deploy.js

For a single guild (instant, good for testing):

docker compose exec bot node dist/discord/deploy.js --guild=YOUR_GUILD_ID

Updating

git pull
docker compose up -d --build

Viewing logs

docker compose logs -f bot

Without Docker

Prerequisites

  • Node.js (LTS recommended)
  • PostgreSQL database

Setup

  1. Clone and install
git clone https://github.com/EAnathos/scholarWatcherForDiscord.git
cd scholarWatcherForDiscord
npm install
  1. Configure environment
cp .env.example .env

Set DISCORD_TOKEN, DISCORD_CLIENT_ID, and DATABASE_URL (e.g. postgresql://user:pass@localhost:5432/scholarwatch).

  1. Run database migrations
npm run prisma:migrate
  1. Build and start
npm run build
npm start

For development with hot reload:

npm run dev
  1. Register slash commands
npm run deploy:commands

Or for a single guild:

npm run deploy:commands -- --guild=YOUR_GUILD_ID

Clone this wiki locally