You can run a Minecraft server from your own PC using either the official server software or a third-party host
A Minecraft server lets you and other players connect to the same world instead of playing separately in single-player mode. You have two main paths: run the server software directly on your PC (which ties up your computer while it's running), or rent space on someone else's server hardware (which costs money but keeps your PC free). The official route uses the server.jar file from Minecraft.net, while hosting companies like Aternos, Nitrado, and Apex Hosting manage everything for you.
The choice depends on how many players you want, how long you want the server to stay online, and whether you want to tinker with settings. A local server works fine for a small group of friends playing a few hours a week. A hosted server makes sense if you want the world to exist 24/7 or you expect more than 10 players at once.
Key Takeaways
- Running a server from your PC requires Java Edition of Minecraft, the server.jar file from Minecraft.net, and Java installed on your computer.
- Your PC must stay powered on and connected to the internet the entire time players are connected, or the server shuts down.
- Free hosting sites like Aternos let you run a server without paying, but they pause the world when nobody is online for a while.
- Port forwarding on your router is necessary if you want friends outside your home network to join your local server.
- Server files like server.properties let you change the world type, difficulty, and whether players can break blocks — you do not need to reinstall anything to adjust these.
Running a server directly from your PC
To host a server on your own computer, you need Java Edition of Minecraft (not Bedrock Edition), Java installed on your PC, and the server.jar file. Download server.jar from the official Minecraft launcher website under the "Downloads" tab. Save it to a new folder on your computer — something like C:\MinecraftServer on Windows or ~/MinecraftServer on Mac.
Open a command prompt (Windows) or terminal (Mac/Linux) and navigate to that folder. Type java -Xmx1024M -Xms1024M -jar server.jar nogui and press Enter. The first time you run this, the server creates a file called eula.txt. Open it in a text editor, change eula=false to eula=true, save it, and run the command again. The server is now running and will print messages to the command window as players join.
Your PC must stay on and connected to the internet for the server to stay online. If you shut down your computer or lose internet connection, the server stops and players get disconnected. This is the main drawback of running a local server — you cannot leave it running overnight or while you are away unless your PC stays powered on.
Letting friends connect to your local server
If your friends are on the same home network (same WiFi), they can join by opening Minecraft, clicking "Multiplayer," then "Add Server." They enter your computer's local IP address as the server address — something like 192.168.1.5. Find your PC's local IP by opening command prompt and typing ipconfig (Windows) or ifconfig (Mac/Linux), then looking for the IPv4 address.
If your friends are outside your home network, you need to set up port forwarding on your router. Log into your router's settings (usually 192.168.1.1 in a browser), find the port forwarding section, and forward port 25565 (Minecraft's default port) to your PC's local IP address. Then give your friends your public IP address, which you can find by searching "what is my IP" in a browser. This exposes your network to the internet, so only do this if you trust the people joining.
Port forwarding varies by router model, so search for "[your router brand] port forwarding" if you get stuck. Some routers do not allow port forwarding, in which case a free hosting service is easier than troubleshooting.
Changing server settings without reinstalling
The server.properties file controls how your world works. Stop the server, open server.properties in a text editor, and you can change the difficulty (peaceful, easy, normal, hard), the game mode (survival, creative, adventure), whether players can break blocks (pvp=true or false), and dozens of other settings. Save the file and restart the server — changes take effect immediately without losing your world.
Some useful settings: level-type=flat creates a flat world instead of the default terrain, max-players=20 limits how many people can join at once, and online-mode=false lets players with cracked (non-purchased) Minecraft join, though this is against Minecraft's terms of service. The file includes comments explaining what each setting does.
Using a free hosting service instead
Sites like Aternos, Minehut, and Nitrado host your server on their hardware, so you do not need to keep your PC on. Aternos is free but pauses your world after 30 minutes of nobody being online — when someone joins again, it wakes up and loads the world. Minehut is also free and stays online longer before pausing. Both let you upload a world file if you already have one you want to use.
The trade-off is less control over performance and settings, and you are dependent on the hosting company's uptime. Free tiers usually have limits on how many players can join at once (often 10 or fewer). If you want a server that stays online 24/7 with no pausing, paid hosting starts around $3 to $5 per month.
To set up a free server on Aternos: create an account, click "Create," name your server, choose the version of Minecraft, and click "Create Server." You get a server address to share with friends. Click "Start" when you want the server to turn on. You can still edit server.properties and upload custom worlds through the Aternos dashboard.
Understanding server performance and lag
A server running on your PC will slow down if too many players are online at once or if your world has too many active machines and redstone contraptions. A basic rule: each player uses about 50 to 100 megabits of upload bandwidth per hour, and your PC's processor handles the world calculations. If you have 10 players and a slow internet connection, you will see lag.
You can improve performance by reducing the render distance (how far the server loads chunks around each player), limiting how many entities (mobs, items) can exist at once, or upgrading your internet plan. Hosting services handle this automatically by running servers on powerful hardware, which is why they are worth the cost if you expect heavy use.
Backing up your world
Your world files are stored in a folder called "world" inside your server folder. Back this up regularly by copying the entire folder to another location — an external drive, cloud storage, or a second PC. If something corrupts your world or you accidentally delete something important, you can restore from the backup.
If you are using a hosting service, check whether they back up automatically. Aternos and Nitrado both keep backups, but read their terms to see how long they keep them and whether you can restore on your own.
Frequently Asked Questions
Can I use Minecraft Bedrock Edition to run a server?
Bedrock Edition (the version on Windows 10/11, consoles, and mobile) does not have official server software. You can enable "Multiplayer" in a world to let friends join while you are playing, but you cannot run a dedicated server. You need Java Edition to host a server.
What if my internet is too slow to host a server?
Most home internet connections can handle a small server — even 5 Mbps upload is usually enough for a few players. If you have frequent lag or disconnections, a paid hosting service will perform better because they use dedicated hardware and faster connections than a home PC.
Do I need to pay for a server if I want to play with friends?
No. You can run a free server on your PC or use a free hosting site like Aternos. The only cost is your internet connection. Paid hosting is optional and only worth it if you want the server online 24/7 or expect many players at once.
Can I move my world from a local server to a hosting service?
Yes. Stop your local server, copy the "world" folder, and upload it to your hosting service through their dashboard. Most hosts have an "Upload World" option. The world will work the same way on the hosted server.
What happens if someone griefs my server?
You can restore from a backup or use server commands to undo damage. Most server software lets you set player permissions so only trusted people can break blocks. You can also enable "whitelist" mode in server.properties so only players you add by name can join.