Self-hosting
This guide sets you up with a self-hosted Fluxcord bot.
Prerequisites
Section titled “Prerequisites”-
A system with Docker and Docker Compose (or Podman and Podman Compose)
- A system with Node.js (>= 20)
- A package manager such as
pnpm(recommended) ornpm. - Both Fluxer and Discord has Developer Mode enabled (go to Settings > Advanced and enable “Developer Mode”)
Installing
Section titled “Installing”- Firstly, clone the Fluxcord repository.
Terminal window $ git clone https://git.gay/Fluxcord/core Fluxcord - Then, install dependencies.
Terminal window $ cd Fluxcord$ pnpm install # (BARE METAL ONLY) or npm install if you didn't install pnpm
Making a bot (Discord)
Section titled “Making a bot (Discord)”- Go to https://discord.com/developers/applications (log in if needed)
- Go to Applications, and create an application by clicking “New Application”.
- Name your bot, accept the terms, and click “Create”.
- Copy the Application ID. We’ll need that, then go to Bot, then click “Reset Token”. Verify your Multi-factor Authentication if needed.
- Copy the generated token, we’ll also need that.
- Scroll down and enable “Message Content Intent”.
Making a bot (Fluxer)
Section titled “Making a bot (Fluxer)”- Go to Settings > Applications, and create an application by clicking “Create Application”.
- Name your bot, and click “Create”.
- Copy the Application ID. We’ll need that in the next step.
- Click “Reset Token”. Verify your Multi-factor Authentication if needed.
- Copy the generated token, we’ll need that.
Making a community for temporary emojis (Fluxer)
Section titled “Making a community for temporary emojis (Fluxer)”This is so the bot can store temporary bridged emojis. If you want to use an existing community you can skip to step 3.
- Click “Add a Community”, then “Create Community”.
- Name it something, and click “Create Community”.
- Now, invite the Fluxer bot by using this link. Replace the
[APP_ID]to the Application ID we got on the previous step.https://web.fluxer.app/oauth2/authorize?client_id=[APP_ID]&scope=bot&permissions=2260735261797440 - After that, right click the community and click “Copy Community ID”
Creating the config file
Section titled “Creating the config file”- Copy the example config file and edit it:
Terminal window $ cp config.example.js config.js$ nano config.js # or vi, gedit, kwrite, emacs... - Put all the things that we got on the previous steps on it.
- Add your Discord and Fluxer accounts on the Admin account IDs by
right clicking your user and click “Copy User ID”, then pasting it on
the
AdminAccountIdsfield. - If bare-metal: Edit the data directory to where you want the Fluxcord data to be stored.
By default it will store it to
/datawhich is not recommended for bare-metal setups. Do not touch this if on Docker.
Running the bot
Section titled “Running the bot”- Run the bot.
Terminal window $ docker compose up -d --build # or podman-compose up -d --build - To see logs, just run
Terminal window $ docker compose logs -f
- Run the migrations. Very important.
Terminal window $ pnpm migrate # or npm run migrate - Now, run the bot.
Terminal window $ pnpm start # or npm run start
Inviting the bot
Section titled “Inviting the bot”The bot will output the invite links on the log/console. Those are the invite codes you use to invite the bot to your server.
After that, go back to Getting Started and follow steps 2-4.