Raspberry Pi as server

Setup & config options

Apache 2.4+ LAMP server

»Windward« server

The game & not the islands
 Setup & config options

Some off-topics
Free weather app. Weather widget

Lat. 52.27, Long. 8.01

 

Meteorological service

Front desk clerk

🚫  No ads & tracking

Tag cloud
QRC bookmark

QR quick response code




Github VSCO Vimeo | Madeira | Madeirense Watch on Youtube


Establish a Windward game server | Prologue


During the earlier days since the game is existing, this essay was composed to focus to set up Windward on a »naked« Raspberry Pi computer board. Some parts describe how to run the game under M$ Windows, but the major parts are related to how to set up Windward under Raspbian Debian Linux.


09-Feb 2021


Raspberry Pi | Set up a dedicated Windward game server


It is not focused to a Raspberry Pi at all. It is suitalble to almost all Linux based systems.


Windward standard beginner shipValidated to Raspbian Debian Linux, Raspberry Pi and M$ Windows.
Honestly I don't know how to set up the system under a Mac with OS X.
¯\_(ツ)_/¯

Note : »PuTTy« SSH and telnet client has used for $bash.
http://www.putty.org


user@raspberry:~ $ sudo su
root@raspberry:~#


Since four years my RasPi 2B+ has managed the game more than very happily.

It would be better to have one of the latest models Pi 3, Pi 4 or the soonly upcoming Pi 5 (?) ready for it for the better gaming experience. I can wait for the time.


The file »WWServer.exe«


Be god of the multiplayer world with a dedicated server on your Raspberry Pi or similar home server.


Whether you want to play a game, mode or mod that simply isn't that popular online, here is how to do it.


Please note that for the article, we do being working under Microsoft's M$ Windows.

Windward comes with a dedicated server executable called »WWServer.exe«


This is one of the files you need to actually host the dedicated game server. »WWServer.exe« requires Mono 2.0 on your system installed. The always lastest »WWServer.exe« can be found in your Steam folder: /Steam/steamapps/common/Windward or @Tasharen (not always the latest).
If you have a firewall running, permit »WWServer.exe« to deal with incoming and outgoing traffic.

Windward logo

Image courtesy of Tasharen.com


Windward game server startup parameters


-name "Your Server" ⇦ name your server
-world "Your World" ⇦ specify which world (e.g. World.dat) file to load
-tcp [port] ⇦ TCP port for clients to connect to (default is 5127)
-public ⇦ register your dedicated server to the public lobby
-localpath ⇦ server will use the current folder indead of /My Documents/Windward/
-http ⇦ displays players on server
-service ⇦ run it as a service


M$ Windows

WWServer.exe -world "World" -name "My Server" -tcp 5127 -public -http


Linux

mono WWServer.exe -world "World" -name "My Server" -tcp 5127 -public -http


The argument with -http

Navigate to the server’s home network address by the web browser e.g. http://192.168.0.10:5127 . It shall show up how many players are rioting on your dedicated game server and who they are.

        Name: (T) 03-Jun 2016 Hafenzoll@raspberry demonstrative server
        Clients: 4
        PlayerA
        PlayerB
        PlayerC
        

Simple html-code with 30 seconds refresher.

This does not work with <iframe> embedded in pages on web servers.

Save that as a *.html file and load it directly from your HDD into your web browser.


        <!DOCTYPE html>
        <html lang="en">
        <head>
        <meta charset="UTF-8">
        <title>Windward users</title>
        <meta http-equiv="refresh" content="30">
        <style>
        iframe {
           border: none;
        }
        </style>
        </head>
        <body>
           <p><iframe src="http://192.168.0.10:5127"></iframe></p>
        </body>
        </html>
	

Windward dedicated multiplayer game server


Modem / Router settings


Login to your router's UI (User Interface) and allow port forwarding TPC on port 5127 for your Raspberry Pi device. If possible allow UPnP (Universal Plug and Play) as well.


Preparing the Raspberry Pi


Install Mono on Linux. The package mono-complete should be installed to install everything - this should cover most cases of “assembly not found” errors.

user@raspberry:~ $ sudo su
root@raspberry:~# apt-get install mono-complete


After all just type

root@raspberry:~# mono


to verify the installation is completed.

        Usage is: mono [options] program [program-options]
        ...
		
We need the appropriate folders for Windward.

root@raspberry:~# cd
root@raspberrypi:# mkdir Windward
root@raspberrypi:# cd Windward
root@raspberrypi:/Windward# mkdir Worlds


Copy file WWServer.exe via FTP-client e.g. WinSCP or FileZilla from /Steam/steamapps/common/Windward to /Windward/Worlds - In case your FTP-clients grumbles with that, then we change the owner and redo.

root@raspberrypi:/Windward# chown -R pi /Windward
root@raspberrypi:/Windward# chown -R pi /Windward/Worlds


Generate a new world


