Introduction
First off: Currently there are multiple ways to do this some better some worse. Point of this thread is to discuss different solutions on how to host on Linux
This is NOT a newbie-friendly tutorial. Some basic Linux knowledge and probably tinkering is needed.
Post in this thread if you have different solutions, suggestions or questions about hosting on Linux.
Most of you already know that there is no Linux LiF-Server available at the moment.
Luckily, there is WINE and a few other tools for that.
According to a few quotes from the LiF-Devs, native Linux servers are currently a low priority but that doesn't mean we can't try!
Let's start
After a busy evening testing around with WINE, Xvfb, x11vnc and finally Blackbox(not the provider) on Ubuntu I managed to start and play on my Linux machine.
Currently, this is not fully tested, but it was playable so that's a good start.
The software needed for this:
- steamcmd (other solutions available)
- MariaDB (mandatory)
- Xvfb (best (only?) solution)
- Blackbox (probably optional)
- x11vnc (probably optional as well)
- screen (neat to have)
- WINE (mandatory)
steamcmd
There are multiple solutions for this, personally I find steamcmd to be the best. Download, Unpack, Run.
https://developer.valvesoftware.com/wiki/SteamCMD
LiF:YO Dedicated Server AppID: 320850
MariaDB
This one is a no-brainer. LiF uses MariaDB so that's what you should install. On Ubuntu you can get it with apt-get directly.
In case of Ubuntu MariaDB 5.5 is available in its own package.
Xvfb
Virtual X11 Server.
While the LiF-Server doesn't seem to need it at first glance it looks like you can't connect your client to it without an X11 server. (Somebody got a hunch why?)
Available through the repositories.
Blackbox
A really small window manager.
Somehow, I couldn't start the server with Xvfb only and couldn't figure out why, Blackbox was the solution for this.
Available through the repositories.
I guess you don't need Blackbox but after wasting a few hours already and Blackbox just working I didn't bother about that.
x11vnc
Since you need a display for Blackbox I installed x11vnc.
This neat little application enables you to connect to your Xvfb display with UltraVNC (or any other VNC software for that matter).
Available through the repositories.
screen
Great little app. Saves you the '&' on a few occasions.
Even if you don't need it it's nice to have!
Pre-installed on most distributions, if not get it through the repositories.
WINE
And last but not least, WINE.
This great application enables you to run most windows-software on your Linux machine!
Available through the repositories. (If not, get the source and compile. This counts for other applications as well).
Installation (in my case)
Download the LiF:YO dedicated server through steamcmd.
Downloading through your local machine and then uploading with WinSCP to your remote machine should work as well but steamcmd would eliminate this step.
Install and configure MariaDB
Don't forget to apply the my.ini (inside the docs folder) to your MySQL configuration.
Since the LiF-Server doesn't create Tables/Functions by itself I did it manually.
I set bind-address to 0.0.0.0 and granted all privileges to my home IP address (which is static).
With remote access enabled I used HeidiSQL to create a UTF-8 database and upload the new.sql script (Again: use UTF-8)
In HeidiSQL load new.sql into the editor and run it with "send batch in one go" enabled, otherwise you'll get syntax-errors.
Sidenote:
If you want to import an existing world be sure your backup.sql (or whatever you call it) doesn't delete Functions.
I'm not certain why but HeidiSQL (and Navicat) are both unable to dump existing MySQL-Functions (they just dump them empty which means if you truncate your dump it will override the existing functions with emptiness of doom).
(If somebody knows how to fix the LiF-Server not creating Tables/Functions, spill it! )
Install all other tools and start them up.
In my case I opened a screen and ran these inside it:
Xvfb on display 99 with &
Blackbox with &
x11vnc directly. Detach the screen.
In my case:
- Code: Select all
SCREEN -mSU lif
\_ /bin/bash
\_ Xvfb :99 -screen 0 800x600x8 -ac
\_ blackbox
\_ x11vnc -display :99 "hiddenPW" -usepw -forever
Install UltraVNC on your home PC and connect it to your server.
The Blackbox 'desktop' should appear. Right click, open xterm, navigate to your LiF-Directory and start the .exe with
- Code: Select all
wine ddctd_cm_yo_server.exe "-worldID 1"
Connect and play.
Another sidenote because some people still try to do that...
Root access is not needed expect for installing and configuring your tools! (MariaDB service).
DO NOT start your screen, Xvfb, blackbox or x11vnc as root EVER.
Opinion on hosting and hardware
It looks like all hosting providers use VPS.
In my honest opinion this is stupid and should not be encouraged. A VPS might work in case of a very few virtual machines but it looks like most hosting providers throw you together with one hundred others and perfomance WILL suffer.
I got a small dedicated server with an i5 @ 3.4 Ghz with 16 GB RAM and an SSD for 46€/Month. If the SSD is too slow for you, use a RAM-Disk.
I assume this is way more than enough for Life is Feudal even when using WINE.
Pros of using dedicated hardware:
- Overkill perfomance
- Cheap as fuck (When you compare it to a 64 Slotted VPS with free lags included).
Contra:
- You need to read, test, and do everything yourself.