Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Make a Minecraft 1.21 Server (Java Edition)

A complete Minecraft 1.21 Java Edition server walkthrough: install Java 21, launch the official JAR, accept the EULA, configure server.properties, connect locally, and safely let friends join over the internet.
Length10 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: Install Java 21, download the official Minecraft 1.21.x server JAR, place it in its own folder, run it once, accept the EULA in eula.txt, configure server.properties, and run it again. You can join on the host computer with localhost. Friends outside your home network need the server port allowed through the host firewall, forwarded by the router, and your public IP address.

This guide covers the Java Edition server software for the 1.20.5–1.21.x compatibility range. Minecraft’s official download page says the server software is free; Java itself must already be installed.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before starting

Prepare these items before downloading anything:

  • A computer that will remain powered on while people play.
  • Minecraft Java Edition clients using the same 1.21.x release you intend to host.
  • Java 21, which is the compatibility target cited for the 1.20.5 through 1.21.x server line.
  • Permission to install software and change firewall settings on the host computer.
  • Router access if players will connect from outside your home network.
  • A dedicated folder for the server files, separate from your normal Minecraft installation.

The official server download is free, but it does not provide a ready-made online service. You are responsible for running the Java process, accepting the EULA, choosing settings, and handling network access. If you do not want to maintain Java, firewall rules, or router forwarding, the alternatives section explains when a managed option is a better fit.

Install and verify Java 21

The server is a Java application. Install a Java runtime that supports the 1.20.5–1.21.x line, then verify the version from a terminal or command prompt before downloading the server JAR.

#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
  1. Install Java 21 using a trusted Java distribution for your operating system.
  2. Open Command Prompt, PowerShell, Terminal, or another shell.
  3. Run:
java -version

The output should identify Java 21. If the command is not found, close and reopen the terminal after installation, check that Java was added to your system path, or reinstall the runtime with that option enabled. Do not continue until the shell can run java -version; otherwise the server command will fail before it can create any files.

Download the official 1.21.x server JAR

Use Minecraft’s official Java server download page and select the exact 1.21.x release that your group will play. The 1.21.1 release documentation, for example, identifies a server JAR for that release. Keep the downloaded filename unchanged until you have copied it into your launch command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not confuse the server JAR with the Minecraft launcher or a client mod. The JAR is the file the Java runtime executes. If you download a different 1.21.x build later, its filename will be different and the command must be updated accordingly.

Create a dedicated server folder

Create a folder with a simple name such as Minecraft Server or minecraft-server. Put the downloaded JAR in that folder. Running from a dedicated directory keeps generated worlds, logs, configuration files, and operator data together and makes backups much easier.

Open a terminal in the folder. On systems without an “open terminal here” option, use cd followed by the folder path. Confirm that the JAR is present before launching; the filename in your command must match it character for character.

Run the server once to generate its files

From the server folder, run a command like this, replacing the example filename with the exact name you downloaded:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
java -Xmx2G -Xms1G -jar minecraft_server.1.21.x.jar nogui

-Xmx2G sets a maximum heap allocation of 2 GB and -Xms1G starts the process with 1 GB. They are example launch values, not a guarantee that every world or player count will run well with that amount of memory. The nogui switch keeps administration in the terminal instead of opening the optional graphical interface.

The first run creates the server’s initial files and then stops because the EULA has not been accepted. That stop is expected. Look in the same folder for eula.txt and server.properties.

Accept the EULA

  1. Open eula.txt in a plain-text editor.
  2. Change eula=false to eula=true.
  3. Save the file without changing its name or extension.

The server will not complete normal startup while the value remains false. Accepting the EULA is a required step, not a troubleshooting workaround; if you do not agree to it, leave the value unchanged and do not run the server.

Configure server.properties

