Hosting a YSFlight Server on a Raspberry Pi

Post Reply
User avatar
Krux
CVW-171
CVW-171
Posts: 322
Joined: Sun May 05, 2013 11:25 pm
Favorite Aircraft: Super Bug
Has thanked: 131 times
Been thanked: 103 times

Hosting a YSFlight Server on a Raspberry Pi

Post by Krux » Thu Sep 30, 2021 8:24 pm

Hello! Recently i hosted my YS Server using a Raspberry Pi. Using a light linux distro and using ssh to monitor the server status proved to be a good and cheap option for those who don't have a spare x86 PC lying around to host such a thing, or if space or power are concerns in your scenario.

In this topic, i'll cover the things that are different to normal hosting, which is covered extensively in other topics. I'll reference links to such topics whenever their content matters to the overall process.


1st Step: Grab a Pi

A Raspberry Pi is a really small, credit-card-sized ARM computer that is really useful for people who love to do DIY stuff and learning about electronics in general. They are the definition of multipurpose.
My experimentation was all done in a Raspberry Pi 3B+ (the only one i have with me).


2nd Step: Grab a MicroSD Card (8GB+)

The system we're going to use on the Pi (Raspbian Lite) is around 500MB in size, and YS server files aren't really that heavy until you start installing lots of mods, but we are going to be manually compiling and installing a software that is gonna make the hosting part possible. If you can get an SDXC card, even better, as it will speed up the entire proccess.


3rd Step: Download and Install Raspbian Lite to your MicroSD card


From the next point onwards, some Linux knowledge will be required. If you never used a terminal, i suggest you start here (do the Command Line section).


4th Step: Start Raspbian, and connect to the internet

If you just connect an ethernet cable to your Pi, DHCP services will automagically connect you to the internet. If you are going full crazy and using Wi-Fi, use the command raspi-config to set it up. Ping google.com at the end to make sure you're online.


5th Step: Update Raspbian

Full guide here, TLDR: Raspbian is Debian based, so apt update and upgrade should do the trick. The guide also covers updating other things like the firmware of the pi, but this is not relevant to us.


OPTIONAL STEP: Enable USB boot, and re-do all the previous steps

If, by some reason, you just cant keep a MicroSD Card with you (maybe your parents are photographers or there is simply none available in your local market now), if you managed to boot Raspbian Lite, you can enable USB boot, rather than using the MicroSD. This should be needed up to the Pi 3, the Pi 4 comes with USB boot enabled by default. Full guide here.


6th Step: Compile and install Box86 dynamic recompiler

Installing Box86 requires a bit of time and effort. FULL GUIDE IS HERE. Be sure to pay attention to the model-specific steps close to the end, make sure you match your pi's model.

After finishing this step, we should be able to run some x86 software on our Pi. The YSFlight Server Console runs just fine under this environment, so we can finish this with:


Final Step: Download, set up and run your YSFlight server

To make things easy, on a separate computer running your favorite system, download your preferred Linux build of YSFlight, and only keep the following folders/files to do a minimal server build:

Code: Select all

ysserver/
	/aircraft
	/ground
	/netchatlog
	/scenery
	ysflight32_nownd
Then, install the mods you wish to see on your server making sure the LSTs are fixed for linux (Decaff_42 has an awesome Python tool right here that patches them for you)

After this, zip your server folder and send to the internet, and download it to your pi. You can create a git, upload it and download it using git clone, you can upload it to dropbox and use it wget, or just move to another USB drive and copy it to your home folder.

Finally, browse to your Server folder, start the server console, and enjoy!


Some other points not covered but are related:
Last edited by Krux on Fri Oct 01, 2021 4:50 pm, edited 1 time in total.

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1422
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 977 times
Been thanked: 311 times
Contact:

Re: Hosting a YSFlight Server on a Raspberry Pi

Post by u2fly » Fri Oct 01, 2021 1:42 pm

Krux wrote:
Thu Sep 30, 2021 8:24 pm
Final Step: Download, set up and run your YSFlight server

To make things easy, on a separate computer running your favorite system, download the 2015 Linux build of YSFlight, ...
Guess, version of YSFlight for Linux in particular case (for airshow, etc.) may be not only 20150425, but also 20120701.
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)

User avatar
Krux
CVW-171
CVW-171
Posts: 322
Joined: Sun May 05, 2013 11:25 pm
Favorite Aircraft: Super Bug
Has thanked: 131 times
Been thanked: 103 times

Re: Hosting a YSFlight Server on a Raspberry Pi

Post by Krux » Fri Oct 01, 2021 4:49 pm

yeah, i guess specifying a version was dumb.

will edit to reflect that.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest