[How-To] Run a server on a Raspberry Pi

After trying out some stuff, I found a way to run a server successfully on a Raspberry Pi (or maybe even other ARM devices).

First of, download the server files from here and extract them in some folder.

Now, go to https://github.com/libuv/libuv, click on Clone or Download and then Download ZIP. Now extract that too in some folder and execute these commands in the folder.

sh autogen.sh
sudo ./configure
sudo make
sudo make check
sudo make install

(Note that you’ll need to have all the necessary stuff installed, just google if it can’t find a command and install it)

Afterwards, install mono if you haven’t done so already. For Arch Linux as example you’d just need to do pacman -S mono.

When you have done so, go back to your home folder and execute these commands (same story as above with the commands).

git clone https://github.com/Tragetaschen/libSystem.Native
cd libSystem.Native/src
sudo cc -c -o libSystem.Native.o GetUnixName.c -fpic
sudo cc -shared libSystem.Native.o -o libSystem.Native.so
/usr/bin/install -c -m 644 libSystem.Native.so /usr/local/lib
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/local.conf 
sudo ldconfig -v

(Source: https://github.com/aspnet/Mvc/issues/5088, edited a bit because I had issues without sudo)

At last, go to your server directory and run chmod +X run.sh. Now you should be able to start your server via the run.sh.

11 Likes

This is great! Thanks !

Thank you very much scammer :slight_smile:

Hey there,
Sorry for reviving this topic, but which Pi do we have to use to have a decent running server ?

anything will run it, the server is just a relay to give position to other players.

the first player who joins carries most of the stress to him being the host

3 Likes

Alright, thank you for your answer :slight_smile:

Not working here…

[email protected]:/home/pi/libuv-1.x# ./autogen.sh
./autogen.sh: 1: ./autogen.sh: automake: not found
./autogen.sh: 33: test: Illegal number:
./autogen.sh: 34: test: Illegal number:
+ libtoolize --copy
./autogen.sh: 43: ./autogen.sh: libtoolize: not found

Not working…

[email protected]:/home/pi/cfx-server# sh run.sh
Missing method System.Array::Empty<[1]>() in assembly /usr/lib/mono/4.5/mscorlib.dll, referenced in assembly /home/pi/cfx-server/CitizenMP.Server.exe

Unhandled Exception:
System.MissingMethodException: Method not found: 'System.Array.Empty'.
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[<Start>d__4] (CitizenMP.Server.<Start>d__4& stateMachine) [0x00000] in <filename unknown>:0
  at CitizenMP.Server.Program.Start (System.String configFileName) [0x00000] in <filename unknown>:0
  at CitizenMP.Server.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: 'System.Array.Empty'.
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[<Start>d__4] (CitizenMP.Server.<Start>d__4& stateMachine) [0x00000] in <filename unknown>:0
  at CitizenMP.Server.Program.Start (System.String configFileName) [0x00000] in <filename unknown>:0
  at CitizenMP.Server.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[email protected]:/home/pi/cfx-server#

I fixed this by doing

sudo apt-get install make automake libtool curl

I fixed this doing apt-get install mono-runtime

what about streaming?

Can anyone confirm whether this still works or not? I Followed to the best of my abilities but I’m getting “proot: cannot execute binary file: Exec format error” and then “proot: Success” when I run run.sh. Sorry if this is a fairly obvious problem im fairly new to the Unix environment. Any help would be much appreciated.

Sidenote: When I copy run.sh into another test script and make it echo the proot command all the variables seem to be parsing to valid path names as far as I can tell.

If you’re not on x86_64, you’ll have to build the server binaries yourself.

This topic is obsolete as the server doesn’t run on Mono anymore.