Skip to main content

Your own editor service

The web editor runs at bloodnight.eldoria.de. BloodNight uses it by default, so most servers never need this page.

Some owners like to run everything themselves. You can do that too.

What you need​

  • A machine with Docker and Docker Compose.
  • An address for it that your Minecraft server and your players can reach, like https://editor.example.com.

localhost does not work here. Your Minecraft server usually runs on another machine, and your players' browsers always do.

Set it up​

  1. Make a folder for the editor and go into it.

  2. Download the two files:

    curl -o compose.yaml https://bloodnight.docs.eldoria.de/self-hosting/compose.yaml
    curl -o .env https://bloodnight.docs.eldoria.de/self-hosting/env.example
  3. Open .env and fill it in:

    EDITOR_ADDRESS=https://editor.example.com
    DB_PASSWORD=a-long-random-password
    PORT=4000
    BLOODNIGHT_VERSION=latest
    SettingWhat it is
    EDITOR_ADDRESSThe address everyone uses to reach the editor. No / at the end.
    DB_PASSWORDA password for the database. Only the editor uses it.
    PORTThe port the editor listens on, on this machine.
    BLOODNIGHT_VERSIONWhich editor version to run. latest is the newest.
  4. Start it:

    docker compose up -d
  5. Make EDITOR_ADDRESS lead to this machine's PORT. Most people use a web server like Caddy or nginx in front of it. They also give you HTTPS.

Connect your Minecraft server​

Set the same address in your Minecraft server's plugins/BloodNight/config.yml:

editor:
url: https://editor.example.com

Then run /bloodnight reload and try /bloodnight editor.

You can also set it from outside, for example when the server runs in a container: the environment variable BLOODNIGHT_EDITOR_URL or the Java option -Dbloodnight.editor.url=... win over the file.

What runs inside​

PartWhat it does
frontendThe editor website. It is the only part you open to the outside. It passes requests for /api on to web.
webThe editor service. It keeps the editor sessions.
postgresThe database for the sessions.

Updating​

docker compose pull
docker compose up -d

Your sessions stay. They live in a Docker volume.