Skip to content
Back to Homepage

How to Set Up Open Discord Bridge

Open Discord Bridge (ODB) relays chat and server events between your Factorio server and a Discord text channel. In-game messages show up in Discord; Discord messages show up in-game as [Discord] username: message.

You need a Factorio server on AleForge and a Discord server where you can add a bot.

Keep your Discord bot token private. Do not post it in chat, commit it to git, or share it in screenshots. If it leaks, open the bot page in the Discord Developer Portal and click Reset Token.

The mod must be installed on the server, not just in your local game.

  1. Go to the AleForge Panel
  2. Add the open-discord-bridge mod through the mod manager, or upload the mod .zip from the Factorio mod portal into the server’s mods/ folder in File Manager

Add the open-discord-bridge mod through the mod manager, or upload the mod .zip from the Factorio mod portal into the se

No other mods are required. Events from mods like Multi-Team Support are relayed automatically.

  1. Go to the Discord Developer Portal and log in
  2. Click New Application

Click New Application

  1. Enter a name and click Create

Enter a name and click Create

  1. Open the Bot tab. You can set the bot’s username and avatar here if you want.
  1. On the Bot tab, find Token and click Reset Token
  2. Confirm, then copy the token. Discord only shows it once. Save it for the Startup step below.

Confirm, then copy the token. Discord only shows it once. Save it for the Startup step below.

Confirm, then copy the token. Discord only shows it once. Save it for the Startup step below.

On the Bot tab, scroll to Privileged Gateway Intents and turn on Message Content Intent, then click Save Changes.

Without this, messages from Discord will not reach the game. Game-to-Discord chat can still work, which makes this easy to miss. Leave Presence Intent and Server Members Intent off.

Without this, messages from Discord will not reach the game. Game-to-Discord chat can still work, which makes this easy

  1. Open OAuth2 in the left sidebar
  2. Scroll to OAuth2 URL Generator
  3. Under Scopes, check bot
  4. Optionally check applications.commands if you want slash commands like /players

Optionally check applications.commands if you want slash commands like /players

Under Bot Permissions, check:

  • View Channels
  • Send Messages
  • Read Message History

Read Message History

  1. Copy the Generated URL at the bottom of the page

Copy the Generated URL at the bottom of the page

  1. Open the URL in your browser
  2. Select your server from Add to server, click Authorize, and complete the captcha

Select your server from Add to server, click Authorize, and complete the captcha

Select your server from Add to server, click Authorize, and complete the captcha

  1. Create or pick a text channel for bridge chat, such as #server-chat
  2. If the channel is private, give the bot access to it

If the channel is private, give the bot access to it

  1. In Discord, go to User SettingsAdvanced and turn on Developer Mode

In Discord, go to User Settings → Advanced and turn on Developer Mode

  1. Right-click the channel and select Copy Channel ID

Right-click the channel and select Copy Channel ID

  1. Go to the AleForge Panel
  2. Open Startup and set:
Field Value
RCON Port Leave the default unless you changed it elsewhere
RCON Password Set a password. RCON must be enabled for Discord-to-game chat
Enable Discord Bridge On
Discord Bot Token The token from above
Discord Channel ID The channel ID you copied
Discord Linked Role ID Leave blank unless you set up linked roles below
  1. Save the startup settings

Save the startup settings

AleForge installs the bridge during a reinstall.

  1. Stop the server and wait until it is offline

Stop the server and wait until it is offline

  1. Go to SettingsReinstall Server and confirm

Go to Settings → Reinstall Server and confirm

Reinstalling reruns the install script. Saves and mods are kept, but take a backup first if you want one.

  1. Start the server after the reinstall finishes

Game to Discord: Join the server or use the panel Console and send a chat message. It should appear in your Discord channel within a few seconds.

Discord to game: Send a message in the channel. It should appear in-game as [Discord] yourname: message.

Discord to game: Send a message in the channel. It should appear in-game as [Discord] yourname: message.

Discord to game: Send a message in the channel. It should appear in-game as [Discord] yourname: message.

Check that Message Content Intent is enabled on the bot, and that RCON Password is set in Startup. Restart the server after changing either.

Check that Enable Discord Bridge is on, the channel ID is correct, the bot is in that server, and the bot can view and send messages in the channel.

On startup the bridge writes bridge.effective.yaml in its working directory. It lists which settings were found (SET or MISSING) and any warnings. The bridge also posts a warning in the channel if permissions are wrong.

ODB can assign a Discord role to players who link their Factorio and Discord accounts.

  1. Give the bot Manage Roles and Manage Nicknames, then re-invite it or update its role permissions
  2. In Server SettingsRoles, move the bot’s role above the role it should assign
  3. Right-click the role and select Copy Role ID
  4. Paste the ID into Discord Linked Role ID in Startup, then reinstall or restart

Players run /odb-link in-game to get a code, then complete the link in Discord.

AleForge field Bridge variable
RCON Port + RCON Password ODB_RCON_ADDRESS (127.0.0.1:<port>) + FACTORIO_RCON_PASSWORD
Discord Bot Token DISCORD_BOT_TOKEN
Discord Channel ID ODB_DISCORD_CHANNEL_ID
Discord Linked Role ID ODB_LINKED_ROLE_ID

More details: open-discord-bridge on GitHub