Basics: ServerCLI

Instructions for the dedicated multiplayer server without a GUI component, as most remote (Linux) servers are.


Table of Contents

Setup

You can start the ShiVa CLI server either trough a file manager GUI if your remote machine supports it, or connect via SSH and start the server without any GUI support.

Location

The ShiVa Server CLI is located inside the ShiVa Editor directory. On Windows and Linux, you can easily identify the server binaries from their names. On MacOS however, all editor and server binaries are packed together inside the .app container. We recommend using the easy starter script for MacOS if you intend to use the CLI server on that system. In order for the script to work, your ShiVa Editor needs to be installed directly into /Applications.

ShiVa Libraries

The CLI server depends on the ShiVa libraries, which can be found in the "Libs" directory inside the ShiVa Editor directory. This folder must be present on your remote server in the same directory as your server binary, otherwise your server will refuse to start.

Dependencies

ShiVa Server CLI depends on a number of libraries that are either installed alongside with the ShiVa Editor, or are part of the OS by default - at least on Windows and MacOS. However if you are planning to run ShiVa Server on a Linux server distribution, you can easily run into dependency problems. Since dependency resolution different for every Linux distribution, there are no package names we can give you that must be installed in order for ShiVa to run. Nevertheless, you can check for the required dependencies on Linux by running:

ldd /path/to/ShiVaServerCLI

Terminals

This section will introduce you to the different terminal applications you can use to interface with the ShiVa server. Running terminal (emulation) applications will only be necessary if you have GUI access to your server, but not if you SSH into your server remotely, which will connect you to the terminal automatically.

Windows

The default terminal application on Windows is called cmd.exe and can be started by either typing "CMD" into the start menu prompt, or executing the program directly from one of the C:/Windows subdirectories.

Macintosh

The default terminal application on MacOS is called Terminal.exe and can be started by either starting it from the dock, the spotlight prompt, or by executing the program directly from /Applications/Utilities/Terminal.app.

Linux

The default terminal application on Linux depends on your Desktop Environment and can be called Konsole, xfce4terminal, Terminal or something completely different. Please refer to your distribution manual for further information.

Commands

The CLI server can be controlled using a number of command line parameters.

Starting and stopping

If you are starting the CLI server from the command line, make sure you always "cd" into the main ShiVa Server directory first, otherwise important libraries and program components might not be found.

If we packed a starter script for the server (like .sh on Linux), we highly recommend using this script over the raw binary.

The server startup can be controlled using a number of command line parameters:

-- log <filepath>
(absolute) path of the log file

-- quiet
no log output

-- port <number>
specify TCP listening port, default is 5354

-- idletime <seconds>
server idle time, default is 5s

-- tickrate <milliseconds>
server processing tick rate, default is 10ms

-- appid <id>
specify ID of ShiVa app you wish to connect to the server (0xXXXXXXXX)

-- maxclient <number>
max number of clients allowed to connect, or 0 for unlimited clients (careful!)
If you are ever unsure which parameters you can use and what they mean, simply use:

-- help

Stopping

To force-stop a server from the command line, you can use the keyboard command "CTRL+C".

Logging

Logging will always take place, unless --quiet is active. If you do not specify a directory, the file will be stored in a default, hidden, OS-dependent location (AppData, Library/Application Support, home).