Hosting a Terreria Server – The yakshaving commences

Four kids, four laptops, one minecraft worldSo the latest craze around here is Terraria. Think of it as Minecraft in 2d. Naturally, since the kids here are all Minecraft addicts, Terraria was a natural next step. Minecraft, the gateway drug for MMPORPGs.
Of course, “DAD! Can you host a Terraria server for us?” was inevitable. “Sure”, the foolish Dad says, “Where’s the Linux client?”
“Yeah, so, there’s a problem with the Linux server version of Terraria. There isn’t one.”
Awesome.
So began my descent into Windows hosting hell. I share my experiences here with you, to hopefully lesson your pain.
A server
Windows xp laptop in the server rackIn order to make this work, you naturally need a server. I had a spare Windows XP Dell 620 laptop lying around that looked like it was ready for abuse, so that was put up as my offering to the network gods. Getting said laptop into the server closet proved to be a bit of a challenge, since I was faced with some awesome challenges:
* The NIC on the laptop (or the drivers) are unstable. Occasionally it will drop the network connection, requiring a physical cable drop and reconnect. Wonderful.
* Terraria is a DirectX application. Ergo, it cannot be started via RDP (which reduces the video driver capability). I must start Terraria on the console of the laptop in the server closet before connecting to it.
* The screen on the laptop is twitchy – Occasionally the screen will blank out, and only a hard reset will restore it.
Installation
Setting up and running the Terraria server was pretty straightforward. Install Steam, download/install Terraria, start up the game, click ‘start server’. Easy, huh? Note that because it uses Steam, you need to use a unique login. My experience has been that the Steam credentials are only checked during startup – once the server is running, you can log out of steam on the server and run up a client machine on the same login.
Networking
Anyone who is familiar with firewalled hosted services should be able to set up their network appropriately. In our network environment, we host servers behind a NAT enabled firewall, and set up port-forwards to internal services. This makes the server relatively isolated from the internet at large, but allows for the server to be accessed from the outside world.
Some basic guidelines when setting up your server:
* Do not host your Windows box on the internet without a firewall. Really, just don’t do it. Windows boxes are the most often attacked, have the most vulernabilities, are the most commonly compromised.
* Running a Windows host with a ‘self hosted’ firewall is marginally better, but is still easy to run up in an ‘unsafe’ configuration without you even knowing it’s happened.
* Terraria uses port ‘31337’ for the server. Note that this port is ALSO used by the (mostly old school now) ‘Back Orifice’ application – a tool generally used to hack servers. Many firewall tools and applications may flag Terraria servers are Back Orifice servers, and disallow them
Testing the server’s available is pretty easy. Log into your Linux box out on the net (you do have one, don’t you?) and test connectivity to the server:

dbs@calypso:~$ telnet your.firewall.ip 31337
Trying 1.2.3.4...
Connected to your.firewall.ip.
Escape character is '^]'.

Hooray! Your server is ready to access! Run up Terraria on your computer, and connect to the IP address of your server (note that Terraria doesn’t support hostnames [idiotic in my opinion] – you must connect by IP). You’re in the game!
Conclusion
In so many ways, Terraria is NOT ready for prime time. The lack of a decent server mode, the requirement for DirectX for even basic operation (even in server mode) – these make hosting a server more painful than necessary. It can be done, but I don’t know how long this house of cards will last.
Oh, the game itself? Don’t know, haven’t played it, there’s no Mac version.

CONGO Update – The road to 2.1.

I’ve set a goal for myself. Have CONGO v 2.1 released by June 1st. It’s an auspicious goal to be sure, and recent career shifts have either made it more likely (more time to work on it) or less likely (new job) to have time to dedicate to coding.
But goshdarn it, I’m going to try.
congov2-eclipse-screenshot.pngWhile coding away last night at a particularly recalcitrant chunk of the new ‘Links’ system (I’ve been… instructed… by my pesky users, that ‘Friends’ is really too ‘social buzzy funtime networking’ for an event management system), I was curious how big CONGO had gotten. So a couple greps got me some quick stats:

Total lines of Java : 13,412
Total lines of XML : 5,492
Total lines of JSP : 5,543

This makes CONGO the largest application I’ve ever written completely on my own. Oh sure, I’ve worked on larger systems, but that was part of a team with other coders. This one (with some small help from 1-2 folks – accounting for around 2% of the code) is all mine.
I’m always looking for alpha and beta testers. Interested? Lemme know. Continuous build / QA testing is working, so there’s always new builds and bugs that need to be tracked.