A server in Docker
At the end of this tutorial you have a Bedrock Dedicated Server with LeviLamina running in a Docker container, its world kept in a Docker volume, and you know how to reach its console, add mods and stop it cleanly. The container installs everything itself on its first start: you need neither lip nor Wine on the host.
There are two images, both from LiteLDev/docker-levilamina-server:
| Image | Runs on | How |
|---|---|---|
ghcr.io/liteldev/levilamina-server:latest-wine |
Linux containers: a Linux x64 host, or Docker Desktop | The Windows server under Wine |
ghcr.io/liteldev/levilamina-server:latest-windows |
Windows containers: Windows Server, or Docker Desktop switched to Windows containers | The Windows server directly |
This tutorial uses the Wine image. For the Windows image, see the tip at the end of step 2.
What you need
- Docker: Docker Engine on Linux, or Docker Desktop on Windows and macOS.
docker versionmust answer with a client and a server version. - A host with an x64 processor.
- An internet connection. The container downloads the game from minecraft.net and LeviLamina from GitHub.
1. Start the container
-
Run:
shelldocker run -d -it --name levilamina -e EULA=TRUE -p 19132:19132/udp -p 19132:19132/tcp -v levilamina-server-data:/data ghcr.io/liteldev/levilamina-server:latest-wineWhat the parts do:
-d -it: run in the background, with a console you can attach to later.--name levilamina: the name the next commands use.-e EULA=TRUE: you accept the Minecraft End User License Agreement. Without it the container stops at once.-p 19132:19132/udp -p 19132:19132/tcp: the port of the server, on both protocols.-v levilamina-server-data:/data: the server, its world and its settings live in the volumelevilamina-server-data, so they survive when the container is removed.
-
Follow what the container does:
shelldocker logs -f levilaminaOn the first start it prepares Wine, installs LeviLamina and the game with
lip, and starts the server. This takes several minutes. You should finally seeServer started.PressCtrl+Cto stop following the log; the server keeps running.
Slow downloads from GitHub
Add -e GITHUB_MIRROR_URL=<address of a GitHub mirror> to the docker run command, for example -e GITHUB_MIRROR_URL=https://v4.gh-proxy.org/https://github.com/.
2. Use the console
-
Attach to the server:
shelldocker attach levilamina -
Type a server command, without a leading
/, and pressEnter:textlistYou should see
There are 0/10 players online:. -
Detach without stopping the server: press
Ctrl+P, thenCtrl+Q.
The Windows image
On a Windows container host, use ghcr.io/liteldev/levilamina-server:latest-windows and mount the volume at C:\data: -v levilamina-server-data:C:\data. Everything else in this tutorial is the same.
3. Add mods
The container installs the packages of the PACKAGES variable, separated by spaces, when it sets up the server, on its first start. Any mod of the LeviMC Mods catalog works; use the name after lip install on its page.
To start a new server with mods, add the variable to the docker run command of step 1:
-e PACKAGES="github.com/LiteLDev/LeviOptimize github.com/LiteLDev/LegacyScriptEngine#lua"Add a mod to a server that is already set up
PACKAGES is read only on the first start. Later, run lip inside the running container:
docker exec -it levilamina lip install github.com/LiteLDev/LeviOptimizeThe server loads the mod the next time it starts: stop it and start it again as in step 4. docker logs levilamina should then show [LeviLamina] loading the mod.
4. Stop and start the server
-
Attach (
docker attach levilamina) and typestop. The server saves the world and exits, and the container stops with it. You should seeQuit correctlyin the output. -
Start it again later:
shelldocker start levilaminaA second start is quick: the server is already set up in the volume.
docker stop works too, but it gives the server only 10 seconds before it is killed. Typing stop is the safe way.
With Docker Compose
Instead of docker run, download wine/compose.yaml (or windows/compose.yaml) into an empty folder and run docker compose up -d there. It sets the same EULA, ports and volume. Add variables such as PACKAGES under environment:. docker compose logs -f follows the log, and docker compose attach levilamina-server opens the console.
Settings of the container
| Variable | Default | Meaning |
|---|---|---|
EULA |
Must be TRUE. |
|
VERSION |
LATEST |
The LeviLamina version to install, such as 26.60.7. The game version follows from it. |
PACKAGES |
Packages to install on the first start, separated by spaces. | |
GITHUB_MIRROR_URL |
A GitHub mirror for the downloads. | |
TZ |
UTC |
The time zone, for the timestamps of the log. |
LANG, LC_ALL |
en_US.UTF-8 |
The locale in the container. |
WINEDEBUG |
-all |
The debug output of Wine (Wine image only). |
What you have now
- A container
levilaminathat runs a LeviLamina server on port 19132. - A volume
levilamina-server-datawith the server, its world and its settings, which survives the container.
Next steps
- Choose mods: Install mods on your server explains package names and variants.
- Let other players connect from outside your network: Let friends join your server.
- A server without Docker: Your first server or A server from the command line.
- Package names, versions and refs that
PACKAGESaccepts: Managing packages. - The images, their Dockerfiles and their changelog: LiteLDev/docker-levilamina-server.
- Something went wrong: LeviLamina troubleshooting.