8 Running Red on Fluxer
Forgejo Actions edited this page 2026-11-25 21:35:10 +00:00

This page is generated from docs/fluxer.rst - please edit the source file instead of this page.

Running Red on Fluxer

Red can connect to Fluxer, a free and open source chat platform, instead of Discord. Both the official instance and self-hosted instances are supported.

Fluxer's API closely resembles Discord's, so most of Red works the same way. See Limitations for the features that are not available.

Creating the bot

  1. Log in to your Fluxer instance and open User Settings > Applications.
  2. Create a new application and add a bot user to it.
  3. Copy the bot's token (it has the form <application_id>.<secret>).
  4. Invite the bot to your server. Red prints an invite link when it starts, or you can use [p]invite once the bot is running.

Setting up a new instance

Run redbot-setup as usual. When asked which chat platform the instance should connect to, choose Fluxer and enter the URL of your instance, or press Enter to use the official instance (https://fluxer.com).

You can also pass the options directly:

redbot-setup --instance-name mybot --fluxer-instance https://chat.example.com

Afterwards, start the bot with redbot mybot and enter the bot token when asked.

Switching an existing instance

redbot mybot --edit --platform fluxer --fluxer-instance https://chat.example.com --token <token>

To switch back to Discord, use redbot mybot --edit --platform discord --token <discord token>.

WARNING

Discord and Fluxer use different IDs for users, servers, channels and roles. Settings that refer to them (owners, mod roles, channels, ...) have to be set up again after switching an existing instance to the other platform. Using a separate instance for each platform is recommended.

Command-line options

The platform can also be chosen when starting the bot. These options take precedence over the instance's configuration:

--platform {discord,fluxer}
The platform to connect to.
--fluxer-instance URL
URL of the Fluxer instance, e.g. https://chat.example.com. Implies --platform fluxer.
--fluxer-api-url URL
API URL of the instance (without /v1). Only needed if the instance's endpoints can't be discovered automatically.

The environment variables RED_PLATFORM, RED_FLUXER_INSTANCE and RED_FLUXER_API_URL can be used instead of the options.

Self-hosted Fluxer

Red reads the endpoints (API, gateway, media proxy) of an instance from <instance>/.well-known/fluxer (or <instance>/api/.well-known/fluxer), so only the URL of the instance itself is needed. If the discovery document isn't reachable from the machine running Red, pass the API URL with --fluxer-api-url.

Audio

The Audio cog works on Fluxer too. Fluxer's voice channels use LiveKit instead of Discord's voice servers, so Red forwards the audio of the Lavalink node to Fluxer: Lavalink plays the tracks (with all features of the Audio cog, like filters, the equalizer, volume and seeking) and sends the audio to a small voice bridge inside Red, which publishes it in the voice channel.

This needs a few additional Python packages and the Opus library:

  • With Docker Compose, everything is already included.

  • Otherwise, install the fluxer extra in Red's virtual environment and restart the bot:

    $ python -m pip install -U "Red-DiscordBot[fluxer] @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8"
    

    On Linux, the Opus library is usually installed with the package libopus0 (sudo apt install libopus0 on Debian and Ubuntu), on macOS with brew install opus. On Windows, it's included with Red.

The voice bridge only accepts connections from the same machine and Lavalink connects to it with TLS, using a certificate that Red creates (cogs/Audio/fluxer_voice/voice-bridge.crt in Red's data folder). The managed Lavalink node (the default) is set up to trust it automatically. An external Lavalink node can only be used if it runs on the same machine and the certificate is added to the truststore of its Java installation.

The bot needs the permissions to connect and speak in the voice channel. Voice channels with encrypted call media aren't supported yet.

Limitations

The following features rely on parts of Discord's API that Fluxer doesn't have (yet):

  • Application commands (slash commands, context menus): [p]slash is not available.
  • Buttons, select menus and modals: Red uses reactions for menus and confirmations instead. [p]set api has to be used with arguments, e.g. [p]set api youtube api_key <key>.
  • Privileged intents don't exist on Fluxer, all events are always received.

Third-party cogs may use other Discord-only features and might not work on Fluxer.