How to run localhost Minecraft Server

How to set up your own Minecraft Java server on your PC or localhost without the need for web servers or other external services. This guide, updated for the year 2023, will provide you with the essential steps to create a custom Minecraft server and play with your friends at home.

Verify your Java Version

Before diving into server creation, it is crucial to make sure you have the correct version of Java installed on your computer. Minecraft Java Edition depends on Java to run, and having the right version is essential to avoid compatibility issues.

check your java version for minecraft server

To check the version of Java installed on your system, you can follow these steps:

Windows:

  1. Open the “Start” menu or press the Windows key on your keyboard to open the Start menu.
  2. In the search bar, type “cmd” and press Enter. This will open the command prompt or command prompt.
  3. In the command prompt window, type the following command and press Enter:

java -version

This will display information about the version of Java installed on your system.

MacOS y Linux:

  1. Open the terminal. You can find it in the “Utilities” folder within the “Applications” folder in macOS. In Linux, you can open the terminal from the applications menu, or with keyboard shortcut Ctrl+Alt+T.
  2. In the terminal, type the following command and press Enter:

java -version

This will show information on the version of Java installed on your system.

The output of the command should show the version of Java you have installed, for instance, “Java(TM) SE Runtime Environment” followed by the version.

Downloading Files from the Server

The next step involves downloading files from the Minecraft server. You can opt for a version with or without plugins, depending on your preferences. Plugins are external modifications that improve the server experience.

Downloading the necessary files to set up a Minecraft server on your own PC (localhost) is a relatively simple process. Follow these steps to get the files:

  1. Get the Minecraft Server Version:
  2. Download the Server File:
    • Click on the server version you wish to download. You’ll be redirected to a download page.
    • On the download page, look for a link or button that says “Download” or “Download”. Click it to start downloading the server file. This file usually has a “.jar” extension.
  3. Select a Folder for your Server:
    • Create a folder on your PC where you’d like to store the server files. You can name this folder whatever you like and place it in a convenient location on your system.
  4. Move the Server File to the Folder:
    • Once the server file download is complete, move it to the folder you created in the previous step. This file is essential to running your local server.
  5. Run the Server:
    • Open the folder containing the server file and run it by double-clicking on it. This will start the Minecraft server on your local PC.localhost minecraft server tutorial
  6. Accept the Terms of Use:
    • The first time you run the server, some additional files will be generated, including the “eula.txt” file. Open this file with a text editor and change the value from “false” to “true” to accept the Minecraft terms of service.

Once the server is running, you can invite your friends to join your local server using your local IP address. To find your local IP address, you can open the command prompt or terminal and run the command ipconfig (on Windows) or ifconfig (on macOS and Linux). Find the IPv4 address and share it with your friends so they can join your server.

localhost ip

By following these steps, you’ll have a Minecraft server running on your local PC (localhost), which will allow you to enjoy games with friends in a controlled and customized environment.

Port Opening (Optional)

To open ports for your localhost Minecraft server on your own computer, you’ll need to do the following:

Find your local IP address:

  1. Open the command prompt or terminal.
  2. Type ipconfig (in Windows) or ifconfig (in macOS or Linux) and look for the IPv4 address, like “192.168.1.1”.

If you want to know more about your internal ip, feel free to visit our friends’ site 192.168.1.1

Access your router’s configuration page:

  • Open a web browser and enter your router’s IP address (usually “192.168.1.1” or “192.168.0.1”).
  • Log in to the page using a username and password (refer to the router’s manual).

Find the “Port Forwarding” or “Port Mapping” section:

  • This section is usually under “Advanced Settings” of the router.
  • Create a new rule with a name, port number (usually 25565 for Minecraft), protocol type (TCP or UDP), and your local IP address.

Save the configuration and restart the router if necessary.

Test the connection:

  • Ask your friends to use your public IP address or a service like No-IP to connect to your server.

Remember that port opening can have security risks, so do it only if necessary and you understand the risks. Your friends will only be able to join if they are on the same network as you or you use external services to allow connections from the Internet.