Setting up a Minecraft Spigot server on an Ubuntu server involves several steps. Spigot is a high-performance fork of the CraftBukkit server software. Here's a step-by-step guide:
1. Install Java
Spigot requires Java to run. Install OpenJDK:
sudo apt update
sudo apt install openjdk-11-jre-headless
2. Create a New Directory for Your Minecraft Server
Create a directory where you want to store your Spigot server files. For example:
mkdir minecraft-server
cd minecraft-server
3. Download the Spigot Server JAR
Download the Spigot server JAR file. You can find the latest version on the SpigotMC website.
wget https://cdn.getbukkit.org/spigot/spigot-<version>.jar
Replace <version>
with the actual version number.
4. Accept the EULA
Before you can run Spigot, you need to accept the End User License Agreement (EULA). Open the eula.txt
file in a text editor and change eula=false
to eula=true
:
nano eula.txt
Save the file and exit.
5. Start the Spigot Server
Run the Spigot server JAR:
java -Xms512M -Xmx1024M -jar spigot-<version>.jar nogui
This command starts the server with a minimum of 512MB RAM and a maximum of 1024MB RAM. Adjust the values according to your server's specifications.
6. Initial Server Setup
The first time you run the server, it will generate some necessary files and stop. Open the server.properties
file:
nano server.properties
You can customize settings such as motd
, server-port
, etc. Save the file and exit.
7. Launch the Server Again
Run the Spigot server again:
java -Xms512M -Xmx1024M -jar spigot-<version>.jar nogui
8. Configure Plugins
Place your Spigot plugins in the plugins
directory within your server directory.
9. Stop the Server
To stop the server, type stop
in the console and press Enter.
10. Create a Start Script (Optional)
For convenience, create a start script to simplify launching your server:
nano start.sh
Add the following content:
#!/bin/bash
java -Xms512M -Xmx1024M -jar spigot-<version>.jar nogui
Make the script executable:
chmod +x start.sh
Now you can start your server with ./start.sh
.
Your Minecraft Spigot server should be up and running. Adjust configurations and install additional plugins as needed for your server setup.