Blockstorm

Blockstorm

30 ratings
Hosting a dedicated server for Blockstorm
By peevishdave and 1 collaborators
In this guide I'll show you how to configure your own dedicated server for Blockstorm.
With "dedicated server" I mean a server hosted on a remote machine (e.g. a low-cost VPS)
which is always available to players and that can be configured by the owner.
   
Award
Favorite
Favorited
Unfavorite
Finding and renting a cheap VPS
If you already have a remote linux server, you can skip this step,
otherwise continue reading.

Take a look to http://lowendstock.com/
they provide a list of very very cheap VPS (e.g. 3$/Year).
Although many of them have very few resources, you can still find a good balance
between cost and performance.

You can load more than a server instance on the same machine.
Anyway, these are the minimal specifications that I'm suggesting you
for a VPS with a single instance of the Blockstorm server on it:
- at least 256 MB of RAM
- 1 public IP (IPv4)
- 10 Mbit/s (@10)
- 50 GB/month bandwidth
- 3 GB HDD

probably you want to choose the location of the server
in order to be near your home, so that you will have a low ping when playing on it.

As linux distro, the recommended one is Ubuntu Server 14.04 LTS.

After the purchase process is over, you will receive the authentication informations
from your provider.
Usually those consist in a username (root) and password (a password that you choose when you registered).

