This guide covers the prerequisites and first-run setup for a self-hosted Lyuze 3.0 installation.
Install:
- .NET 8 SDK or newer.
- Git.
- A Discord account that can create and configure an application.
- A MongoDB instance. MongoDB Atlas or a self-hosted MongoDB server can be used.
- Open the Discord Developer Portal.
- Create an application.
- Open the Bot page and add a bot user.
- Copy the bot token into your private runtime settings. Never commit or share it.
- Enable the gateway intents required by the features you use. Message leveling requires message-related access, and member/welcome behavior requires member access.
- Create an invite under OAuth2 → URL Generator.
- Select the
botandapplications.commandsscopes. - Grant only the permissions the installation needs. Avoid using
Administratoroutside temporary development testing.
The bot registers commands for the configured guild ID during startup.
git clone https://github.com/ProjektCode/Lyuze-3.0.git
cd Lyuze-3.0
dotnet restore "Lyuze 3.0.sln"
dotnet build "Lyuze 3.0.sln" --no-restoreThe application looks for Resources/Settings/settings.json relative to its executable directory. SettingsService creates a default template when the file does not exist.
Before starting the bot, configure the private values described in Configuration.
Run the bot with:
dotnet run --project "Lyuze 3.0.csproj"Do not commit the generated runtime settings file. Keep tokens, API keys, and MongoDB connection strings outside public documentation and source control.
You may use MongoDB Atlas or a self-hosted MongoDB instance.
For MongoDB Atlas:
- Create an Atlas account and project.
- Create a cluster appropriate for your installation.
- Create a database user with only the access required by the bot.
- Add the bot host's network location to the Atlas access list. Prefer a narrow address or private route over
0.0.0.0/0. - Copy the application connection string into the private
Database.MongoDBsetting. - Choose a database name and player collection name.
The bot creates and uses its configured player collection. Back up the database before changing production settings or model fields.
- Run
dotnet build "Lyuze 3.0.sln". - Start the bot with
dotnet run --project "Lyuze 3.0.csproj"or your IDE. - Confirm the process connects to Discord without configuration or permission errors.
- Confirm commands register in the configured guild.
- Run
/help. - Run
/profileand confirm a player document can be created or read. - Check the console for startup and database errors without sharing the output publicly if it contains installation details.
- Confirm the token is current and stored in the private settings file.
- Confirm the bot is invited to the intended guild.
- Confirm the required gateway intents are enabled.
- Confirm the host can reach Discord and MongoDB.
- Confirm the
applications.commandsscope was included in the invite. - Confirm the configured guild ID is correct.
- Restart the bot and review command-registration logs.
- Verify the connection string and database user.
- Verify the database host allows the bot host's network location.
- Confirm the database name and player collection are present in the settings file.
- Do not paste the connection string into an issue or public chat.