Drasl is an alternative API server for Minecraft that handles authentication, skins, and capes. You can use it to host Minecraft servers that are completely independent from Mojang's infrastructure. It's designed to be easy to host yourself, but a "reference instance" is hosted at https://drasl.unmojang.org which currently requires a Minecraft account to register.
It's compatible with both authlib-injector and the vanilla Yggdrasil protocol, which means it supports:
It includes a minimalist web front end for registering and managing accounts.
You've always been able to host your own Minecraft server, but unless you run the server in offline mode, authentication and skins are usually still handled by Mojang's API servers. There are many reasons to host your own API server instead of using Mojang's. Your community might want to:
enforce-secure-profile=true
(see SignPublicKeys)git clone https://github.com/unmojang/drasl.git
sudo cp -RTi ./drasl/example/docker /srv/drasl
cd /srv/drasl
config/config.toml
according to one of the examples in doc/recipes.mddocker compose up -d
localhost:25585
.See doc/installation.md for other setups, including instructions for setting up a reverse proxy.
See doc/configuration.md for documentation of the configuration options and doc/recipes.md for common configuration patterns.
See doc/usage.md for post-installation instructions and guidance on setting up Minecraft clients and servers.
Drasl implements the Mojang API, documented here on wiki.vg:
If you find that an API route behaves substantively different than the Mojang API, please file an issue.
Drasl also implements (almost all of) the authlib-injector API at /authlib-injector
, to the extent that it differs from Mojang's. The authlib-injector API is documented here (Google Translated to English).
A Drasl API for creating and administering accounts is planned.
If using Nix (with flakes), simply run nix build
.
Otherwise, install build dependencies. Go 1.19 or later is required:
sudo apt install make golang gcc nodejs npm # Debian
sudo dnf install make go gcc nodejs npm # Fedora
sudo pacman -S make go gcc nodejs npm # Arch Linux
Then build the program with:
make
Run the tests with:
make test
Why GPL and not AGPL? Isn't this a web application?
Drasl is intended to be self-hosted, customized, and hacked on. If it were licensed under the GNU Affero GPL, any user who tweaks their instance even slightly would be required to publish the changes, or else they would be violating the AGPL. While I'm a strong believer in copyleft, I don't want to place such a burden on the users in this particular case.