Linux

Log onto your server

First, let’s make sure the server has java installed

Bash
java -version

The version need to be at least java 21

Does it say “-bash: java: command not found“?

Lets install openjdk:

Bash
sudo apt-get install openjdk-21-jre-headless

This will install openjdk version 21. But there are lots of alternatives available. SDKMAN is a great tool to install and manage java versions.

Now that we have java, let’s continue

Let’s create a installation directory in our servers home folder

Bash
mkdir ~/sys-api && cd ~/sys-api

Then go to GitHub in a browser to find latest release download

Copy the URL of the file server-shadow-x.x.x.zip

Then you can download that on your server

Remember to change x.x.x to the actual version when copy pasting

Bash
wget https://github.com/Krillsson/sys-API/releases/download/x.x.x/server-shadow-x.x.x.zip

Then we can unzip the content into the folder

Bash
unzip server-shadow-x.x.x.zip

Move into that directory

Bash
cd server-shadow-x.x.x

Use your favorite text editor to edit the user & password of the config

Bash
nano config/configuration.yml

Then press CTRL+X to exit nano (and press Y to save)

Now we can use nohup to run the process disconnected from the terminal

Bash
nohup ./run.sh &

Then press CTRL+C on your keyboard to get back to your terminal input

Now we can verify that the server started correctly by reading and following the latest lines in the output file

Let’s verify the server started correctly

Bash
tail -f nohup.out

If you see this message without any error after it. That means the server is up and running

Bash
[...]: Tomcat started on ports 8443 (https), 8080 (http) with context path '/'
[...]: Started SysAPIApplicationKt in 6.352 seconds (process running for 7.234)                                               

Again, press CTRL+C to get back to the terminal

Now you are ready to proceed to next step