How to host a Minecraft server yourself for free
By Pull This RepoPosted 5 min read
Short answer
To run a self hosted Minecraft server for free, install Java 25, download minecraft_server.26.3.jar from minecraft.net, run java -Xmx4G -Xms4G -jar minecraft_server.26.3.jar nogui, set eula=true in eula.txt and start it again. Or run docker run -d -it -p 25565:25565 -e EULA=TRUE itzg/minecraft-server. Friends join on port 25565 through port forwarding, Tailscale or playit.gg.
A self hosted Minecraft server is the free server software running on a computer you own, instead of a paid host. Mojang gives the Java Edition server away on minecraft.net, the open source Paper server adds plugins and speed, and the itzg/minecraft-server Docker image wraps either one in a single command. This guide covers all three, then the part that trips most people up: letting friends outside your house join. Commands, versions and prices were checked on each official page and GitHub repo on 22 November 2026.
Which self-hosted Minecraft server option should you pick?
| Option | Licence | Best for | What you run |
|---|---|---|---|
| Mojang server.jar | Free download, Minecraft EULA | A plain vanilla world on any PC | java -jar in a terminal |
| Paper | GPL-3.0 | Plugins and better performance | java -jar with Paper's jar |
| itzg/minecraft-server | Apache-2.0 | An always-on server, easy upgrades, Paper or modded types | One Docker container |
| Bedrock Dedicated Server | Free download, Minecraft terms | Bedrock players on consoles, phones and Windows | A ZIP with an executable |
On 22 November 2026, Mojang's version list showed Minecraft 26.3 as the latest release. Its version file lists Java 25 as the runtime and a server jar of about 62 MB.
How do you run the official Minecraft server.jar?
- Install Java 25. Mojang's page says to "make sure you can use java from the command line", adding that on Windows you might have to set the PATH variable. Our guide on how to install Java covers Windows, macOS and Linux.
- Make a folder for the server, for example
minecraft-server, and downloadminecraft_server.26.3.jarinto it from minecraft.net/download/server. - Run it from a terminal in that folder with the command Mojang's page gives:
java -Xmx4G -Xms4G -jar minecraft_server.26.3.jar nogui- Accept the EULA. The first run creates
eula.txtand stops. Open it, changeeula=falsetoeula=trueand save. Mojang's page notes that downloading the software means you agree to the Minecraft End User License Agreement. - Run the command again. The server builds a world and listens on port 25565. On the same computer, join with the address
localhost.
Leave out nogui if you want the small server window instead of a plain console. Settings such as game mode, difficulty and the whitelist live in server.properties, created on first run.
How do you set up a Paper server?
Paper is "a Minecraft game server based on Spigot", in its own words, that "extends and improves the Bukkit and Spigot APIs" and adds performance work such as asynchronous chunk loading. Its repo had 12,828 GitHub stars on 22 November 2026, and its licence file says Paper is GPL-3.0, inherited from Spigot and Bukkit. Paper's build API listed 26.3 builds on the same date.
Setup matches the vanilla server: download the Paper jar for your version from papermc.io, run it with java -jar, accept the EULA, run again. Plugins are .jar files that go in the plugins folder. Paper's site says its Hangar repository holds over 4,000 plugins built for Paper.
How do you run a Minecraft server in Docker?
The itzg/minecraft-server image is the easiest way to keep a server running for months. On 22 November 2026 its repo had 14,565 GitHub stars, an Apache-2.0 licence and release 2026.11.0 from 9 November 2026. Its docs say it downloads the latest stable vanilla server at startup.
The one-line start from the docs:
docker run -d -it -p 25565:25565 -e EULA=TRUE itzg/minecraft-serverThe docs say the server stores its data in the container's /data directory, so mount a host folder there or you lose the world with the container. The project recommends Docker Compose for long-running servers. Make a folder, save this as compose.yaml (from the docs), and run docker compose up -d:
services:
mc:
image: itzg/minecraft-server:latest
pull_policy: daily
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
volumes:
- ./data:/dataTwo variables do most of the work. TYPE: PAPER runs Paper instead of vanilla, and the image picks the newest Paper build for your VERSION. MEMORY sets the Java heap, which the docs say is 1 GB by default, so add MEMORY: "4G" for a real group. Follow logs with docker compose logs -f and stop with docker compose stop. The image can also install modded server types and modpacks; see its documentation. New to Docker on Linux? Start with installing Docker on Ubuntu.
How do friends join your Minecraft server?
On your home network they type your computer's local IP. From outside, pick one route:
- Port forwarding. In your router, forward TCP port 25565 to the server's local IP. Friends join with your public IP. It costs nothing, but it exposes that port to the internet, and some internet providers block it or put you behind shared addresses.
- Tailscale. Install it on the server and on each friend's computer. Tailscale's free Personal plan lists "Up to 6 users" and "Unlimited user devices". Friends join with your server's Tailscale IP and nothing is open to the public.
- playit.gg. Its site says it lets you "Host game servers from your own computer and let friends join from anywhere" without router changes, and it lists Minecraft Java on its free tier, with premium plans "from $3/month". Its agent is open source under BSD-2-Clause, release v2.0.2 on 10 November 2026.
Whitelist your friends in server.properties or with /whitelist add before you share any public address.
What about a Bedrock Dedicated Server?
Bedrock players need Mojang's separate Bedrock Dedicated Server. Its page lists Windows 10 version 10.0.15063 or later, Windows Server 2016 or later, or Ubuntu 22.04 or later, says other Linux distributions are not supported, and suggests 4 GB of RAM. Setup is: download the ZIP, extract it into an empty folder, run the included executable, then edit the config files. For Docker, itzg/minecraft-bedrock-server is MIT licensed with 1,890 GitHub stars, and its README lists the ports to publish.
How do you update a self-hosted Minecraft server?
Stop the server, copy the world folder somewhere safe, then swap the software:
- Vanilla or Paper: download the new jar, replace the old one and update the file name in your start command.
- Docker: the compose file above already sets
pull_policy: daily. To update now, run these two commands in the folder that holdscompose.yaml:
docker compose pull
docker compose up -dIf you pinned a VERSION, change it first. Worlds generally open in newer versions but not in older ones, so keep that backup until you are sure the upgrade went well.
Can you run mods on your own server?
Yes, if the server and every player use the same loader and mods. Install the Fabric, NeoForge or Forge server for your version, put the server-side mods in its mods folder, and give friends the same list. Our guide to installing Minecraft mods covers loaders and versions.
What is the catch?
You are the host. The server is only online while your computer is on and awake, and your upload speed limits how many friends play smoothly. Updates are on you: a new Minecraft version means a new server jar, Paper build or image pull, and plugins or mods may lag behind. Back up the world folder, or the data folder in Docker, before every upgrade. And if you forward a port, keep the whitelist on.
Pull it. Stash it.
Questions people ask
Is it free to host a Minecraft server yourself?
Yes. Mojang's server software is a free download from minecraft.net, Paper is open source under GPL-3.0 and the itzg/minecraft-server Docker image is Apache-2.0. You pay only for the computer and electricity. Every player still needs their own copy of Minecraft: Java Edition to join.
How much RAM does a Minecraft server need?
Mojang's own start command on minecraft.net gives the server 4 GB with -Xmx4G -Xms4G. The itzg Docker image defaults to a 1 GB Java heap and you raise it with the MEMORY variable, for example -e MEMORY=4G. More players, mods and a larger view distance need more.
What port does a Minecraft Java server use?
25565 by default. The itzg image's own example publishes -p 25565:25565, and its compose guide says to point your client at the host's name or IP and port 25565. That is the port to forward on your router if you want people outside your home to join directly.
Can Bedrock players join a Java server?
Not with the plain Java server. Mojang's page says its Java server setup is only compatible with Minecraft: Java Edition. Bedrock players need the separate Bedrock Dedicated Server. The itzg docs also describe a way to add Bedrock compatibility to a Java server.
Do I need a static IP to host a Minecraft server?
Not if you use a tunnel. With Tailscale, friends on your tailnet connect to your machine's Tailscale address. With playit.gg, players join through its address and you need no router changes. Port forwarding works with a normal home IP, but the address can change, so friends may need a new one now and then.
Sources
- 1Minecraft: Download the Java Edition server (read 2026-11-22)
- 2Minecraft: Bedrock Dedicated Server (read 2026-11-22)
- 3PaperMC: Paper (read 2026-11-22)
- 4docker-minecraft-server documentation (read 2026-11-22)
- 5Tailscale pricing (read 2026-11-22)
- 6playit.gg (read 2026-11-22)
- 7itzg/docker-minecraft-server
- 8itzg/docker-minecraft-bedrock-server
- 9PaperMC/Paper
- 10playit-cloud/playit-agent
More repos like this
Get tomorrow's repo in your feed
One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.
