Minecraft Authentication server with authlib-injector support
Go to file
2023-06-21 18:16:02 -04:00
migrations Create stubs for a lot of routes; rework structs.rs to module 2023-06-20 00:52:08 -04:00
src optimize imports 2023-06-21 18:16:02 -04:00
.gitignore Partial rewrite 2023-06-19 00:17:00 -04:00
Cargo.toml Add dotenvy 2023-06-21 15:31:31 -04:00
dbtool First release. Basic authentication and profiles work great 2023-06-21 04:13:14 -04:00
LICENSE Work on getting sqlx setup 2023-06-18 12:57:08 -04:00
README.md Polish routes more 2023-06-21 16:21:27 -04:00
yggdrasil First release. Basic authentication and profiles work great 2023-06-21 04:13:14 -04:00

Yggdrasil

Self-hosted Minecraft authentication server with authlib-injector support

Setup

  1. Declare database URL
$ export DATABASE_URL="sqlite:yggdrasil.db"

1.5 Create .env

echo 'DATABASE_URL="sqlite:yggdrasil.db" >> .env'
  1. Create database (install sqlx cli tool if not already)
$ sqlx db create
  1. 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)
  • add-profile: Creates a new profile for an account

    • Email (email@example.com) (Must match existing account)
    • Username (EpicMinecrafter4000)
  • attach-profile: Attaches a specific profile to an account

    • Account ID (5) (Must match existing account)
    • Profile ID (3) (Must match existing profile)
  • del-account: Deletes an account

    • Account ID (5)
  • del-profile: Deletes a profile

    • Profile ID (3)
  • search: Search for a specific profile or account

    • Search type (account-id, profile-id, email (account), name (profile), uuid (profile))
    • Query (Can have multiple)
  • dump: Dumps a table in the database (Mostly for debug)

    • Table name (accounts, profiles, sessions, tokens)