Server on Linux: Difference between revisions

From Eco - English Wiki
[unchecked revision][checked revision]
No edit summary
Rewrite for 9.0-beta release, excising Mono and including .NET Core and Steam client directions.
Line 1: Line 1:
Running an Eco [[server]] on the Linux operating system is not supported by [[Strange Loop Games]].
== Important Foreward ==


Some Linux users have successfully run servers with certain tools, but they can have debilitating problems with new versions, which may require different workarounds each time.
First, a disclaimer:  [[Strange Loop Games]] does provide a Linux server build, but they do not offer official support for it at this time.  It is provided as a convenience, not a product.


If you have a support question regarding Linux servers, please join the #server-help channel in [https://discord.gg/eco Eco Discord], but keep in mind the information above.
If you run into trouble or have a question, you can make inquiries in the #server-help channel in the [https://discord.gg/eco Eco Discord], but keep in mind the information above.


== User Guide: Running from a shell (linux/debian) with UI ==
== Prerequisites ==


''Note: This is a guide submitted by [[User:Simonmicro]], using Eco server version 0.7.5.2 on Ubuntu 18.04.1 LTS''
=== Mono No More ===


If you want to run the eco server from a shell under linux with the UI for easier server configuration, you will need a virtual desktop environment. The following example will demonstrate a basic setup under linux (debian 9) using a minimalistic virtual desktop.
Prior to version 9.0 of Eco, it was required that you run with a very old build (no later than 5.14) of the Mono development libraries, and use Mono to run the server.  This is no longer the case.


First you will need to install some required packages: vnc4server (the virtual desktop), lxde (minimalistic desktop), mono-devel (to execute .exe files).
=== .NET Core Libraries ===
You can install them using the following command - maybe some packages can not found for your distribution (for that please see your distros documantation).
 