Open server.properties with a plain-text editor. Each setting is written as name=value. Change only the options you understand, and keep server-ip blank unless you have a specific reason to bind the process to one network interface.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Setting What it controls Practical starting choice
gamemode The default mode for players entering the world. Choose the mode your group wants to use.
difficulty The world’s difficulty level. Set the level appropriate for your players.
pvp Whether player-versus-player damage is enabled. Enable it only if your group wants combat between players.
max-players The maximum number of simultaneous players allowed by the server configuration. Set it to the size of your intended group.
level-seed The seed used when generating the world. Leave it empty for a generated seed or enter a chosen seed before creating the world.
motd The message displayed with the server in a multiplayer list. Use a short name that tells friends which world they are joining.
allow-nether Whether Nether access is enabled. Leave enabled unless you deliberately want a restricted world.
spawn-protection The protected area around the world spawn where ordinary players cannot normally build. Keep protection enabled for a public or mixed group; reduce it only when you understand the consequence.
server-port The network port on which the Java server listens. Keep the default 25565 unless another service requires a different port.
server-ip The local interface address to which the server binds. Leave blank for the usual home-server setup.

Save the file before the second launch. If you edit a property while the server is running, the running process may continue using its old value; stop the server cleanly, make the change, and start it again.

Launch the configured server

Run the same command again from the server folder:

java -Xmx2G -Xms1G -jar minecraft_server.1.21.x.jar nogui

This time, with the EULA accepted, the server should continue startup and load the world. Keep the terminal window open while people are playing. It is the server console: startup messages, warnings, joins, chat, and command results appear there.

Rank #3
Minecraft | Standard Edition | XBOX Digital Code
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
  • SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
  • COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.

Use the console for administration rather than closing the window. Closing the terminal abruptly can interrupt saving. When you are finished, use the server’s normal stop command in the console and wait for the process to finish before shutting down the computer or copying world files.

Join from the same computer

  1. Start the server and wait until startup has completed.
  2. Open Minecraft Java Edition on the host computer.
  3. Choose Multiplayer, then add or direct-connect to a server.
  4. Enter localhost as the server address.

localhost means “this computer,” so it does not require a public IP address or router configuration. Test this local connection before attempting remote play. If it fails locally, solve the Java, EULA, filename, or startup problem first; port forwarding cannot fix a server that is not running correctly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Let friends join over the internet

Remote access has three separate parts: the Java process must be listening, the host firewall must allow it, and the router must forward the listening port to the host computer.

1. Allow the server through the host firewall

When the operating system asks whether to allow Java or the server application through the firewall, allow the network access required for your intended network. If you dismissed the prompt, add an allow rule for Java or the server process in the operating system’s firewall settings. A running server that is blocked at the host will be reachable from localhost but not from another machine.

2. Forward the server port on the router

Sign in to your router’s administration page and create a port-forwarding rule that sends the port in server.properties to the host computer’s local network address. The default Java port is 25565. If you leave server-port=25565, forward that port; if you change it, forward the new value instead.

Give the host computer a consistent local address, such as a DHCP reservation, if your router offers one. Otherwise, the computer can receive a different local address later and the forwarding rule will point to the wrong device.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Minecraft
  • Skins! We have biome settlers, city folk, town folk, and more!
  • The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
  • Cross platform play for up to five players between Pocket Edition and Windows 10
  • Revamped touch controls, controller support, and a controller mapping screen
  • Enhanced Weather effects! Accumulating snow and more

3. Give friends the correct address

Friends outside your home network connect using your public IP address. With the default port unchanged, they enter the public IP followed by :25565. If you use another port, they must append that port number instead. The host computer continues to use localhost; remote players do not.

Test from a genuinely external connection, such as a friend’s network or a phone hotspot. Testing from inside the same home network can fail because some routers do not support loopback connections, even when the forwarding rule is correct.

Protect your home network

A home server exposes a listening service through your router. Minecraft’s official help guidance strongly warns against publishing your public IP broadly because doing so creates a security risk to your home network.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Share the address privately with trusted players rather than posting it publicly.
  • Forward only the port you need, and do not expose unrelated router administration services.
  • Keep Java, the operating system, and Minecraft server files maintained with trusted releases.
  • Give operator privileges only to people who need them.
  • Stop the server when it is not in use.
  • Keep copies of important world files somewhere separate from the live server folder, and make copies only after the server has stopped cleanly.

