Skip to content

Discord Integration

JLangisch edited this page Mar 19, 2026 · 19 revisions

StationeersServerUI offers comprehensive Discord integration, allowing you to monitor and manage your server directly from Discord.

Features

Real-Time Monitoring

  • View server status and console output directly in Discord
  • Receive notifications for server events such as:
    • Player connections/disconnections
    • Current join passcode
    • Server status changes
    • Version info

Server Management Commands

  • Start, stop, and restart the server
  • Restore backups
  • Ban and unban players by their Steam ID
  • Update server files
  • And more - see Discord Commands

Access Control

  • Utilize Discord's role system for granular access control
  • Restrict server management commands to specific roles

Discord Notifications

The bot can send notifications for the following events:

  • Server Ready: Notifies when the server status changes to ready
  • Player Connection/Disconnection: Alerts when a player connects or disconnects
  • Player List: Provides a table of connected players and their Steam IDs
  • Request for Server Passcode: The bot will retrieve and display the current server passcode
  • Server Version: The bot will retrieve the current game version installed
  • Time Until Restart: The bot will retrieve the time remaining until the next auto restart, if enabled.

Setup Instructions

  1. Create a Discord Bot

    • Head to the Discord Developer Portal and log in with your Discord account.
    • Click New Application, give it a name (e.g., "MyStationeersBot"), and hit Create.
    • Go to the Bot section in the sidebar
    • Customize your bot’s name or icon if you want (optional).
  2. Obtain the Bot Token

    • In the Bot tab, find the Token section and click Reset Token to obtain a new one.
    • Paste it somewhere secure for later (like a private text file)—never share this, as it’s your bot’s key to Discord.
  3. Invite the Bot to Your Server

    3.1 (Easy):

    • Go to the OAuth2 sidebar section
    • Copy the Client ID from Client information
    • Edit the following URL to include the just copied ClientID where the URL says (remove the <> brackets) https://discord.com/oauth2/authorize?client_id=<CLIENTIDHERE>&permissions=2147609680&integration_type=0&scope=bot
    • Copy that URL, paste it in a browser, pick your server (you need “Manage Server” perms), and click Authorize.
    • Your bot should now appear in your server’s member list (offline until you run StationeersServerUI with the token and Discord Enabled).

Important

If you used the Easy way (above) there is no need to do this step the Advanced way again. Skip this step and proceed with Step 4.

3.2 (Advanced): If you want to setup the URL yourself in the Discord Developer portal, follow these steps:

  • Proceed in the section OAuth2 URL Generator.
  • Under Scopes, check bot.
  • Under Bot Permissions, select at least:
image
  • Copy the "Permissions Integer" at the bottom of the panel
  • Go to the OAuth2 sidebar section - Copy the Client ID from Client information - Edit the following URL to include the just copied ClientID where the URL says and the Permisson Integer where it says (remove the <> brackets) https://discord.com/oauth2/authorize?client_id=<CLIENTIDHERE>&permissions=<PERMISSIONSINTEGER>&integration_type=0&scope=bot
  • Copy that URL, paste it in a browser, pick your server (you need “Manage Server” perms), and click Authorize.
  • Copy the generated URL, paste it in a browser, pick your server (you need “Manage Server” perms), and click Authorize.
  • Your bot should now appear in your server’s member list (offline until you run StationeersServerUI with the token and Discord Enabled).
  1. Configure the Bot in the Server Control UI

    • In the StationeersServerUI web interface, click on the Config button
    • On the **Discord Config page, enable the Discord integration.
    • Enter the bot's token in the Discord Token field
    • Create the following Discord channels:
      • Admin Control Channel (for commands)
      • Server Status Channel (for Status messages)
      • Server Log Channel (for ALL Server Logs)
      • Control Panel Channel (for a neat little control panel to start/stop/restart) Note: The bot will remove previous messages, including any user messages. This is why it is important to have dedicated channels for management.

Important

If you add these channels as private channels, make sure to add the Bot to all the channels:

image image image

Tip

To get a channel's ID, enable developer mode in discord, right-click on the channel and select Copy ID Alternatively, right click on the channel then select 'Copy Link' and the last string of numbers in the URL is the ChannelID

  • Input the Channel IDs from the Discord channels into the Config Page:
    • Admin Command Channel: This allows for using '/' commands to interact with SSUI (see below).
    • Control Panel Channel: The bot will show a panel of quick commands activated by emoji reactions
    • Game Event Log Channel: For viewing real-time console output
    • Server Status Panel Channel: This will display currently connected players, a button to retrieve server password, server version info and time to next auto restart
    • Log Channel: The backend SSUI logs will be sent here

Note

Same Channel: While you could use the same channel for all streams, I highly discourage you to do so.**

  1. Restart SSUI or run restartbackend (also has alias rsb) from SSUICLI

Discord Commands

Command Description
/start Starts the server
/stop Stops the server
/restore <index> Restores a backup at the specified index
/list [limit] Lists recent backups (defaults to 5 if number not specified)
/ban <SteamID> Bans a player by their SteamID
/unban <SteamID> Unbans a player by their SteamID
/help Displays help information for the bot commands
/command <command> Allows you to run server console commands from discord
/update Runs Steamcmd to update the gameserver

Next Steps

Clone this wiki locally