Skip to content

Self hosting guide

Alex1304 edited this page Oct 21, 2021 · 8 revisions

IMPORTANT: This guide has been updated to support UltimateGDBot v7, which should be a LOT easier to setup. It doesn't use a plugin system anymore and it now uses MongoDB instead of MySQL. This new version also doesn't require a JDK installation anymore since the Java binaries are now embedded in the application directly. Self-hosting older versions is no longer supported.

Prerequisites

  • Go to the Releases page and download the attached zip file corresponding to your OS. Unzip the contents in the directory of your choice.
  • Create a bot account in the Discord Developer Portal.
  • Install the latest version of MongoDB Community Server and make sure the server is running.
  • Download the emoji pack which is an archive containing the emojis that the bot needs to work. Upload them in servers you own. If you don't have enough slots to upload all of them in the same server, no problem, you can split them across more than one server. Make sure the bot is present in all of these servers.

Basic Configuration

  • In the directory where you unzipped the application, you will find a file named config.json. Open this file in a text editor.
  • Replace ${token} with the token of your bot. You can find it in the Discord Developer Portal.
  • Replace ${username} and ${password} with the username/password of a Geometry Dash account. This account is the one that will accept confirmation messages in order to allow users to link their Geometry Dash account in Discord. You may use your own account or create a new one, either way make sure the account accepts in-game private messages from everyone.
  • Copy the IDs of the servers in which you uploaded the emojis from the emoji pack earlier, and paste them between the [] in emoji_guild_ids, separated with commas if there is more than one server. For example:
    "emoji_guild_ids": [357655103768887297, 361255823357509645],

Advanced configuration

  • If you want the bot to announce new rated levels, new Daily levels/Weekly demons, and updates of the moderator list, you can specify the ID of the channels in which the bot will send these announcements in rates_channel_ids, demons_channel_ids, timely_channel_id and mods_channel_id. Note that you can specify more than one channel for the first two ones, if you do so the bot will rotate between these channels on each announcement. If those channels are Announcement Channels, you can set crosspost to true to automatically publish the announcements to the servers following your channels.
  • If you want the bot to access data from a Geometry Dash Private Server (GDPS), you can change the host value to the URL of your GDPS.
  • You may notice some slash commands are locked. You are able to unlock access to those commands to specific roles via the command_permissions configuration entry (located inside the ultimategdbot entry):
    "command_permissions": [
        {
            "name": "blacklist",
            "guild_id": 361255823357509645,
            "role_id": 361598038281682955
        },
        {
            "name": "bot-admins",
            "guild_id": 361255823357509645,
            "role_id": 427201723136737280
        },
        {
            "name": "gd-events",
            "guild_id": 361255823357509645,
            "role_id": 427201723136737280
        },
        {
            "name": "leaderboard-mod",
            "guild_id": 361255823357509645,
            "role_id": 361598038281682955
        },
        {
            "name": "mod-wave",
            "guild_id": 361255823357509645,
            "role_id": 361598038281682955
        }
    ],
    

Run the bot

To run the bot, simply execute ultimategdbot in the bin/ subdirectory (on Windows it's called ultimategdbot.bat). It will open a console window displaying the logs in real time. If you are on Linux or MacOS, you might need to add execute permissions to all files in the bin/ subdirectory (chmod u+x bin/*)

Note that the bot will stop if you close the console window. If you want to run the bot in the background:

  • Open a terminal (cmd.exe on Windows, bash on Linux, etc)
  • Navigate to the directory of your bot installation: cd path/to/your/ultimategdbot/installation
  • Run the command bin/ultimategdbot --detached (or bin/ultimategdbot.bat --detached on Windows). If successful, it will say that the bot has started in the background and will display the process ID (PID) of the bot. Logs will be written in the logs/ subdirectory. If you are using some kind of script or automated tool to start your bot, you can add --batch-mode in the end of the command so it won't ask you to press a key to exit.

Troubleshooting

Join the official Discord server at https://discord.gg/VpVdKvg and ask for help in #self-hosting if you need any assitance or run into issues when following this guide.

Clone this wiki locally