This is a Windows port, re-written from the ground up, of a previous project of mine that installs a Minecraft server using Bash. Because not everyone uses Linux, I have created a Windows version. Original repo: https://github.com/NorthernChicken/MineInstall
Note that using Linux is recommended for Minecraft servers, and this script may lack features or updates that the original has.
- Requires git: https://git-scm.com/download/win
- Requires Java 21 or higher: https://www.oracle.com/java/technologies/downloads/#java21
- Requires PowerShell (pre-installed with Windows)
- Windows Terminal is recommended, but not required: https://www.microsoft.com/store/productId/9N0DX20HK701?ocid=pdpshare
- Open powershell as administrator (start menu -> type "powershell" and run as administrator)
- Download this repository with git:
git clone https://github.com/NorthernChicken/MineInstall-win - Change to the directory:
cd MineInstall-win - Run the batchfile:
.\run.bat - Once the script is finished, navigate to the server directory:
cd ~\server - You can start the server by running
.\start.ps1. Enter how much memory you would like to allocate to the server in Megabytes.
Navigate to your server directory: cd ~\server
Run the uninstall script: .\uninstall.ps1 WARNING: THIS WILL DELETE YOUR SERVER, ITS WORLD, AND ALL PLAYER DATA. RUN AT YOUR OWN RISK.
If you ever get an error related to "execution policy," you may need to change this setting:
- Open PowerShell (start menu -> search "PowerShell" and run as administrator)
- Run:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser*Note that this will allow for the execution of any script on your computer. If you want to turn this off later, run:Set-ExecutionPolicy Restricted -Scope CurrentUser.
This script automatically installs the latest version of Minecraft. If you want to use a different version or use a modded server (paper, spigot, etc.) you have to change the "$server_link" variable to the URL of the server.jar download.