<syntaxhighlight lang="shell">
Eco is now built with and is run leveraging [https://docs.microsoft.com/en-us/dotnet/core .NET Core], and runs as a native binary on Linux.  You will have to [https://docs.microsoft.com/en-us/dotnet/core/install/linux install the .NET Core 3.1 libraries], repositories for which Microsoft makes available for several Linux distributions.  Follow the directions on Microsoft's site for instructions for installing the libraries.
sudo apt install --no-install-recommends vnc4server mono-devel tigervnc-common lxde
 
</syntaxhighlight>
== Eco Dedicated Server files ==
 
There are two primary options for acquisition of the Eco dedicated server: getting it directly from Strange Loop Games, or through Valve Software's Steam platform.
 
=== Steam Command-Line Client ===
 
==== Getting SteamCMD ====
 
The ECO Dedicated Server is made available through Valve Software's [https://steampowered.com Steam] distribution system, and Valve provides a command-line tool called [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD] to facilitate command-line installation of products in various environments, including Linux. Follow the directions on the foregoing link to get the SteamCMD program installed and configured on your system. You will ''not'' need SteamCMD if you are acquiring the Eco Dedicated Server directly from Strange Loop Games.  
 
==== Installing Eco with SteamCMD ====
 
Presuming for the same of simplicity that you wish to install the Eco Dedicated Server into an <tt>Eco</tt> subdirectory of your home directory, a script such as the following will install and subsequently update the software for you:


Now you can run your VNC server using the following command - please take a look inside the printed log file to query the vnc listening port!
<syntaxhighlight lang="sh">
<syntaxhighlight lang="shell">
#!/bin/bash
vncserver -localhost=no -geometry 1366x768
steamcmd  +login anonymous +force_install_dir ~/Eco +app_update 739590 -beta default validate +quit
</syntaxhighlight>
</syntaxhighlight>


Now use a VNC client to connect to your server. If you are connected right-click to the desktop background to open a terminal. Inside the terminal you can start the desktop with a file manager using the following commands:
=== SLG Direct Download ===
<syntaxhighlight lang="shell">
lxsession &
pcmanfm &
</syntaxhighlight>


[[File:Screenshot from vnc desktop.png|thumb|Lxde on VNC]]
An archive of the current release of the Eco Dedicated Server as of this writing (Beta 9.0.2) can be found [https://s3-us-west-2.amazonaws.com/eco-releases/EcoServerLinux_v0.9.0.2-beta.zip here].  The following series of commands will download the archive, and set the Eco Dedicated Server up in an <tt>Eco</tt> subdirectory of your home directory, and save a copy of the install archive into a <tt>dist</tt> subdirectory of your home directory:


Now navigate to your servers root (where EcoServer.exe is located) and right-click its file. Select "Mono Runtime (Terminal)" to run your eco server with its UI.
<syntaxhighlight lang="sh">
mkdir -p ~/Eco
cd ~/Eco
wget https://s3-us-west-2.amazonaws.com/eco-releases/EcoServerLinux_v0.9.0.2-beta.zip
unzip EcoServerLinux_v0.9.0.2-beta.zip
mkdir -p ~/dist
mv EcoServerLinux_v0.9.0.2-beta.zip ~/dist/
</syntaxhighlight>


[[File:Screenshot from eco server startup.png|thumb|Screenshot to open a eco server with ui - vnc client connection ]]
== Starting the Server ==


Alternatively, you can use the already opened terminal to navigate to your folder and start the eco server with the following command:
Because the Eco Dedicated Server is now a native Linux binary, starting it could not be easier.  Again, presuming it is installed in an <tt>Eco</tt> subdirectory of your home:


<syntaxhighlight lang="shell">
<syntaxhighlight lang="shell">
mono EcoServer.exe
cd ~/Eco
./EcoServer
</syntaxhighlight>
</syntaxhighlight>


Please not that this procedure doesn't work with eco server versions 7.6.0 and 7.6.1 (see https://github.com/StrangeLoopGames/EcoIssues/issues/8577)!
== Stopping the Server ==
 
To safely shut down the Eco server, send SIGINT or press Control+C with the <tt>EcoServer</tt> process interactive to initiate a safe shutdown.
 
Please not that this procedure doesn't work with Eco versions prior to 9.0.0-beta.

Revision as of 23:48, 18 September 2020

Important Foreward

First, a disclaimer: Strange Loop Games does provide a Linux server build, but they do not offer official support for it at this time. It is provided as a convenience, not a product.

If you run into trouble or have a question, you can make inquiries in the #server-help channel in the Eco Discord, but keep in mind the information above.

Prerequisites

Mono No More

Prior to version 9.0 of Eco, it was required that you run with a very old build (no later than 5.14) of the Mono development libraries, and use Mono to run the server. This is no longer the case.

.NET Core Libraries

Eco is now built with and is run leveraging .NET Core, and runs as a native binary on Linux. You will have to install the .NET Core 3.1 libraries, repositories for which Microsoft makes available for several Linux distributions. Follow the directions on Microsoft's site for instructions for installing the libraries.

Eco Dedicated Server files

There are two primary options for acquisition of the Eco dedicated server: getting it directly from Strange Loop Games, or through Valve Software's Steam platform.

Steam Command-Line Client

Getting SteamCMD

The ECO Dedicated Server is made available through Valve Software's Steam distribution system, and Valve provides a command-line tool called SteamCMD to facilitate command-line installation of products in various environments, including Linux. Follow the directions on the foregoing link to get the SteamCMD program installed and configured on your system. You will not need SteamCMD if you are acquiring the Eco Dedicated Server directly from Strange Loop Games.

Installing Eco with SteamCMD

Presuming for the same of simplicity that you wish to install the Eco Dedicated Server into an Eco subdirectory of your home directory, a script such as the following will install and subsequently update the software for you:

#!/bin/bash
steamcmd  +login anonymous +force_install_dir ~/Eco +app_update 739590 -beta default validate +quit

SLG Direct Download

An archive of the current release of the Eco Dedicated Server as of this writing (Beta 9.0.2) can be found here. The following series of commands will download the archive, and set the Eco Dedicated Server up in an Eco subdirectory of your home directory, and save a copy of the install archive into a dist subdirectory of your home directory:

mkdir -p ~/Eco
cd ~/Eco
wget https://s3-us-west-2.amazonaws.com/eco-releases/EcoServerLinux_v0.9.0.2-beta.zip
unzip EcoServerLinux_v0.9.0.2-beta.zip
mkdir -p ~/dist
mv EcoServerLinux_v0.9.0.2-beta.zip ~/dist/

Starting the Server

Because the Eco Dedicated Server is now a native Linux binary, starting it could not be easier. Again, presuming it is installed in an Eco subdirectory of your home:

cd ~/Eco
./EcoServer

Stopping the Server

To safely shut down the Eco server, send SIGINT or press Control+C with the EcoServer process interactive to initiate a safe shutdown.

Please not that this procedure doesn't work with Eco versions prior to 9.0.0-beta.