---
# System prepended metadata

title: How to set up a Minecraft server
tags: [minecraft]

---

{%hackmd theme-dark %}
# How to set up a Minecraft server
###### tags: `minecraft`
## How to set up server files
> main steps in getting the local file ready for your server
1. Download server.jar and place it in a new folder
    > [download link](https://www.minecraft.net/en-us/download/server)
2. Run server.jar and update java runtime if prompted
    > this should create some additional files and subfolders in the folder
3. Edit eula from false to true
    > in eula.txt
    `eula=false` -> `eula=true`
4. Create start.bat
```bat=
@ECHO OFF
java -Xmx3072M -Xms1024M -jar server.jar nogui
pause
```
5. Run server with start.bat
## How to set up port forwarding in Microsoft firewall

## How to set up port forwarding at  gateway router
1. Log in to your gateway router
    1. Find out the private ip address of your gateway router by opening cmd and entering
    `ipconfig`
    > `Default Gateway . . . . . . . . . : 192.168.x.x` :arrow_left: this is your gateway router's private ip address
    > Also record your private ip address `IPv4 Address. . . . . . . . . . . : 192.168.x.x`:arrow_left: this is your private ip address
    2. Connect to your gateway router my typing its ip address into your web browser
    3. log in
2. Set up port forwarding on your gateway router
    1. Find NAT
    2. Find Port Forward option
    3. Port forward port 25565 from your gateway router to your computer's port 25565 (your private ip)
    4. Save changes and exit
## How to set up a domain name
> At this stage, your server is already reachable from external computers with your gateway's public ip. A domain name is for a added layer of privacy and better readibility.

## server.properties file
 