Create a new world in Windward, pass through everything: [World Options] [Factions] [Edit] and finally choose [Play] in [Single Player].
You enter the new world and type /info in chatbox. Note your Steam-ID!
Stay on map for at least one minute then [Quit] Windward.
Copy files *.dat and *.dat.config (* = name given) via FTP to /Windward/Worlds

Start-up server via rc.local


This describes the simpliest way to operate the Windward server with your Raspberry Pi.
In order to have a command or program run when the Pi boots, you can add necessary commands to the rc.local file. Modify rc.local by command:

root@raspberrypi:/Windward# sudo nano /etc/rc.local


        #!/bin/sh -e
        #
        # rc.local
        #
        # This script is executed at the end of each multiuser runlevel.
        # Make sure that the script will "exit 0" on success or any other
        # value on error.
        #
        # In order to enable or disable this script just change the execution
        # bits.
        #
        # By default this script does nothing.
        # Print the IP address
_IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi sleep 60s env LC_NUMERIC=en_US.UTF-8 mono /Windward/Worlds/WWServer.exe -world "WORLD NAME" -tcp 5127 -public -service -name "YOUR SERVER NAME" exit 0


I implemented a time delay sleep 60s since modern Raspberry Pis boot quit fast and the Windward server won't startup with a reboot.


The env LC_NUMERIC=en_US.UTF-8 is deployed due to the fact that I have had a conflict with the keyboard. I use the German QWERTZ keyboard layout.


sleep 60s && env LC_NUMERIC=en_US.UTF-8 mono /Windward/Worlds/WWServer.exe -world "WORLD NAME" -tcp 5127 -public -service -name "YOUR SERVER NAME"


must be in one line! You may copy the entire string above, paste (place the cursor between fi and exit 0 and click the right mouse button) and modify the snippet to your needs.

Save Ctrl O and exit Ctrl X.

Let the Raspberry Pi reboot.
Meanwhile you startup Windward.


root@raspberrypi:/Windward# sudo reboot


Your decicated Windward server appears in the lobby list under
Select your new & owned Windward server and type /admin in chatbox as soon as possible.

/admin ⇦ Verify as an administrator manually. Usually this is done as soon as you log in, so executing the command isn’t necessary.

Monitoring CPU usage


"top -i" provides an ongoing look at processor activity in real time.
It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive interface for manipulating processes.

user@raspberry:~ $ top -i


Ctrl C terminates the process »top«.


Example (mono: a non-stressed Windward server needs around 4% CPU usage)

How to stop the Mono process (forced server shutdown)?

user@raspberry:~ $ sudo su
root@raspberrypi:# killall mono



Windward folder structure


Local serverwise (Linux)

          /root
            /home/pi                
                /Windward
                /Debug ⇦ includes TNetErrors.txt (dummy file, empty)
                /ServerConfig ⇦ includes ban.txt
                /Worlds ⇦ *.dat & *.dat.config files & WWServer.exe
          



Root serverwise (Linux)

          /root
            /Windward
                /Debug ⇦ includes TNetErrors.txt & TNetLog.txt
                /Pennants ⇦ your custom pennants uploaded
                /ServerConfig ⇦ includes admin.txt & ban.txt
                /Ships ⇦ your custom made ship designs uploaded
                /Symbols ⇦ your custom symbols uploaded
                /Worlds ⇦ *.dat & *.dat.config files
          

Note that WWServer.exe updates periodically (~ 60 seconds) files *.dat and *.dat.config
in /root/Windward/Worlds even if there's no live-player online.



My Documents - local HDD wise (MS Windows)

          /My Documents
            /Windward
                /Backup ⇦ folders include *.player & *.vault files hourly
                    /6_22_2017_01
                    /6_22_2017_02
                    /6_22_2017_03
                /ClientConfig ⇦ includes admin.txt & ignore.txt
                /Debug ⇦ includes TNetErrors.txt & TNetLog.txt (if)
                /FoW ⇦ includes *.fow files (Fog of War)
                /Pennants ⇦ legal pennants & custom pennants to upload to server
                /Players ⇦ your personal player file(s) like yournick.player
                /ServerConfig ⇦ includes admin.txt & ban.txt
                /Ships ⇦ custom made ship designs for upload to server
                /Symbols ⇦ legal pennants & custom symbols for upload to server
                /Temp ⇦ includes public items from other servers visited
                    /1747950168
                    /1862369054
                /Vault ⇦ your personal vault of items looted in SP & MP
                /Worlds ⇦ *.dat & *.dat.config files
          

Windward game | System clean up


From time to time you can keep your system tidy if you delete redundant files & folders.
Leave the last ten most recent in Backup.
No minds about if you delete the files in FoW completely.


          /My Documents
            /Windward
                /Backup ⇦ folders include *.player & *.vault files hourly
                ...
                /FoW ⇦ includes *.fow files (Fog of War)
                ...
          

22-Jun 2017

Updated 08-Feb 2021


tux cheer penguin gif animatedThe job is done.


dosboot.org 2024 | Design and layout handmade in Northwest Europe