Pre 1.2 Windows Dedicated Server Notes

Discussion in 'Guides' started by KingMegas, Jun 3, 2011.

  1. KingMegas

    KingMegas Cursed Man

    I setup a test Terraria dedicated server this morning at home. Here are some notes that might help someone setup their own. If you're looking to run a server on Linux there is already a thread for that.

    You can run a server without Steam being installed. I'm not encouraging people to rip off the game, but I believe strongly in not having to use Steam to simply run a console-based server. It's bad enough you have to install .NET runtimes. And, if you're taking the virtualization route to run your server on Linux, it should also keep the VM a little lighter.

    Anyway, all you need to do is copy the Steam game folder (usually located C:\Program Files\Steam\steamapps\common\terraria) to your server machine and insure that .NET 4.0 is installed. You might also need XNA, I installed both just to safe (can someone confirm?). You can get these from Microsoft's website, or if you're lucky, Steam will have left a copy of the installers in your Terraria folder. Files are dotNetFx40_Full_setup.exe & xnafx40_redist.msi respectively.

    Since Terraria will most likely have future updates, it's best practice to keep your server config file and world folder outside of the game folder. That way you can theoretically copy the new Steam game folder over the old one without losing your worlds or config files. You will need to alter your serverconfig.txt to point to the location where you choose to keep your worlds, since the default directory probably won't exist.

    Here is how I have mine setup:

    C:\TerrariaServer <- main directory
    C:\TerrariaServer\terraria <- Steam game folder
    C:\TerrariaServer\world <- this is where I keep the world files for my server
    C:\TerrariaServer\server.bat <- custom batch file that runs TerrariaServer.exe with my custom config
    C:\TerrariaServer\serverconfig.txt <- a copy of the config file, with my settings

    @echo off
    terraria\TerrariaServer.exe -config serverconfig.txt
  2. Doirdyn

    Doirdyn Green Slime

    Awesome, thanks for the assistance. Could you post the contents of your config so we can see the details of how the commands should be?
  3. Doirdyn

    Doirdyn Green Slime

    I figured it out. You should mention the following in your batch
    START C:\TerrariaServer\TerrariaServer.exe -config serverconfig.txt
  4. joel rufainge

    joel rufainge Green Slime

    wish you can explain this to me ! i am still trying to figure out ! that part
  5. Doirdyn

    Doirdyn Green Slime

    I'll explain.
    Go to and download the dedicated server software.
    Make a .txt file (with notepad or otherwise) and put the following into it:
    START (server software location, such as C:\TerrariaServer, wherever you decide to put it) -config serverconfig.txt
    When you save this, make sure it is in the same file as the server software (TerrariaServer.exe)
    Another side-note, make sure you save it as name.bat, and change the file type to "All Files"

    Now for the serverconfig.txt file:
    All that is necessary is as follows:
    Now with world= & worldpath=, you have to put the full location, I made it easy and just put mine into C:\TerrariaServer, when you generate a world, it'll be put into C:\TerrariaServer\world

    With all that explained: Make a shortcut of your name.bat file and put it on your desktop or something, click it and all your configurations in the above will be applied and your TerrariaServer will start up automatically
  6. GingerBreadMan

    GingerBreadMan Cursed Man

    I am having a hard time specifying the custom file path. I want mine within another folder in "My Documents" I have changed both respective references in the serverconfig.txt file and it continues to create the "My Games" default directory and create a world there. Am I missing something? I tried both "/users/default/etc.." and a full path of /users/MYUSERNAME/Documents,etc.."

    EDIT: I am an idiot lol. I just realized all the parameters were commented out by default! I guess I was used to simply changing values in configs, and not having to think about enabling them =P.
  7. Zaflis

    Zaflis Bone Serpent

    Actually what i do is just have shortcut to TerrariaServer.exe, not TerrariaServer.bat or anything that uses config files. That way you can customize those settings when starting up the server. Sometimes using password, sometimes not, usually using default port 7777, sometimes something else. Maybe sometimes let more than default amount of people join the server. You can't do that customization quickly with config files. It lets me have even 3 different servers running on different ports same time, all launched from same shortcut on my desktop.

    Also, you don't need to copy the Steam folder at all, but use that directly. serverconfig.txt is a guide file DO NOT EDIT IT! Steam can and will overwrite it on updates. Copy it over to myconfig.txt and use that if you really need to use a config file.

Share This Page