Setting up a RivenWorld Dedicated Server for CentOS 7 (Linux)

1. Install Pre-requisites

Below are the required pre-requisites to run a RivenWorld Dedicated server

OpenJDK 11 (Adoptium)

Install the OpenJDK 11 Repositories

$ cat <<EOF > /etc/yum.repos.d/adoptium.repo
[Adoptium]
name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm/${DISTRIBUTION_NAME:-$(. /etc/os-release; echo $ID)}/\$releasever/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
EOF

Install the OpenJDK 11 onto CentOS

$ yum install -y temurin-17-jdk

Verify the installation of OpenJDK 11

$ java -version

2. Download the latest server version

$ mkdir -p /home/rw

$ cd /home/rw

$ wget https://gamefocal.com/dist/rw/rivenworld-server.jar
$ wget https://gamefocal.com/dist/rw/config.json

3. Request a Server License Key

You will need to request a server license key on the RivenWorld Hive. This is free and is required for all servers for players to connect.

Get server license key

4. Update the config.json with the license key

$ vi /home/rw/config.json

Example of the config.json

{
"license": "SERVER LICENSE HERE",
"tags": "",
"name": "SERVER NAME",
"description": "SERVER TAGLINE",
"ip": "PUBLIC IP",
"port": PORT,
"world": "world",
"max-players": 32
}

You must add the server license key generated by the hive to the license field in config.json. This allows us to identify your server and provide a quicker server list system than the standard IP scanning technique.

5. Create start.sh file

To help start the server, we’re going to make a start.sh file, you do not need to do this if you know how to start Java Jar files.

$ cat <<EOF > /home/rw/start.sh
#/bin/bash
java -jar rivenworld-server.jar
EOF

$ chmod ug+x /home/rm/start.sh

6. (Optional) Create a RivenWorld Systemd Service

This will allow you to start and stop the server using the Linux systemd service. You do not need to do this if you prefer to start it another way.

$ cat >"/etc/systemd/system/rivenworld.service" <<-EOM
[Unit]
Description=RivenWorld Dedicated Server

[Service]
User=root
WorkingDirectory=/home/rw
ExecStart=/home/rw/start.sh
Restart=always
RestartSec=3
RemainAfterExit=yes
StandardOutput=syslog

[Install]
WantedBy=multi-user.target
EOM

$ systemctl daemon-reload
$ systemctl enable rivenworld.service

7. Starting the Server

Once you have everything setup you can start your server using one of the following methods.

CLI

$ cd /home/rw && java -jar rivenworld-server.jar

Screen

$ screen -S rw

$ cd /home/rw

$ java -jar rivenworld-server.jar

(CRL + A, CRL + D to exit the screen)

Systemd

$ service rivenworld start

Looking for Support?

Jump over to our discord server; we’d be happy to help you!

Join Discord