First Steps with mc

This walkthrough creates a new instance and runs it.

Create an instance

Each instance lives in its own directory, with a mc.toml manifest at its root. mc init creates both:

$ mc init myserver
$ cd myserver

The generated manifest looks like this:

name = "myserver"
description = "A Minecraft Server"

[minecraft]
version = "..."

[server]
gamemode = "survival"
difficulty = "normal"
hardcore = false
# Setting this to true indicates YOU have read and agree to the Minecraft EULA (https://aka.ms/MinecraftEULA).
# This agreement is between you and Mojang/Microsoft.
eula = false

[backups]
enabled = true
frequency = "0 0 * * * *"

[mods]
lithium = "..."

By default mc init uses the optimized preset, which adds a mod loader and a small set of performance mods. Pass --preset vanilla for an unmodded instance. The manifest is yours to edit; every key is documented in The Manifest Format.

Agree to the EULA

The instance will not start until you have agreed to the Minecraft EULA. Once you have read it, set:

[server]
eula = true

You can also pass --eula to mc init to do this at creation time.

Run it

$ mc run

On first run, mc downloads a Java runtime, the Minecraft binary, the mod loader, and any configured mods, then starts the instance. Subsequent runs reuse what is already installed and start immediately.

The console is attached to your terminal. Stop the instance with Ctrl-C: mc asks it to save the world and waits for it to exit cleanly.

Note that the allow list is enabled by default, so players must be on it before they can join. To open the instance to everyone instead, set white-list = false under [server.properties] in the manifest.

Next steps