Self-Hosting Bifröst using Docker on Unix-based Systems
This guide will walk you through the steps to self-host Bifröst using docker on a Unix-based system.
Prerequisites
- Docker installed on your system. You can follow the official Docker installation guide for Unix-based systems or install Docker Desktop if you prefer a graphical interface.
- Basic knowledge of using the terminal and Docker.
1. Create a Project Directory
mkdir bifrost
cd bifrost
2. Create a Fluxer Bot
- Open Fluxer.
- Go to User Settings → Applications.
- Click Create Application.
- Copy the Bot Token and Application ID, you’ll need it for the
.envfile.
3. Create a Discord Bot
- Go to the Discord Developer Portal:
https://discord.com/developers/applications - Click New Application.
- Go to Bot -> Add Bot.
- Copy the Bot Token.
- Under Privileged Gateway Intents, enable:
- Message Content Intent
- Copy the Bot Token and Application ID, you’ll need it for the
.envfile.
4. Create the .env file
Create a .env file in the project root:
touch .env
Open it and add your credentials:
# Fluxer
BF_FLUXER_TOKEN="Your Fluxer Bot Token"
BF_FLUXER_APP_ID="Your Fluxer Application ID"
# Discord
BF_DISCORD_TOKEN="Your Discord Bot Token"
BF_DISCORD_APP_ID="Your Discord Application ID"
You can also use .env.example as a reference, or see the full Environment Variables documentation, including how to connect to a self-hosted Fluxer instance.
5. Create the docker-compose.yml
Create a docker-compose.yml file:
services:
bifrost:
image: kartoffelchipss/bifrost:latest
container_name: bifrost
restart: unless-stopped
env_file:
- .env
volumes:
- ./config:/config
Alternative: Download the compose file from GitHub
Instead of creating the file manually, you can download the official compose file from the repository:
curl -O https://raw.githubusercontent.com/KartoffelChipss/bifrost/main/docker-compose.yml
Alternative: All-in-one setup with PostgreSQL
If you want a complete setup with PostgreSQL included, you can use the all-in-one compose file:
curl -o docker-compose.yml https://raw.githubusercontent.com/Kartoffelchipss/bifrost/main/docker-compose-aio.yml
This version automatically starts:
- Bifröst
- PostgreSQL database
6. Start the Container
Run:
docker compose up -d
Docker will automatically pull the latest Bifröst image from Docker Hub and start the container.
You can view the logs with:
docker compose logs -f
Or find the log files in the config/logs directory.
7. Invite the Discord and Fluxer Bot
After the container starts, the invite links for both the Discord and Fluxer bots will be printed in the logs.
Use these links to invite the bots to your servers.