Notes for me to make a very quick Minecraft server on a VPS
Install Java JRE (for example, for jre 17):
sudo apt install openjdk-17-jre
Get the PaperMC jar from https://papermc.io/downloads, and rename it to just paper.jar
wget https://api.papermc.io/v2/projects/paper/versions/1.19.3/builds/413/downloads/paper-1.19.3-413.jar # GET THE LATEST FROM PAPERMC!
mv paper-1.19.3-413.jar paper.jar
Make a new folder in the home directory and create a start.sh
file, make sure its executable (chmod +x start.sh
)
#/bin/bash
java -Xmx2048M -Xms1024M -jar paper.mc
Run the start.sh
script, edit the eula.txt to accept it.
Edit the server properties and change stuff like world seed, difficulty, motd, offline mode, port etc.
Plugin sites sometimes doesn't give direct file download to wget. So we need to use sftp. Download all the files and use sftp user@host
to connect to the server and cd
to move to the server plugins directory and put
to upload the jar files. More info about plugins later
Run ./start.sh to start the server. It will generate the world first.
To configure the plugins (and also for the next steps) stop the server first. Then configure the plugins. More on the plugin configuration later.
To use datapacks, put the datapacks file in the datapacks folder in the world folder.
Now here is where the janky part comes. We're gonna use tmux (sudo apt install tmux
) to keep the server running at all times. First create a startup.sh in the home directory and make sure its executable:
#/bin/bash
tmux new -d -s ServerTitle "cd /home/ubuntu/mcserver; /home/ubuntu/mcserver/start.sh"
then create a cronjob to run to run it at all times, run cronjob -e
and add:
@reboot /home/ubuntu/startup.sh
Run the startup.sh
script and attach the tmux terminal using tmux a
. If there are other tmux windows open use ctrl+b w
to list all windows and select the window with the ServerTitle.
This one is easy, just get the server ip (try curl icanhazip.com -4
) and put it into Minecraft (include the port if its not the default which is 25565).
Some notes on what plugins to use
PL-Plugin DP-Datapack MOD-Changes the gameplay
- Coreprotect (PL)
- Dynmap (PL)
- SpigotPing (PL)
- VanillaTweaks (DP):
- Track Raw Statistics
- Track Statistics
- Count Mob Deaths
- VanillaTweaks (DP):
- Coordinates HUD
- Name Colors
- Silence Mobs
- Villager Death Messages
- Dynmap-essentials (PL)
- EssentialsX (PL)
- EssentialsXChat (PL)
- EssentialsXSpawn (PL)
- Vault (PL)
- Luckperms (PL)
- VanillaTweaks (DP, MOD):
- Graves
- Fast Leaf Decay
- Armored Elytra
- Colored EnderChests
- DyedBackpacks
- EcoPower
- ExoticGarden
- LuckyBlocks
- SlimeFun
For Dynmap, optionally an http proxy is used to proxy to the port 80 since the server doesn't run as root sudo apt install apache2
Proxy Steps TBA
Luckperms config TBA