Skip to content

Latest commit

 

History

History
88 lines (57 loc) · 5.13 KB

usage.md

File metadata and controls

88 lines (57 loc) · 5.13 KB

Usage

Installation & Configuration

See installation.md for installation instructions. Refer to recipes.md for sample configuration files and configuration.md for documentation of the available options.

Initial setup

Start by creating an account. If you configured your instance to require an invite to register, an initial invite link will be printed to the log on stdout when Drasl starts. If you are running Drasl with Docker, you can view the log with docker logs docker-drasl-1 or similar. If you're running it with systemd, use sudo journalctl -u drasl. You're searching for a line like:

No users found! Here's an invite URL: https://drasl.example.com/drasl/registration?invite=ST1dEC1dLeN

Make sure your new account's username is in the list of DefaultAdmins in your configuration file. Admins can access the "Admin" page via the link in the top right, where they can issue invites, manage other accounts, and make other users admins.

Configuring your Minecraft client

Using Drasl on the client requires a third-party launcher that supports custom API servers. PollyMC, a fork of Prism Launcher (and not to be confused with PolyMC) is recommended, but HMCL also works. Both are free/libre.

PollyMC

  1. Click your account in the top right and select "Manage Accounts...".
  2. Click "Add authlib-injector" in the right-hand sidebar.
  3. Enter the username and password of your Drasl account.
  4. Use the base URL of your Drasl instance (the value of the BaseURL configuration option) as the URL for the API server, for example https://drasl.example.com.
  5. Click "OK".

HMCL

  1. Go to the "Account List" view by clicking the account at the top of the sidebar.
  2. At the bottom left, click "New Auth Server" and enter the BaseURL of your Drasl instance, for example https://drasl.example.com. Click "Next" and then "Finish".
  3. In the sidebar, click the newly-added authentication server. Enter the username and password of your Drasl account and click "Login".

Other launchers

Use the authlib-injector URL https://drasl.example.com/authlib-injector, replacing https://drasl.example.com with the BaseURL of your Drasl instance..

Or, if your launcher expects a separate URL for each API server, use these, replacing https://drasl.example.com:

Configuring your Minecraft server

Minecraft 1.16 and later

On recent versions of Minecraft, you can use Drasl on an unmodified Vanilla server. To do so, add the following arguments before you specify the jar file when you start the server. Replace https://drasl.example.com with the BaseURL of your Drasl instance:

-Dminecraft.api.env=custom
-Dminecraft.api.auth.host=https://drasl.example.com/auth
-Dminecraft.api.account.host=https://drasl.example.com/account
-Dminecraft.api.session.host=https://drasl.example.com/session
-Dminecraft.api.services.host=https://drasl.example.com/services

For example, the full command you use to start the server might be:

java -Xmx1024M -Xms1024M \
    -Dminecraft.api.env=custom \
    -Dminecraft.api.auth.host=https://drasl.example.com/auth \
    -Dminecraft.api.account.host=https://drasl.example.com/account \
    -Dminecraft.api.session.host=https://drasl.example.com/session \
    -Dminecraft.api.services.host=https://drasl.example.com/services \
    -jar server.jar nogui

Minecraft 1.15.2 and earlier

Refer to the authlib-injector documentation on setting up a server: https://github.com/yushijinhun/authlib-injector/blob/develop/README.en.md#deploy.

Alternatively, you can patch your server to use a newer version of Mojang's authlib that supports custom API servers. See https://github.com/tinytengu/minecraft-authlib.

Default skins

If a user has not set a skin and a skin is not forwarded from a fallback API server via ForwardSkins, Drasl will try to serve one of the "default skins" in $STATE_DIRECTORY/default-skin/ (/var/lib/drasl/default-skin/ by default). You can create this directory and place your own PNG textures inside to override the default Steve/Alex skins used by the client when a skin is not available.

Make sure the files are valid PNGs with names ending with .png (lowercase). Filenames ending in slim.png, such as Alex-skin-slim.png will be assumed to be for the "slim" player model. All other files will be assumed to be for the "classic" player model.

Drasl chooses which skin to serve based on the player's UUID. A player will be consistently assigned the same default skin, but this assignment will change if skins are added or removed from $STATE_DIRECTORY/default-skin/.

Default capes

Similarly, a cape is arbitrarily chosen from $STATE_DIRECTORY/default-cape/ (/var/lib/drasl/default-cape) when a user has not set a cape.