Installation

Install BlokeBot on your infrastructure

  • Use Nix for the shortest reproducible installation.
  • Use Docker for an isolated service.
  • Use the source tree for development.

The commands below work from the current repository. They do not use placeholders for unreleased packages.

01

Nix

  1. Run the current BlokeBot flake without a global installation.
  2. Use the first command to check the CLI.
  3. Use the second command to start the dashboard.

The second command writes durable state to the supplied directory.

nix run github:alsi-lawr/BlokeBot#blokebot -- help
nix run github:alsi-lawr/BlokeBot#blokebot -- \
  serve --host 127.0.0.1 --port 8080 --data-dir "$HOME/.local/state/blokebot"
  1. For a NixOS service, import github:alsi-lawr/BlokeBot.
  2. Enable services.blokebot.
  3. Put credentials in services.blokebot.environmentFile.

Do not put credentials in ordinary environment values. Nix stores these values in the world-readable Nix store.

02

Docker

  1. Build the production Dockerfile from a source checkout.
  2. Mount /data as durable state.
  3. Supply configuration through environment variables or an environment file.
git clone https://github.com/alsi-lawr/BlokeBot.git
cd BlokeBot
docker build --file packaging/docker/blokebot.Dockerfile --tag blokebot:local .
docker run --rm --init \
  --publish 8080:8080 \
  --volume blokebot-data:/data \
  --env-file /etc/blokebot/blokebot.env \
  blokebot:local

Before you replace or remove the named volume, back it up.

The image starts blokebot serve on port 8080. It stores these items under /data:

  • The database.
  • The token cache.
  • Automatically managed Data Protection keys.

03

Source checkout

  1. Use the repository directly when you change BlokeBot.
  2. Install the .NET 10 SDK.
  3. Install Node.js.

The Core build restores its pinned npm dependencies and compiles Tailwind automatically.

git clone https://github.com/alsi-lawr/BlokeBot.git
cd BlokeBot
dotnet restore BlokeBot.slnx
dotnet run --project src/BlokeBot -- help
dotnet run --project src/BlokeBot -- \
  serve --host 127.0.0.1 --port 8080 --data-dir ./.local/blokebot

04

Run the separate help site

The site is stateless.

  • The site does not reference the bot projects.
  • It does not reference the persistence projects.
  • It does not reference the Twitch projects.

Run it independently on port 8081:

nix run github:alsi-lawr/BlokeBot#blokebot-site -- \
  --urls http://127.0.0.1:8081

If a reverse proxy publishes the site below a path such as /blokebot, set the path base.

The following items then remain under that prefix:

  • The generated base URL.
  • Internal links.
  • Theme media.
  • Static assets.

Use this command:

nix run github:alsi-lawr/BlokeBot#blokebot-site -- \
  --urls http://127.0.0.1:8081 \
  --BlokeBotSite:PathBase=/blokebot

The NixOS module exposes the same setting as services.blokebot-site.pathBase = "/blokebot";.

Alternatively, build its dedicated container:

docker build --file packaging/docker/blokebot-site.Dockerfile \
  --tag blokebot-site:local .
docker run --rm --init --publish 8081:8081 \
  --env BlokeBotSite__PathBase=/blokebot \
  blokebot-site:local

If the help site has its own host name or uses /, omit BlokeBotSite__PathBase.

05

Configure Twitch and public HTTPS

Server setup also requires Twitch configuration and public HTTPS.

  1. Create the Twitch developer application.
  2. Register both callback paths.
  3. Keep the client secret outside source.
  4. Give the public dashboard a trusted HTTPS address.