Skip to content

Discord Integration

JLangisch edited this page Sep 9, 2025 · 15 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
    • Exceptions and errors
    • Server status changes

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
  • Exceptions and Errors: Sends notifications when exceptions or errors are detected
  • Player List: Provides a table of connected players and their Steam IDs

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=2147568640&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:
    • View Channels
    • Send Messages
    • Read Message History
    • Embed Links
    • Use Slash Commands (for /start, /stop, etc.)
  • 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)
      • Error Channel (Receives gameserver errors)

Tip

To get a channel's ID, enable developer mode in discord, right-click on the channel and select Copy ID

  • Input the Channel IDs on the Config Page:
    • Server Control Channel ID: For sending commands to the bot
    • Server Status Channel ID: For receiving server status notifications
    • Server Log Channel ID: For viewing real-time console output
    • Control Panel Channel ID: For the Control Panel
    • Error Channel ID: For the Error Channel

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