Lazybot is a self-hosted Spring Boot application. This guide walks you from zero to a running bot — cloning the source, installing the two non-Maven-central JNI libraries, filling in your credentials, seeding the database, and launching the JAR. The whole process takes under 15 minutes on a machine that already has Java 21 and MySQL.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Apeuriox/lazybot-renewal/llms.txt
Use this file to discover all available pages before exploring further.
Steps
Clone the Repository
Clone the The repository includes a
lazybot-renewal repository to your local machine or server:lib/ directory containing the two pre-built JNI JAR files that are not available on Maven Central, and a local-maven-repo/ directory used by the Maven build.Install Local Maven Libraries
Lazybot depends on two JNI libraries that must be installed into your local Maven repository before the build can succeed.Rosu-JNI — osu! PP calculation engine by HollisMeynell:Resvg-JNI — Rust-native SVG rasterizer by Zh_jk:Both commands must succeed (look for
BUILD SUCCESS) before proceeding. Run them from the root of the cloned repository.Configure application.yaml
Copy the provided template to create your live configuration file:Open
To obtain osu! credentials, visit osu.ppy.sh → Settings → OAuth and create a new application. Set the Callback URL to the value you will put in
src/main/resources/application.yaml in your editor and fill in all the required fields. The most important ones are:| Key | What to set |
|---|---|
spring.datasource.url | JDBC URL, e.g. jdbc:mysql://localhost:3306/lazybot_schema |
spring.datasource.username | Your MySQL username |
spring.datasource.password | Your MySQL password |
discord.bot.token | Discord bot token from the Developer Portal |
discord.bot.key | Discord bot public key |
discord.bot.id | Discord application ID |
discord.bot.secret | Discord OAuth2 client secret |
lazybot.client_id | osu! OAuth application client ID |
lazybot.client_secret | osu! OAuth application client secret |
lazybot.oauth.redirect-uri | Your publicly reachable OAuth callback URL |
lazybot.prefix | Command prefix (default: /) |
lazybot.global.discord.enabled | Set to true to enable the Discord bot |
lazybot.global.tencent.enabled | Set to true to enable the QQ bot |
lazybot.oauth.redirect-uri.Initialize the Database
Lazybot requires a pre-existing MySQL schema with the correct table structure. Create the database and run the provided SQL script:Make sure
spring.datasource.url in your application.yaml points to the same schema name used above (lazybot_schema by default).Lazybot uses MyBatis-Plus for ORM. The schema must be initialised manually via
script.sql — there is no automatic migration or schema generation on first boot.Build and Run Lazybot
Build the fat JAR with the Maven wrapper (skip tests on first run):A successful build produces a JAR at Both The service runs under a dedicated
target/lazybot-<version>.jar. Launch it with the required JVM flags:--enable-preview (Java 21 preview features) and --enable-native-access=ALL-UNNAMED (Resvg JNI native library) are required — the bot will not start correctly without them.You should see Spring Boot’s startup banner followed by log lines confirming that the Discord gateway and/or the Shiro WebSocket server have connected.Running as a systemd Service (Linux)
For production deployments, a ready-made systemd unit file is provided atscripts/lazybot.service. Copy it to /etc/systemd/system/, edit the paths to match your setup, then:lazybot user, restarts automatically on failure, and logs to journald.Test Your Bot
Once Lazybot is running, verify everything works end-to-end:-
Check the help page — in Discord, type
/helpin any channel the bot can read. On QQ, send/helpin the group where your OneBot client is active. -
Link your osu! account — before you can query scores, bind your osu! username to your Discord or QQ ID:
Lazybot will send an osu! OAuth authorization link. Complete the flow in your browser and your account will be bound.
-
Fetch your best play — once linked, try:
You should receive a rendered score panel image of your #1 best performance.
Next Steps
Configuration Reference
Explore every
application.yaml setting in detail — rate limiting, async thread pools, avatar cache TTL, and more.Score Commands
Full documentation for
/bp, /score, /recent, /nochoke, /bpvs, /filter, and all other performance commands.