You can connect to this brand new server from a unix system using the "ssh" command.
To connect from windows I suggest you to use
PUTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
to connect to your system shell
and
WinSCP (http://winscp.net/eng/download.php) to copy files (i.e. maps) to your system.
Installing the server
log in to the shell of your server using ssh (or Putty if you are on Windows)

Create an user:
useradd serveradmin
mkdir /home/serveradmin
chown serveradmin /home/serveradmin

Add a password for serveradmin:
passwd serveradmin

if nano is not installed, install it using:
sudo apt-get -y install nano

or, if you are root, just:
apt-get -y install nano

in the same way install also these useful tools:
sudo apt-get -y install psmisc

From root, add serveradmin to sudo group.
To do this, open the sudoers file using:
nano /etc/sudoers

then add the following line
serveradmin ALL=(ALL:ALL) ALL

under
root ALL=(ALL:ALL) ALL
or under User privilege specification

CTRL+O to save, CTRL+X to exit.

then login with your new user:
login serveradmin
---------------------------------------------

To automatically download dependencies and the server binaries, do:

wget http://www.ghostshark.it/blockstorm/bootstrap_ubuntu_temp.sh
chmod +x bootstrap_ubuntu_temp.sh
./bootstrap_ubuntu_temp.sh


you will find the blockstorm server in ~/blockstormServer/

be sure blockstormServer/ServerManager/bin/ServerManager has the execute permission:
chmod +rx ./blockstormServer/ServerManager/bin/ServerManager

---------------------------------------------

Sometimes, with some VPS providers, you have to configure the firewall using a web interface
in order to let the server ports be accessible from other PCs;
if you have not access to anything except your server's IP,
probably you can skip this step.

If you still cannot connect to your dedicated server, probably the firewall installed on your
machine is blocking incoming connections.
These commands will enable the access to Steam/Blockstorm.
Be sure that these ports are the same in your servers' configuration.

su
iptables -A INPUT -p udp -m udp --sport 12341:12351 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT


Configuring the server
Servers configurations are inside blockstormServer/server/config.*

Use these files to configure your server instances.
Inside the same directory there is a configuration sample (config.BASE.1)
that you could use as a template.

A configuration file is composed by a list of commands which specifies
some properties of the server.

Commented lines starts with a ‘#’ (commented commands will be skipped).

Below we present a list of supported commands:
NAME <Insert here the name of the server>
PASSWORD <Insert here the server password if any>
PORT <Insert here the server port, each server running on the same machine should have a different port>
DISCOVERY_PORT <Insert here the discovery port, each server running on the same machine should have a different port, preferable in the 27015-27025 range>
DRM_PORT <Insert here the steam port, each server running on the same machine should have a different port>
HAS_PORT_FORWARDING ← this should be used for dedicated servers which have a public IP address
MAXIMUM_PLAYERS <maximum number of players> (usually 16)
ADD_MAP <Built-in map Name>$<Mode Name>
ADD_MAP <Custom map Name>$<Map hash>$<Mode Name>
AUTOLOAD

For custom maps (i.e. maps done by users, that are not integrated inside the game), also the map hash should be provided in order to let the game recognize the map (different maps or different versions of the same map could have the same name, but they will have a different hashcode).

To load maps on your dedicated server, you must put them inside
~/.config/unity3d/Indiegala/Blockstorm/save/
create this directory if it doesn't exist.

You will find maps downloaded from the Workshop inside the Steam Directory:
[Path to Steam]\Steam\SteamApps\workshop\content\263060

you'll find a list of directories with a single file inside them.
That file is in the form:
MapName.0f5ca029482e83c28d5c0c7c62c83f6a.map

"0f5ca02..etc.." is the hashcode.
So you should copy (again, using scp or winscp) this file inside ~/.config/unity3d/Indiegala/Blockstorm/save/
on your server, but you have to remove the hashcode from the filename:
"MapName.map". Your entry inside the configuration file will be:
ADD_MAP MapName$0f5ca029482e83c28d5c0c7c62c83f6a$TeamDeathmatchGameMode

of course, you have to set your desired game mode in place of TeamDeathmatchGameMode,
and your map must support it.

Supported modes are:
DeathmatchGameMode
TeamDeathmatchGameMode
AssaultGameMode
CastleBattleGameMode
CaptureTheFlagGameMode
HuntGameMode


If you're using winscp, you should enable the visibility to hidden files to see .config (Ctrl+Alt+H).

--------------
There is also an easier and quicker way to add maps to your dedicated server.
By enabling the AUTOLOAD command inside the configuration file, you tell the server
to automatically load each .map from all the subdirectories in ./blockstormServer/server.
That is, you can create a directory:
mkdir ./blockstormServer/server/maps

then, copy all your maps inside the "maps" directory.
At launch, the dedicated server will verify each game mode supported by your map
that has the minimum number of spawn points to support MAXIMUM_PLAYERS and load it.

------------

WARNING:
All the maps added to the same server configuration must support at least the maximum number of players configured in MAXIMUM_PLAYERS.
e.g. if MAXIMUM_PLAYERS is 16, and the map supports up to 8 players,
the map will be excluded for the maps' rotation.

If you want to load a map made by you using the editor, you will find it
in the following directory:
Windows (Vista and above): C:\Users\...\AppData\LocalLow\IndieGala\Blockstorm\save
Linux: ~/.config/unity3d/Indiegala/Blockstorm\save
Mac OS X: ~/Library/Caches/Indiegala/Blockstorm\save

Those maps are already in the form Name.map. So you can load them directly
on your server without renaming them.
However, you still need to know their hashcode.
On your server, there is a script that let you obtain such hashcode by passing
the map filename in input:
cd blockstormServer
./printhash ~/.config/unity3d/Indiegala/Blockstorm/save/mapName.map


I suggest you to BACKUP your configuration files each time you update the server to the last version.



Running your servers
Once you have configured your server instances (eg. config.BASE.1, config.BASE.2),
you should modify the file ".serverList" inside blockstormServer directory:

cd blockstormServer
nano .serverList

then add a server configuration per line (excluding the "config." prefix):
BASE.1
BASE.2

and save (CTRL+O) and exit (CTRL+X).


To run your servers run:
./startservers.sh

To stop your servers run:
./stopservers.sh

To wait for the end of all current matches and then close the servers:
./stopserverslight.sh


There are also some commands that could be sent to servers while they are running.

To obtain the list of current players:
./getListOfPlayers.sh SERVER_NAME
(SERVER_NAME could be, for example, BASE.1)

To kick a player from a server:
./kickPlayer.sh SERVER_NAME STEAM_ID
(SERVER_NAME could be, for example, BASE.1,
SteamID is the Steam ID of the player to kick)

To ban a player from a server:
./banPlayer.sh SERVER_NAME STEAM_ID
(SERVER_NAME could be, for example, BASE.1,
SteamID is the Steam ID of the player to kick)

You could ban players from all the Blockstorm servers on a machine by using the file:
~/.config/unity3d/Indiegala/Blockstorm/config/staticban.list
which should contain the list of banned STEAM IDs, eg:
2341234123412341234123
5123512512351251514514
3332323233333333333333

25 Comments
Vyvyvn Feb 12, 2021 @ 5:13am 
This is a shame because I more than have the net to host a couple servers, And a pi but if it won't work on ARM processors that's kinda sucky. Still handy that the option to host dedicated is a thing.
Rafalfa Mar 9, 2019 @ 5:41am 
gosh how i can i have miss that... thanks PAL
peevishdave  [author] Mar 8, 2019 @ 4:38pm 
Rafalfa, the Raspberry Pi has an ARM processor, while the executable is x86.
Rafalfa Mar 7, 2019 @ 6:02am 
Hi All,

I've completed the procedure above to install the dedicated server on my Raspberry Pie, unfortunately when i run the start server command here is what i got :


Starting server using server configuration BASE.1
./startserver.sh: 35: ./startserver.sh: ./server/blockstormServer.x86: Exec format error


Let me know if you have any clue !
Thanks ! :cozyspaceengineersc:

Kilroy5150 Jan 5, 2017 @ 2:30pm 
Guys, is there a Windows (that's Windows) way to run a server without using all this 3rd party nonsense, like Putty? I mean, practically all of the other Steam games that allow a dedicated server, have an easy "batch file" access.
peevishdave  [author] May 3, 2016 @ 1:45pm 
I asked, but they didn't enable it for no apparent reason..
[WL] Weasel Ⓢ (Probably AFK) May 1, 2016 @ 9:44pm 
eh, the client is delivered via Steam. The Dedicated Server builds should be delivered via SteamCMD. derp.
Wulf Sep 1, 2015 @ 7:47am 
JonPablo, that's up to the user I guess. I prefer Linux myself, which Oxide supports as well.
JonPablo Sep 1, 2015 @ 5:17am 
Why would you want a windows version when you have an ubuntu/linux version? Linux > MSWin
Wulf Aug 30, 2015 @ 6:10am 
For those looking for a Windows server, I've written up a brief tutorial on setting one up:
http://oxidemod.org/threads/oxide-for-blockstorm.11370/ .