Terraria Dedicated Server Docker Container?

Recommended Posts

So I found this thread on the Official Terraria.org forums http://forums.terraria.org/index.php?threads/released-play-on-linux-docker-wine-steam.18742/


I wanted to know if it was possible to run something like this in UNRAID? Right now I am running a dedicated server through the UNRAID VM system. I have a full Windows 7x86 installed just to run the small dedicated server. I thought if I had a Docker that could run Terraria that it would use a lot less system resources.


The link has the link to the GIT for the Docker file, but if I add it to the Docker list, it doesn't show up in the Templates. Am I just barking up the wrong tree here? Im new to Docker. So any input would be great.

Link to comment

i think you're not only barking up the wrong tree, i think you're in the wrong forest altogether.


i'm unsure about the graphics card element to it but even if that were to work (highly unlikely) , it's a 32 bit container which currently aren't working on unraid due to it not being multiarch and 32 bit libraries not being available.

Link to comment

Thanks for the info. I was wanting to only run the Dedicated Server software witch dose not require any graphics drivers at all. Its just a command prompt based server while the client still handles all the rendering. Steam is not even needed for it and there are Win/Mac/Linux versions of the Standalone Dedicated Server. Would it be possible to build one just for that? Maybe even a super light Ubuntu Docker just to run the server console?

Link to comment

Thats awesome. The downside is (for me anyway) Im running a vanilla dedicated server (without TShock). But the deeper I go into getting this server up and running it looks like I may have to start using it. Another issue is that you have to wait for TShock to be updated once an official Terraria patch has been released.

Link to comment
  • 2 months later...

Not sure about your original link, but there is a different docker release for a dedicated Terraria docker found here: https://github.com/ryansheehan/terraria


I converted it using the Docker Search plugin in Unraid, and it seems to be operational, but I can't figure out how to run it and pass through my world. Hopefully someone else can chime in with more success.


If you run this from the command line it works and you can create a world. It would be nice if someone created a container for this and for tshock so that you could admin terraria server from a website via tshock. I keep wanting to look into it but I don't have the time. (Paging sparklyballs :):))

Link to comment
  • 1 year later...

I have been messing around with getting a Terraria server running as a docker in unraid


So far I have found the closest to being successful i have been is this docker



Add that using community apps, set a path for it to save stuff in your appdata folder, and wait a minute or two for it to generate the world


on my pc i join at [unraidserverip]:7777


it will briefly run then it crashes with some exception that is beyond me...  if anyone who knows what they are doing could look into this and see if its an easy fix to get it working, would be so awesome!

Link to comment
  • 2 weeks later...



I forked a different terraria docker, tinker tinker a bit...


But it works!


Add this repo to your docker template repositories



Then add the container from the option that will appear in your template list, configure it like my screenshot


Once the it builds successfully, give it another 5 minutes to generate the world

Then join using your terraria client at [unraidserverip]:7777


For some reason its laggy as hell and plays in slow motion until you turn frame skipping on in the video settings menu, but then it plays fine



*note* i have absolutely no idea what I am doing and I probably did everything wrong,

  • I forked another terraria docker which worked but was way out of date and tinkered with it,
  • created a docker xml thing and tinkered with it some more,
  • created a hub.docker.com account (im not sure what this is for... but i noticed everyone else had one so i did it too)   somehow got them linked and did *stuff* eventually it built successfully
  • and after that it loaded in Unraid properly


If someone wants to tell me how to make this better, fix any issues, and generally setup a docker template properly please give me simple instructions


Edited by MulletBoy
Link to comment
  • 1 year later...

Sorry for thread necromancy, but I have also done a successful (and very well performing it seems) docker instance of Terraria.


I used 'ryshe's version - https://hub.docker.com/r/ryshe/terraria/ 


I added this docker manually, with no template. It installed fine, I added a couple of things (such as a share for the /world) and ran it.

To do this (unraid 6.5.2):

  • Go to your Docker tab in Unraid GUI and click 'Add Container'
  • Instead of selecting a template, leave it saying 'select a template' 
  • Fill in the name.. This is the name of your Docker container, you'll need this later so keep it simple
  • In 'Respository' add "ryshe/terraria" (without the quotes). This tells Docker to pull down the build from ryshe's dockerhub page
  • Leave network type as bridge
  • Click "Add another port/path/variable/label or device" and add the following 2 items:
  1. Port for UDP 7777 (host and container the same) + port for TCP 7777 (host and container the same)
  2. A Path called 'world', container path = /world, host past = /mnt/user/appdata/terraria/world 
  • On your first run of the server, you need an 'Extra Parameter' of "-dit", which is explained below 


What took me a long time to understand was the 'interactive' part - which essentially is hidden from us using unraid GUI to launch containers.  The way to make sure this option fires up at all is to add "-dit " to the 'Extra Parameters' field.


Once it was running (via gui, i.e. I clicked Apply and it ran) - I went into my Unraid box CLI and entered 'docker ps', found my Terraria container (called Terraria, this is the name I mentioned above) and entered 'docker attach Terraria'. This put me into that interactive shell, where I was able to generate a world - starts to feel good at this point. 


In order to make the world persistent (and tolerant of reboots/container restarts) - is to remove the '-dit ' from extra parameters - and replace it with "-world /world/your_world_name.wld" as a 'Post Argument'. This exact filename is up to you when you create the world, and you can find it by SSH'ing onto your Unraid server and cd in to /mnt/user/appdata/terraria/world - any worlds you create will be here. 


Overall, it works well and I'm happy for this thread existing in the first place :)


Edited by jmbrnt
Being more clear.. Again
  • Like 1
Link to comment
  • 8 months later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.