Ran on Debian 12 in DigitalOcean
Assuming you already know how to spin up and SSH into your own Debian 12 server; here are the commands.
First, update everything.
sudo apt update
Download the compatible jdk version for the current Minecraft version, in this case jdk 21.
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
Install the jdk package.
sudo dpkg -i jdk-21_linux-x64_bin.deb
Verify java version, in this case make sure it’s version 21.
java -version
Download the PaperMC server.
wget https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/128/downloads/paper-1.21.1-128.jar
Eula required to agree to start the server.
echo “eula=true” > eula.txt
Enter screen so the server doesn’t close when you disconnect from the console.
screen
Start the server.
java -Xmx1024M -Xms512M -jar paper-1.21.1-128.jar nogui
After world generation is complete, disconnect from the screen.
CTRL + A + D
Now just connect to your server’s IP in your Minecraft client and you should be able to play!
PS If you want to join the one I made with this exact documentation the IP is: 165.227.33.85