So, we've been playing Terraria as a family for a little while... Or at least I have with the kids. I've always liked Terraria, but I reach a point where I get bored. Having the kids around makes it a bit more fun... But we know some of the kids' friends play it too....

title

We tried to get a server running at a friend's house, but for some reason his ISP is blocking inbound connections (we think), even though they say they're not... So we decided to set one up in the house here.... The only problem is that my only server is a Raspberry Pi 1, wayyy too small for running Terraria..

So, with some help from some people on Twitter, I found a great PI seller, ThePiHut that was selling 8Gb RasPi 4's for about £20 less than Amazon, but also stocked the power cables, pre-built SD cards and a nice case...

Fast forward a week, and it's been far from smooth sailing...

I wanted to use TShock and TerrariaServer on the RasPi, but for some reason various things wanted to be compiled for arm64, not the aarch64 that the Pi claims to be. Conventional wisdom says that they're the same, but there's something hinky about the way that Raspberry Pis are 64 bit under the hood, but running 32 bit on top. Very weird.

Luckily, there's a full 64-bit/64-bit distribution, which is meant to be 'beta', but I grabbed it, wrote it onto the SD card ThePiHut sent me and booted up.

Hoo boy Raspbian.. or RasPiOs.. or whatever they call it sure is bare bones! Compared to Linux Mint it's like jumping back in time 15 to 20 years. I was almost expecting to see that cross-hatch background and X-cursor from X-Windows!

Anyhoo, Installed Mono, which was easy, and installed TerrariaServer, which was also easy... Set up a terraria user with low privs just in case some wise-ass finds a hack (this IS going on the pubic (sic) internet after all. Then put it live and sent the IP address and password over to our friends.

Within an hour we had 7 people running around in our little world we've been building for a year or so! This world was started on a Win10 laptop, then copied off and back when we upgraded it back to Win7 (jesus it was shit with windows 10!), and then over to Linux when even Win7 started getting slow and unsupported earlier this year. Finally, it's made the leap from Linux to Raspbian (also Linux, but now on arm64 instead of x86_64..... And it's been pretty easy each time. Terraria really is a very well designed, robust little game! It seems like it's just digging and making little brick houses, but the amount of stuff you can do just keeps going and going and going.... I've got 250 hours in it with the kids, and we've only just gone past the 50% mark in the world progress!!!

map

OF course, that was when the muppets from China (and ukraine of all places) tried to hack the server, or were just constantly port-scanning it. So I installed fail2ban with a short fuse to boot anyone that pokes it too many times.

Sadly, fail2ban has one achilles heel. Despite people asking for it many times, there's no way to "reset" the strikes on an IP when you get a correct login. So if someone gets their password wrong twice in a row, then they just get 1 more chance or they're locked out. But if they then log in and type an error onto the console, it'll log the error, and they're banned at the IP level... :-/ Not exactly what I want, but it's pleasingly banning portscanning eejits nicely :)

base

yay! In the words of a great man, "I love it when a plan comes together!"

Previous Post Next Post