Setup PaperSpigot on Debian 10

Last Updated: Fri, May 1, 2020
Debian Minecraft

Introduction

PaperSpigot is a high-performance fork of Spigot. This guide explains how to setup PaperSpigot on a Debian 10 (Buster) Vultr instance.

Step 1: Prepare the System

Step 2: Install Java

Install the headless OpenJDK version.

$ sudo apt install openjdk-11-jre-headless -y

Step 3: Install Screen

Screen is a GNU utility that allows the PaperSpigot server to run in the background.

$ sudo apt install screen -y

Step 4: Create the Swap File

PaperSpigot requires a swap file to accommodate the RAM requirements. Replace 1G in the command below with your desired swap file size.

$ sudo fallocate -l 1G /swapfile

Set the permissions.

$ sudo chmod 600 /swapfile

Allocate the swap space.

$ sudo mkswap /swapfile

Turn on swap.

$ sudo swapon /swapfile

Modify /etc/fstab to mount the swap file at boot.

$ sudo nano /etc/fstab

Append this line to the file.

/swapfile   none    swap    sw    0   0

Step 5: Install PaperSpigot

Change to the paperuser home directory.

$ cd ~

Create and change to the paper folder.

$ mkdir paper
$ cd paper

Download the latest build of PaperSpigot to paperclip.jar. If you prefer a different Minecraft version, replace lastSuccessfulBuild with the desired build number found here.

$ wget -O paperclip.jar https://papermc.io/ci/job/Paper/lastSuccessfulBuild/artifact/paperclip.jar

Create a startup script for your server.

$ nano start.sh

Paste this script into start.sh. Replace 1024M with the amount of RAM installed on your server.

#!/bin/sh

java -Xms512M -Xmx1024M -jar paperclip.jar

Make start.sh executable.

$ chmod +x start.sh

Agree to the Minecraft EULA.

$ echo "eula=true" > eula.txt

Step 6: Start the Server

Start a screen instance to run the server in the background.

$ screen -S "My PaperSpigot Server"

Run the startup script.

$ cd ~/paper
$ ./start.sh

To exit out of the screen window, press CTRL + A, then press D. If you want to open the window again, use the command screen -r.

Conclusion

You have installed a PaperSpigot Minecraft server on Debian 10. The server will download files necessary to setup PaperSpigot on the first launch. After the first run, your server will launch faster.

Want to contribute?

You could earn up to $300 by adding new articles