Yggdrasil
Self-hosted Minecraft authentication server with authlib-injector support
Setup
- Declare database URL
$ export DATABASE_URL="sqlite:yggdrasil.db"
1.5 Create .env
echo 'DATABASE_URL="sqlite:yggdrasil.db" >> .env'
- Create database (install sqlx cli tool if not already)
$ sqlx db create
- Run SQL migrations (this creates the tables)
$ sqlx migrate run
Yggdrasil Server
- Run convenience script
./yggdrasil - OR
DATABASE_URL=<url> cargo run --bin yggdrasil
Database tool (dbtool)
- Run convenience script
./dbtool - OR
DATABASE_URL=<url> cargo run --bin dbtool
Available commands
-
add-account: Creates a new account- Email (
email@example.com) - Language (
en-us) - Country (
US)
- Email (
-
add-profile: Creates a new profile for an account- Email (
email@example.com) (Must match existing account) - Username (
EpicMinecrafter4000)
- Email (
-
attach-profile: Attaches a specific profile to an account- Account ID (
5) (Must match existing account) - Profile ID (
3) (Must match existing profile)
- Account ID (
-
del-account: Deletes an account- Account ID (
5)
- Account ID (
-
del-profile: Deletes a profile- Profile ID (
3)
- Profile ID (
-
search: Search for a specific profile or account- Search type (
account-id,profile-id,email(account),name(profile),uuid(profile)) - Query (Can have multiple)
- Search type (
-
dump: Dumps a table in the database (Mostly for debug)- Table name (
accounts,profiles,sessions,tokens)
- Table name (
Description
Languages
Rust
98.4%
Shell
1.6%