If you cannot control the router, do not want your home IP exposed, or cannot leave a computer online, self-hosting may be the wrong deployment method. A managed server or Minecraft Realms removes much of that home-network work, although it also reduces the direct control you have over files and networking.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Self-hosting versus Minecraft Realms

The right choice depends on whether you value control or convenience. Self-hosting gives you the server files and settings directly, but you perform every setup and maintenance task. Minecraft’s official guide describes Realms as a personal-server option with automatic backups for up to 10 players.

Consideration Self-hosted Java server Minecraft Realms
Initial setup Install Java, download the JAR, accept the EULA, configure properties, and handle firewall and router access. Designed as a hosted personal-server option rather than a home Java process.
Ongoing maintenance You keep the computer, Java runtime, server files, firewall rule, and forwarding rule working. The service handles the underlying server operation.
Backups You must create and protect your own world copies. Automatic backups are described by the official guide.
Control Direct access to the JAR, world files, console, and server.properties. Convenience comes with less direct control over the underlying server files.
Home-network exposure Remote play normally requires a firewall allowance, router forwarding, and sharing the public IP with players. Does not require you to expose a home server through your router.
Player capacity Set the limit with max-players; practical capacity depends on your computer and configuration. The official guide describes a group size of up to 10 players.

Third-party managed hosting follows the same basic trade-off: less home-network administration in exchange for relying on a provider’s control panel, policies, and service availability. Compare setup effort, maintenance, backups, file access, network exposure, player capacity, mod or plugin support, and recurring cost before moving a world.

Best Value
Minecraft - Bedrock Edition PS4
  • Play and share with friends on console, mobile and Windows 10
  • discover community creations in the new in-game store
  • access new mini games and game modes through servers

Troubleshoot the problems that stop most 1.21 servers

The terminal says Java is not recognized

Java is missing from the system path or the installation did not complete. Reinstall or repair Java 21, open a new terminal, and run java -version again. The server JAR cannot run until that command succeeds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The first launch stops immediately

This is normal when the EULA is still false. Open eula.txt, change the value to eula=true, save it, and launch again from the same folder.

The command says it cannot access the JAR

You are probably in the wrong directory or using a filename that does not exactly match the download. List the files in the server folder, copy the JAR’s exact name into the -jar argument, and rerun the command.

The server works on localhost but friends cannot connect

That result isolates the problem to networking rather than Java startup. Check the operating-system firewall, confirm that the router forwards the same port shown in server.properties, verify that the forwarding target is the host computer’s current local address, and make sure friends are using your public IP rather than localhost or a private address.

Friends used the wrong port

The default is 25565, but a changed server-port value changes both the router rule and the address players enter. Update both places, restart the server, and give players the public IP with the new port suffix.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The server binds to the wrong address

Remove an unnecessary value from server-ip and leave it blank. Binding to a stale or incorrect local address can prevent the process from accepting connections on the interface your players need.

The world or settings did not change

Stop the running process before editing server.properties. Save the file in the server folder, check that the property name and value are spelled correctly, and launch again. Settings in a different Minecraft directory do not affect this server.

Players cannot join after an update

Confirm that the downloaded server JAR and each player’s client are using the intended 1.21.x release. Keep a backup of the world before replacing the JAR, and do not delete configuration or world files while troubleshooting.

Quick Recap

Bestseller No. 4
Minecraft
Minecraft
Skins! We have biome settlers, city folk, town folk, and more!; The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
$6.99
Bestseller No. 5
Minecraft - Bedrock Edition PS4
Minecraft - Bedrock Edition PS4
Play and share with friends on console, mobile and Windows 10; discover community creations in the new in-game store
$42.98

A repeatable startup checklist

  1. Verify Java with java -version and confirm it is Java 21.
  2. Open the dedicated server folder and confirm the intended 1.21.x JAR is present.
  3. Check that eula.txt contains eula=true.
  4. Review server.properties, especially server-port and the blank server-ip.
  5. Start the server with the exact JAR filename and wait for normal startup.
  6. Join locally with localhost before asking friends to test.
  7. For remote play, verify the firewall rule, router forwarding target, public IP, and port.
  8. When finished, stop the server cleanly and protect a current world backup.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.