# SquadJS Setup (Admin Automation & Discord) (/docs/squad/squadjs)





import { Step, Steps } from 'fumadocs-ui/components/steps';

[SquadJS](https://github.com/Team-Silver-Sphere/SquadJS) is the community-standard automation framework for Squad servers. It reads your server logs and RCON in real time and turns them into useful actions — automatic team-kill warnings, seeding-rule broadcasts, and live Discord relays for chat, kills, and `!admin` calls.

Normally SquadJS means running a separate Node.js side-car, editing JSON config, and wiring up log paths yourself. On XGamingServer it's **built into the panel** — flip a toggle, paste your Discord channel IDs, and restart.

<img alt="The SquadJS settings tab in the XGamingServer Squad control panel, showing the enable toggle, teamkill and seeding options, and Discord channel ID fields" src={__img0} placeholder="blur" />

Enable SquadJS [#enable-squadjs]

<Steps>
  <Step>
    Open the SquadJS tab [#open-the-squadjs-tab]

    Log in to the [XGamingServer panel](https://panel.xgamingserver.com), select your Squad server, and open **SquadJS** under **CONFIG** in the sidebar.
  </Step>

  <Step>
    Turn it on [#turn-it-on]

    Tick **Enable SquadJS** to run the automation side-car alongside your game server.
  </Step>

  <Step>
    Pick your automations [#pick-your-automations]

    Enable the features you want (see below), fill in any Discord channel IDs, then click **Save settings**. Changes apply after the next server restart.
  </Step>
</Steps>

Automation Options [#automation-options]

These work on their own — no Discord required.

| Option                     | What it does                                                                                          |
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
| **Enable SquadJS**         | Runs the SquadJS automation side-car alongside the game. Required for everything else on this page.   |
| **Auto teamkill warnings** | Automatically messages players who team-kill, reminding them of the rules.                            |
| **Seeding-mode messages**  | Broadcasts your seeding rules in-game while the server is low-pop, so early players know how to seed. |

Discord Integration [#discord-integration]

SquadJS can relay server events straight into Discord. To use any of the relays, first create a Discord bot, invite it to your server, and paste its token into the **Discord bot token** field — the channel relays below stay inactive until a valid token is set.

For each relay, paste the **channel ID** of the Discord channel you want that feed to post in:

| Field                                   | What posts there                              |
| --------------------------------------- | --------------------------------------------- |
| **Chat relay channel ID**               | In-game chat → this Discord channel           |
| **Killfeed channel ID**                 | Kill events → this Discord channel            |
| **Teamkill channel ID**                 | Team-kills → this Discord channel             |
| **Admin broadcast channel ID**          | Admin broadcasts → this Discord channel       |
| **Admin request (`!admin`) channel ID** | In-game `!admin` pings → this Discord channel |

Leave any field blank to disable that particular relay.

> 💡 **Tip:** To copy a channel ID, enable **Developer Mode** in Discord (User Settings → Advanced), then right-click the channel and choose **Copy Channel ID**.

Broadcast a Message [#broadcast-a-message]

The **Broadcast** box at the bottom of the tab sends a one-off message to everyone currently on the server — handy for event announcements or admin notices without touching RCON.

> 📝 **Note:** After changing any SquadJS setting, restart from **Console** for it to take effect. The `!admin` relay is the fastest way for players to reach your admin team, so it's worth wiring up even if you skip the other feeds.
