How to self-host the GuildLabs Discord bot
GuildLabs bots aren't a hosted service you rent — they're open-source programs you run yourself. That's the whole point: no monthly bill, no rate limits, and your community's data never leaves your machine. Every GuildLabs bot runs locally, and this guide gets one going from scratch in about ten minutes.
Download the bot
Download the bot bundle from the self-host page (it's a ~50 KB zip, no GitHub account needed), unzip it, and install dependencies in a terminal opened in that folder.
# after unzipping guildlabs-bot.zip
cd guildlabs-bot
npm installCreate a Discord application
- 1Open the Discord Developer Portal and click New Application — give it a name. This is your bot.
- 2Go to Bot, and under Privileged Gateway Intents enable Server Members Intent and Message Content Intent.
- 3Copy the Bot Token and keep it secret — it's effectively a password.
- 4Go to OAuth2 → General and copy the Client ID.
Configure your environment
Copy the example env file and paste in your token and client ID.
cp .env.example .env
# then edit .env:
DISCORD_TOKEN=your_bot_token
CLIENT_ID=your_client_idRegister commands and start it
npm run deploy # registers the slash commands
npm start # starts the bot (npm run dev = auto-restart)When the terminal prints "online as …", the bot is live in Discord — for as long as that terminal stays running. Close it and the bot goes offline. That's exactly what self-hosted means: it runs on your machine, under your control.
Invite it to your server
Generate an invite URL with Administrator permission (it needs that to create roles and channels), replacing CLIENT_ID with yours:
https://discord.com/oauth2/authorize?client_id=CLIENT_ID&permissions=8&scope=bot+applications.commandsBuild a server with it
Design a server on the GuildLabs builder, then bring it into Discord one of two ways. The simplest needs no public URL: click Deploy to Discord, copy the code, and run /deploy with it in your server — your local bot fetches the blueprint and builds everything. (Power users can instead point the site's BOT_API_URL at the bot's local API on port 3008.)

