How to Set Up a Minecraft Server at Home: Complete Beginner’s Guide
Running your own Minecraft server at home gives you full control — no monthly hosting fees, no third-party rules, and better performance than you’d expect from a cheap VPS. This guide walks through the entire process using Docker, the same reliable method used for hosting dedicated servers for games like Factorio, Valheim, and ARK.
You don’t need to be a sysadmin to follow this. If you can install software and edit a text file, you can do this.
What You’ll Need
- A dedicated machine (a mini PC, an old desktop, or even a Raspberry Pi 4/5 for small groups)
- At least 4GB RAM (8GB+ recommended if you’re using mods or hosting 5+ players)
- A stable internet connection with the ability to port forward
- Docker installed on your machine (Windows, Linux, or macOS all work)
A budget mini PC (Intel N95 or similar, 16GB RAM) is more than capable of running a smooth vanilla or lightly-modded Minecraft server for a handful of friends.
Step 1: Install Docker
If you don’t already have Docker installed:
- Windows/Mac: Download and install Docker Desktop
- Linux: Install Docker Engine via your package manager (e.g.
apt install docker.ioon Ubuntu)
Verify it’s working by running:
docker --version
Step 2: Pull the Minecraft Server Image
The community-maintained itzg/minecraft-server image is the standard choice — it’s actively maintained, supports every major Minecraft version, and handles most of the tedious config for you.
Run this command to start a basic vanilla server:
docker run -d -it \
-p 25565:25565 \
-e EULA=TRUE \
-v /path/to/data:/data \
--name mc-server \
itzg/minecraft-server
What this does:
-p 25565:25565— opens the default Minecraft port-e EULA=TRUE— accepts Mojang’s EULA (required to run the server)-v /path/to/data:/data— stores your world data outside the container, so it survives restarts/updates--name mc-server— names the container so it’s easy to manage later
Replace /path/to/data with a real folder on your machine, e.g. /home/user/minecraft-data or C:\minecraft-data.
Step 3: Confirm It’s Running
Check the logs to make sure the server started correctly:
docker logs -f mc-server
You should see it generate the world and eventually print Done with a startup time. Once you see that, the server is live on your local network.
Step 4: Port Forward for Outside Access
If you only want to play with people on your home network, you can skip this step. To let friends connect from outside:
- Log into your router’s admin panel (usually
192.168.1.1or similar) - Find the Port Forwarding section
- Forward TCP port 25565 to your server machine’s local IP address
- Give your server machine a static local IP (either through your router’s DHCP settings or a manual OS network config) so the forwarding rule doesn’t break when it reconnects
Your friends can then connect using your public IP address, which you can find by searching “what’s my IP” from the server machine.
Step 5: Customize Your Server (Optional)
The Docker image supports environment variables for common settings. A few useful ones:
MEMORY=4G— allocate RAM (adjust based on your machine)DIFFICULTY=normal— set game difficultyMAX_PLAYERS=10— cap player countMODE=survival— game mode (survival, creative, adventure)
Add these as additional -e flags in your docker run command.
Common First-Time Issues
- Server not showing up for friends: Almost always a port forwarding or firewall issue — double check the router config and any OS-level firewall blocking port 25565.
- Server crashing on low-RAM machines: Lower your
MEMORYsetting or reduceview-distancein the server properties. - World not saving between restarts: Make sure your
-vvolume path is correct and mapped consistently.
Why Docker Instead of Running Minecraft Directly?
Running the server in Docker keeps things clean and portable. If you ever move to new hardware, upgrade your OS, or want to run multiple game servers side-by-side (Minecraft, Valheim, ARK, etc.) without them interfering with each other, Docker handles the isolation for you. It’s the same approach that works well across most self-hosted game servers, not just Minecraft.
Next Steps
Once your server is stable, consider:
- Setting up automated world backups (a simple cron job copying your data folder works fine)
- Adding a watchdog to auto-restart the container if it crashes
- Exploring modded servers with Forge or Fabric support (the same Docker image supports both)
Running a home game server is a one-time setup with a big payoff — no subscription fees, full control over your world, and it’s a genuinely useful way to repurpose an old PC or a cheap mini PC.