banner



How To Set Up Spigot Server

How to Install Spigot Minecraft Server on Ubuntu 20.04

Spigot is a modified Minecraft server software based on CraftBukkit. It provides additional performance optimizations, configuration options and features while maintaining compatibility with all existing plugins and mods.

In this tutorial, y'all volition learn how to build and install Spigot Server on a Ubuntu 20.04 based server and install plugins.

Prerequisites

  • A server running Ubuntu twenty.04 with a minimum of 4GB RAM and 2 CPU Cores.

  • A non-root user with sudo privileges.

  • Everything is updated.

    $ sudo apt update && sudo apt upgrade                  
  • Install the required packages.

    $ sudo apt install wget apt-transport-https gnupg nano screen                  

Step 1 - Configure Firewall

The outset step is to configure the firewall. Ubuntu comes with ufw (Uncomplicated Firewall) by default.

Check if the firewall is running.

$ sudo ufw condition              

You lot should become the following output.

Status: inactive              

Allow SSH port to forbid the firewall from breaking the electric current connexion on enabling information technology.

$ sudo ufw allow OpenSSH              

Allow port 25565 for the Spigot server to accept connections.

$ sudo ufw allow 25565              

Enable the Firewall

$ sudo ufw enable Command may disrupt existing ssh connections. Go along with operation (y|n)? y Firewall is active and enabled on system startup              

Check the condition of the firewall again.

$ sudo ufw status              

You should see a similar output.

Status: active  To                         Action      From --                         ------      ---- OpenSSH                    Permit       Anywhere 25565                      ALLOW       Anywhere OpenSSH (v6)               ALLOW       Anywhere (v6) 25565 (v6)                 Permit       Anywhere (v6)              

Step 2 - Install Java and Git

Spigot installer needs Coffee and Git to piece of work. Ubuntu 20.04 ships with OpenJDK 17 as the latest available version of Java. Run the post-obit control to install it.

$ sudo apt install openjdk-17-jre-headless              

Confirm the release.

$ java --version openjdk 17.0.1 2022-10-19 OpenJDK Runtime Surroundings (build 17.0.1+12-Ubuntu-120.04) OpenJDK 64-Bit Server VM (build 17.0.i+12-Ubuntu-120.04, mixed mode, sharing)              

Install Git.

$ sudo apt install git              

Footstep 3 - Create a Minecraft user

The next step is to create a defended user for running the server.

$ sudo adduser minecraft              

Switch to the newly created user.

$ sudo su - minecraft              

Footstep 4 - Download and install Spigot

Nosotros volition build Spigot using the BuildTools.jar application. The first step is to switch to the home directory.

minecraft:$ cd ~              

Create a new directory for BuildTools and shift to information technology.

minecraft:$ mkdir buildtools && cd buildtools              

Grab the BuildTools.jar file.

minecraft:$ wget -O BuildTools.jar  https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/antiquity/target/BuildTools.jar              

Build the latest stable version of Spigot.

minecraft:$ java -jar BuildTools.jar --rev latest              

Depending on the available server resources, this procedure may take time to complete.

Check the name of the Spigot jar file created.

minecraft:$ ls  apache-maven-3.6.0  BuildData  BuildTools.jar  BuildTools.log.txt  Bukkit  CraftBukkit  Spigot  spigot-one.18.1.jar  work              

In our instance, the name is.

Create some other directory for your Spigot Server and switch to it.

minecraft:$ cd ~ && mkdir server && cd server              

Move your Spigot jar file to the newly created server directory.

minecraft:$ mv ~/buildtools/spigot-1.eighteen.1.jar ~/server/spigot.jar              

Step 5 - Offset Spigot Server

To start the Spigot server, we need to create a startup script that allows us to pass various Java parameters to optimize the server.

Create and open the startup script for Spigot.

minecraft:$ sudo nano spigotstart.sh              

Paste the following code in the file.

#!/bin/sh  coffee -Xms3G -Xmx3G -XX:+UseG1GC -20:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -Twenty:+UnlockExperimentalVMOptions -Xx:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=thirty -20:G1MaxNewSizePercent=forty -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=twenty -Twenty:G1HeapWastePercent=v -20:G1MixedGCCountTarget=four -XX:InitiatingHeapOccupancyPercent=fifteen -20:G1MixedGCLiveThresholdPercent=90 -Xx:G1RSetUpdatingPauseTimePercent=five -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=one -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar spigot.jar nogui              

The parameter -Xms3G -Xmx3G configured the Java heapspace for 4GB of RAM. We accept left 1GB free in our case for the Bone and whatsoever other stuff that it needs the ram for. Change this to the corporeality of RAM yous want to classify to the Spigot server. If your server has 16GB of RAM, you lot should set the parameter to occupy xiv or 15GB of RAM.

In one case finished, save the file by pressing Ctrl + X and inbound Y when prompted.

Brand the startup script executable.

minecraft:$ chmod +x spigotstart.sh              

Start your Spigot server for the start fourth dimension.

minecraft:$ ./spigotstart.sh              

The server will not showtime and instead terminate, giving the following bulletin.

