Minecraft Server with Podman

A step-by-step guide to hosting your own Minecraft server using Podman.

Prerequisites

Podman: Podman with the podman compose plugin (or podman-compose) installed on your computer or server

Time needed: 5 minutes to set up, plus a few minutes for the server's first boot

Cost: Free if hosting locally

Docker instead of Podman: Works the same way — swap podman compose for docker compose in every command below, using the same compose file

1. Create the Compose File

Make a folder for your server, and inside it create a file called compose.yml:

services:
  mc:
    image: itzg/minecraft-server:latest
    container_name: minecraft-server
    restart: unless-stopped
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      TYPE: "VANILLA"
      VERSION: "LATEST"
      MEMORY: "2G"
      SERVER_NAME: "My Minecraft Server"
      MOTD: "Welcome to my server!"
      DIFFICULTY: "normal"
      MODE: "survival"
      MAX_PLAYERS: "20"
      ONLINE_MODE: "true"
      ALLOW_NETHER: "true"
      ENABLE_COMMAND_BLOCK: "false"
      FORCE_GAMEMODE: "false"
      GENERATE_STRUCTURES: "true"
      HARDCORE: "false"
      MAX_WORLD_SIZE: "29999984"
      PVP: "true"
      SPAWN_ANIMALS: "true"
      SPAWN_MONSTERS: "true"
      SPAWN_NPCS: "true"
      VIEW_DISTANCE: "10"
      SEED: ""
      # Optional: Enable backups
      # ENABLE_AUTOPAUSE: "true"
      # AUTOPAUSE_TIMEOUT_EST: "3600"
    volumes:
      - ./data:/data

Note: EULA: "TRUE" means you accept Mojang's EULA — the server won't start without it.

2. Start the Server

From the same folder, run:

podman compose up -d

On first boot, the container downloads the server files and generates the world — this can take a few minutes depending on your connection and VIEW_DISTANCE. Subsequent starts are much faster.

3. Check It's Ready

Watch the logs with:

podman compose logs -f

The server is ready to accept players once you see a line like Done (12.345s)! For help, type "help". Press Ctrl+C to stop watching logs — this does not stop the server.

4. Connect

Local: Connect to localhost:25565

Remote: Install Tailscale on the host and on any device you want to play from, then connect to your-tailscale-ip:25565 (the host's 100.x.x.x address)

Why Tailscale: The server never touches the public internet — no port forwarding, no exposed firewall rule, and only devices on your Tailscale network can reach it. Safer and more private than forwarding port 25565 on your router.

Managing the Server

Stop server: podman compose down

View logs: podman compose logs -f

Update server: podman compose pull && podman compose up -d

Key Settings Explained

VERSION: Minecraft version, e.g. "26.2" (Minecraft moved to year-based version numbers in 2026), or "LATEST" to always track the newest release

MEMORY: RAM allocation (2G recommended minimum)

TYPE: Server type (VANILLA, PAPER, FABRIC, FORGE)

ONLINE_MODE: true = require official Minecraft accounts

MAX_PLAYERS: Maximum concurrent players

DIFFICULTY: peaceful, easy, normal, hard

MODE: survival, creative, adventure, spectator

VIEW_DISTANCE: How far players can see (affects performance)

Common Modifications

Cracked server: Set ONLINE_MODE: "false"

Peaceful mode: Set DIFFICULTY: "peaceful"

Creative server: Set MODE: "creative"

PvP disabled: Set PVP: "false"

Custom world: Add SEED: "your-seed-here"

Auto-pause: Uncomment the ENABLE_AUTOPAUSE lines to pause the server when nobody's online

Performance Tuning

Low-end (1-4 players): MEMORY: "1G", VIEW_DISTANCE: "6"

Medium (5-10 players): MEMORY: "2G", VIEW_DISTANCE: "8"

High-end (10+ players): MEMORY: "4G", VIEW_DISTANCE: "10"

Troubleshooting

Port already in use: Change the ports mapping to something like "25566:25565", then connect using the new port

Server won't start: Run podman compose logs and check for errors — a common cause is MEMORY set higher than the machine actually has

Can't connect remotely: Confirm Tailscale is running on both the host and your client, and that you're using the host's Tailscale IP (not its local or public IP)

Players can't join: If they're using a cracked client, set ONLINE_MODE: "false"; if they have an official account, make sure it's "true"

Lag issues: Lower VIEW_DISTANCE or raise MEMORY, then restart with podman compose up -d

File Storage

World data: Stored in the ./data folder next to your compose file

Backup: Just copy the data folder

Notes: Data persists even if the container is deleted

Hosting Options

Home computer: Free, but limited uptime

VPS (DigitalOcean, etc.): $5-20/month, always online

Raspberry Pi: Cheap, low power, good for small groups

Credits

This guide uses the itzg/minecraft-server container image. See the full documentation for the complete list of settings and options.