---
title: "Set up self-hosting"
description: "Install BepInEx, the DiscordMute plugin and your own Discord bot."
canonical_url: "https://docs.mute.yonn2222.com/getting-started/self-host-setup"
---
# Set up self-hosting

> Install BepInEx, the DiscordMute plugin and your own Discord bot.

This guide installs DiscordMute on your own PC: BepInEx, the plugin and your own Discord bot. Everything runs locally. Apart from Discord itself, the only outbound requests are the [telemetry (on by default, can be turned off) and the update check](https://docs.mute.yonn2222.com/privacy/telemetry).

<steps level="2">

## Install BepInEx

DiscordMute requires BepInEx.

- If you already use another Among Us mod that ships with BepInEx, you can usually skip this step.
- Otherwise, download the 64-bit BepInEx build. Among Us is a 64-bit game on Epic Games and the Microsoft Store, and the current Steam version is 64-bit too, so all of them use the same file:

  - Steam / Epic Games / Microsoft Store: [`BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.735+5fef357.zip`](https://builds.bepinex.dev/projects/bepinex_be/735/BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.735%2B5fef357.zip)
- itch.io builds are still 32-bit and are not supported.
- Extract it into your Among Us folder first. If you used an older 32-bit (x86) BepInEx before the Steam update, replace it with this build.

If the Steam version does not start or cannot connect to Steam correctly, make sure Steam is open. Also check that your Among Us folder contains a file named `steam_appid.txt` with this content:

```text
945360
```

## Install the DiscordMute plugin

1. Open your Among Us folder.
2. Go to `BepInEx/plugins`.
3. Copy `DiscordMute.dll` into that folder.
4. Start Among Us once.
5. Close Among Us again.

After the first launch, DiscordMute creates its own config folder inside BepInEx.

Example path:

```text
C:\Steam\steamapps\common\Among Us-Modded\BepInEx\DiscordMute
```

Open `config.json` in that folder and configure it.

### Plugin config

Every key is explained in [plugin configuration](https://docs.mute.yonn2222.com/configuration/plugin-config). The ones you must set are `ip`, `secret` and `exe`.

Example:

```json
{
  "ip": "localhost",
  "botPort": 7264,
  "secret": "replace-this-with-your-own-secret",
  "exe": "C:\\Path\\To\\DiscordBot\\start.bat",
  "bridgeLogsToBotConsole": false
}
```

<note>

**Update the plugin and the bot together.** A 3.x bot refuses 2.x plugins as outdated, and a 3.x plugin cannot connect to a 2.x bot.

</note>

<warning>

**Use double backslashes (\\) or forward slashes (/) in the exe path.** A single backslash breaks the config file. The plugin then silently falls back to its defaults (including the secret `change-me`) and the bot rejects the connection, even if your secrets are identical.

<table>
<thead>
  <tr>
    <th>
      Correct
    </th>
    
    <th>
      Wrong
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        "C:\\Users\\Me\\DiscordBot\\start.bat"
      </code>
    </td>
    
    <td>
      <code>
        "C:\Users\Me\DiscordBot\start.bat"
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        "C:/Users/Me/DiscordBot/start.bat"
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

If something doesn't work, search `BepInEx/LogOutput.log` for `Failed to read plugin config`.

</warning>

## Discord bot setup

1. Open the `DiscordBot` folder from the downloaded ZIP.
2. Rename `config.example.json` to `config.json`.
3. Create a Discord application and bot in the [Discord Developer Portal](https://discord.com/developers/applications).
4. Under **Bot**, turn on **Server Members Intent**. It is the only privileged intent DiscordMute needs. Without it the bot stops right after starting.
5. Under **OAuth2**, **URL Generator**, pick the scopes `bot` and `applications.commands` and the [permissions from the setup panel page](https://docs.mute.yonn2222.com/server-setup/setup-panel) (permission integer `146877440`). Open the generated URL to add the bot to your server.
6. Fill in the bot config.

### Bot config

Every key is explained in [bot configuration](https://docs.mute.yonn2222.com/configuration/bot-config). The ones you must set are `token`, `clientId`, `guildId` and `secret`.

Example:

```json
{
  "token": "YOUR_BOT_TOKEN",
  "clientId": "YOUR_CLIENT_ID",
  "guildId": "YOUR_GUILD_ID",
  "channelIds": [],
  "secret": "replace-this-with-your-own-secret",
  "botIp": "localhost",
  "botPort": 7264,
  "databaseDialect": "sqlite"
}
```

## First start

Once both configs are set up:

1. Start Among Us.
2. Create a lobby as host (online or LAN, not Freeplay). The plugin does nothing when you are not the host.
3. The Discord bot should start automatically through the `exe` path configured in the plugin.
4. Link your account with `/link self` (see [commands](https://docs.mute.yonn2222.com/commands/slash-commands)) and join a Discord voice channel.

DiscordMute mutes the voice channel the lobby host is sitting in, so the host must be linked. If the host can't be resolved, the bot falls back to the channels in `channelIds`. The bot keeps a record of the players it muted and unmutes them again after a crash or restart. It only lifts mutes it applied itself and leaves mutes that were already in place alone.

<tip>

Run `/testconnection` in Discord to check that the bot can reach the plugin.

</tip>
</steps>


## Sitemap

See the full [sitemap](https://docs.mute.yonn2222.com/sitemap.md) for all pages.