[xiv:14:21] [ServerMain/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.              

Open eula.txt for editing.

minecraft:$ nano eula.txt              

Set the value of the variable eula to truthful.

#By changing the setting below to TRUE yous are indicating your understanding to our EULA (https://business relationship.mojang.com/documents/minecraft_eula). #Sun Dec 26 13:29:15 UTC 2022 eula=truthful              

One time finished, save the file past pressing Ctrl + X and entering Y when prompted. Advertisement

Before starting the server, let us configure it to run it every bit a service in the groundwork.

Footstep 6 - Configure Spigot as a service

The server needs the shell to exist running all the time for it to piece of work, which is non ideal. We need to create a service and then that the server tin can start automatically on boot and run in the background.

Exit out of the minecraft user.

minecraft:$ get out              

Create a Spigot Service file and open it for editing.

$ sudo nano /etc/systemd/system/spigot.service              

Paste the post-obit code.

[Unit of measurement] Description=SpigotMC Afterwards=network.target  [Service] Blazon=forking User=minecraft Group=minecraft ExecStart=/usr/bin/screen -d -k -S minecraft /home/minecraft/server/spigotstart.sh ExecStop=/usr/bin/screen -Due south minecraft -p 0 -X stuff "stop$(printf \\r)" WorkingDirectory=/habitation/minecraft/server  [Install] WantedBy=multi-user.target              

Once finished, save the file past pressing Ctrl + X and inbound Y when prompted.

Reload the service daemon.

$ sudo systemctl daemon-reload              

Enable the service.

$ sudo systemctl enable spigot              

Start the Spigot service.

$ sudo systemctl start spigot              

Check the service status.

$ sudo systemctl status spigot ? spigot.service - SpigotMC      Loaded: loaded (/etc/systemd/arrangement/spigot.service; disabled; vendor preset: enabled)      Active: active (running) since Monday 2022-12-27 09:15:25 UTC; 6s ago     Process: 32011 ExecStart=/usr/bin/screen -d -m -S minecraft /dwelling house/minecraft/server/spigotstart.sh (code=exited, sta>    Main PID: 32012 (screen)       Tasks: 25 (limit: 4691)      Memory: 3.2G      CGroup: /system.piece/spigot.service              ??32012 /usr/bin/SCREEN -d -thou -S minecraft /home/minecraft/server/spigotstart.sh              ??32013 /bin/sh /home/minecraft/server/spigotstart.sh              ??32014 java -Xms3G -Xmx3G -20:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockEx>  December 27 09:15:25 spigot systemd[i]: Starting SpigotMC... Dec 27 09:15:25 spigot systemd[1]: Started SpigotMC.              

Step 7 - Connect to Minecraft

At present that our server is upwards and running, information technology is time to connect to Minecraft. Launch your Minecraft game.

Minecraft game

Click on the Multiplayer button and ignore the warning for the future past checking the box,Do non show this screen over again.

Minecraft Multiplayer warning

Click on Add Server button on the next page.

Minecraft Add Server

Enter your server's public IP address and name. Click Done when finished.

Your Server volition now appear on the listing.

Minecraft Server List

Click on your server proper noun and press the Join Server button to beginning the server. Your game will get-go soon.

Minecraft Server Game

You can inquire your friends to bring together your server and play with them. Advertizing

Step 8 - Customize Server Properties

Yous tin can customize your server by editing the /home/minecraft/server/server.properties file. We will go through some of the properties beneath.

  • Enable control blocks: Values bachelor are true and imitation.

    enable-command-cake=false                  
  • Gamemode: Values available are survival, creative, risk, and spectator. They can likewise be defined by integers starting from 0 for survival, one for creative, 2 for risk, and iii for spectator.

    gamemode=survival                  
  • Difficulty: Values available are peaceful, easy, normal, and hard. They can also be divers by integers starting from 0 for peaceful, 1 for piece of cake, 2 for normal and three for hard.

    difficulty=easy                  
  • MOTD: Stands for Message Of The Twenty-four hours. Information technology is the bulletin that is shown on the Server list page. Accepts a cord value. Supports color, special characters and formatting codes. It should not be longer than 59 characters.

    motd=A Minecraft Server                  
  • PVP: Enables the Player versus Actor mode. Values available are true and simulated.

    pvp=true                  
  • Server Port: Defines the port on which the Minecraft server listens to. The default value is 25565.

    server-port=25565                  

    If you change the port value to something else, yous will need to enable information technology in the firewall; otherwise, players won't be able to connect.

  • See the Minecraft wiki for more properties.

You will need to restart your Spigot server later on making whatever changes to these properties for them to have effect.

$ sudo systemctl restart spigot              

Step 9 - Install Plugins

You tin download plugins from Spigot Resources or Bukkit Plugin pages.

If you download the plugin from Spigot, the post-obit method won't piece of work since it has been blocked. You will have to manually download the Jar file and motion information technology to the server. Merely if you lot are downloading from Bukkit, employ the following method to download directly to your server.

Download the .jar file of the plugin from the above pages to the /home/minecraft/server/plugins directory.

$ sudo wget -P /dwelling house/minecraft/server/plugins/ --content-disposition <plugin url>              

The flag --content-disposition ensures the file is downloaded with the correct file name by making apply of the Content-Disposition headers.

For instance, if you lot are downloading the WorldEdit plugin, this is how you lot will download information technology.

$ sudo wget -P /home/minecraft/server/plugins --content-disposition https://dev.bukkit.org/projects/world edit/files/latest              

To reload the plugin, restart your Spigot server.

$ sudo systemctl restart spigot              

Step ten - Update Spigot

Updating Spigot will crave you to repeat stride 4 of this guide to grab the latest version of BuildTools.jar file and so create a fresh spigot.jar file. Brand certain you lot backup the one-time jar files and stop the server earlier doing that.

Conclusion

This concludes our tutorial on installing and configuring the Spigot Minecraft server on a Ubuntu 20.04 based organisation. If you have any questions, post them in the comments below.

Suggested manufactures

How To Set Up Spigot Server,

Source: https://www.howtoforge.com/how-to-install-spigot-minecraft-server-on-ubuntu-20-04/

Posted by: poulinreaddligning.blogspot.com

0 Response to "How To Set Up Spigot Server"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel