One command to set up a Minecraft server on any operating system!
McOne is a simple, cross-platform Minecraft server setup utility that automates the entire process of setting up a Minecraft server. With just one command, you can have a fully functional Minecraft server ready to go.
- ๐ One-Command Setup: Get your server running with a single command
- ๐ Cross-Platform: Works on Linux, macOS, and Windows
- ๐ฏ Smart Version Selection: Automatically fetches latest 5 versions from official sources
- โ๏ธ Manual Version Entry: Enter any Minecraft version manually with automatic search
- ๐ Multi-Source Support: Falls back to alternative sources if official API is unavailable
- โ Smart Java Version Detection: Automatically determines and installs the correct Java version for your selected Minecraft version
- โ Java Compatibility Check: Verifies your Java installation meets the requirements before downloading
- โ๏ธ Auto-Configuration: Creates all necessary configuration files
- ๐ฆ Always Up-to-Date: Dynamically fetches the latest versions, no hardcoded lists
- ๐ฎ Ready to Play: Server is ready to start immediately after setup
First, clone the repository using the command below or download the repository.
git clone https://github.com/EliusHHimel/McOneThen open the folder
cd McOne
Open your terminal and run:
bash setup.shChoose one of the following methods:
Method 1: Command Prompt
setup.batMethod 2: PowerShell
.\setup.ps1Note: If you get an execution policy error in PowerShell, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Java - Version depends on the Minecraft server version you choose:
- Minecraft 1.21+ โ Java 21
- Minecraft 1.20.5+ โ Java 21
- Minecraft 1.18-1.20.4 โ Java 17
- Minecraft 1.17 โ Java 17
- Minecraft 1.12-1.16.5 โ Java 11
- Python 3 (optional but recommended) - Enables dynamic version fetching from official sources
- The setup script will automatically detect the required Java version and verify compatibility
- On Linux, you may need
sudoprivileges for automatic Java installation
The setup script will:
- โ Detect your operating system
- โ Fetch the latest 5 Minecraft versions from official Mojang API (requires Python 3)
- โ Display an interactive menu to select a version or enter one manually
- โ Search multiple sources to find your specified version
- โ Automatically determine the required Java version for your selected Minecraft version
- โ Verify that your installed Java version is compatible
- โ Check for Java installation (offers to install the correct version if missing on Linux/macOS)
- โ
Create a
serverdirectory - โ Download your chosen Minecraft server JAR file
- โ Accept the Minecraft EULA
- โ
Create a default
server.propertiesconfiguration - โ Generate launch scripts for your platform
The setup script offers two modes:
- Automatically fetches the latest 5 versions from Mojang's official API
- Displays them in an interactive menu
- Option to enter any version manually (e.g., 1.19.4, 1.18.2, etc.)
- Searches multiple sources including:
- Mojang's official version manifest
- jars.vexyhost.com (fallback)
- Direct URL patterns
- Caches version data for 24 hours to speed up subsequent runs
- Uses a hardcoded list of latest 5 stable versions
- Still fully functional for common versions
- Updates periodically with script updates
After setup completes, navigate to the server directory and run the start script:
cd server
./start.shcd server
start.batThe server is created with these default settings:
- Port: 25565 (default Minecraft port)
- Game Mode: Survival
- Difficulty: Normal
- Max Players: 20
- RAM: 2GB max, 1GB min (can be adjusted in start scripts)
You can modify these settings by editing the server/server.properties file.
The default start scripts allocate 2GB of RAM to the server. To change this, edit the start script:
Linux/macOS (start.sh):
java -Xmx4G -Xms2G -jar server.jar noguiWindows (start.bat):
java -Xmx4G -Xms2G -jar server.jar noguiReplace 4G and 2G with your desired maximum and minimum memory allocation.
- Start Minecraft (Java Edition)
- Go to Multiplayer
- Add Server
- Enter your server address:
- Local:
localhostor127.0.0.1 - LAN: Your local IP address (e.g.,
192.168.1.100) - Public: Your public IP address (port forwarding required)
- Local:
To allow players outside your network to connect:
- Access your router's admin panel
- Forward port
25565(TCP/UDP) to your computer's local IP - Share your public IP address with players
If Java is not installed:
- Windows: Download from Adoptium
- macOS: Install via Homebrew:
brew install openjdk@17 - Linux: Use your package manager (apt, yum, dnf, pacman)
Make the script executable:
chmod +x setup.sh
cd server
chmod +x start.sh- Ensure Java 17+ is installed:
java -version - Check that port 25565 is not already in use
- Verify you have enough RAM available
If the automatic download fails:
- Manually download
server.jarfrom Minecraft.net - Place it in the
serverdirectory - Run the setup script again (it will skip the download)
After setup, your directory will look like this:
McOne/
โโโ setup.sh # Setup script for Linux/macOS
โโโ setup.bat # Setup script for Windows (CMD)
โโโ setup.ps1 # Setup script for Windows (PowerShell)
โโโ README.md # This file
โโโ server/ # Created by setup
โโโ server.jar # Minecraft server
โโโ eula.txt # EULA acceptance
โโโ server.properties # Server configuration
โโโ start.sh # Launch script (Linux/macOS)
โโโ start.bat # Launch script (Windows)
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is provided as-is for educational and personal use.
- By using this script, you agree to the Minecraft End User License Agreement
- This is an unofficial tool and is not affiliated with Mojang or Microsoft
- Always keep your server software up to date for security
If you encounter issues or have questions:
- Check the Troubleshooting section above
- Review the Minecraft Server Wiki
- Open an issue on this repository
Happy Mining! โ๏ธ