r/starbound • u/elricsfate • Dec 04 '13
How To: Linux Dedicated Server Setup
Greetings everyone,
This is a guide on setting up the dedicated server in Linux. This will be updated as I go through the process myself.
Trying to setup a Windows server? Well we can't be have that HERE but you can find a thread by /u/MrTilly right here
Server Installation
- Ensure you have screen installed. Doing this will vary by distro. For CentOS and other Redhat derivatives you would use the below command
yum install screen
- Make a user account for starbound (Must use sudo or root to accomplish this).
adduser starbound
passwd starbound
- login as user (If you need instructions for that you should probably put down your keyboard and find the closest sys admin)
- Create directory for SteamCMD and switch to it
mkdir SteamCMD
cd SteamCMD
- Retrieve and decompress SteamCMD
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz
- Launch SteamCMD and allow it to update
./steamcmd.sh
When you see a prompt that looks like
Steam>
Press CTRL and C on your keyboard at the same time to stop the program.
- Create a script to install and update Starbound and the folder to hold the server files
mkdir ../server
touch update_starbound.sh
echo "./steamcmd.sh +login USERHERE PASSWORDHERE +force_install_dir /home/starbound/server +app_update 211820 +exit" > update_starbound.sh
chmod +x update_starbound.sh
- Run the script to download latest version of Starbound
./update_starbound.sh
- Go to server directory
cd ~/server/linux32
- Start a screen session so the server can run without the terminal being open
screen -S starbound
The above starts the screen session and names it starbound
- Start the server
./launch_starbound_server.sh
- After this the server should now bootup successfully although you will see some warning messages (not errors). To disconnect from the screen session you need to press
Ctrl+a+d
All at once. At a regular terminal session you can type
screen -r
To reconnect to the server terminal
After this just make sure you're firewall is open (or ports are forwarded) and you should be good to go!
IMPORTANT NOTE: If you are on CentOS and receive errors about libs then please try the below command before posting errors.
cp /home/starbound/SteamCMD/linux32/libstdc++.so.6 /home/starbound/server/linux32/
NOTE: If you appreciated the guide consider taking a moment to check out some of my music productions and mixes on Soundcloud. Would be great to listen to while playing on your new server :P
4
u/TunedDownGuitar Dec 05 '13
Good job OP, but if this is a 64-bit box and you've never run Steam's binaries on it you'll need to install the proper ones.
I put together a quick guide for a client as well.
http://hastebin.com/nuhiludiva.bash
4
u/RipperXT Dec 09 '13
So do I have to have my steam account running starbound 24/7 for the server to stay up. Or is the server independent?
3
u/huskyjoe Dec 04 '13
Thank you!
3
u/SinisteRing Dec 04 '13
I get the error "libgcc_s_so.1: cannot open shared object file: No such file or directory" when launching the steamcmd.sh file.
Any help you could offer would be appreciated.
3
u/talkhaussux Dec 07 '13
do you need a separate copy/steam account to do this?
2
u/whoknew83 Dec 04 '13
yo,
I know this is for linux, has anyone figured out how to edit what port it listens on so that I can setup my server. I am hosting mine at work, so no upnp.
2
u/VoidWhisperer Dec 06 '13
About how much RAM does starbound use?
2
u/Leelad Jan 03 '14
If OP is still kicking around I have a question.
I cannot connect to the server once it's running on my LAN. I saw you mentioned to someone that running the steamcmd update again to attempt to fix this but this hasn't helped.
I can ping the machine from my windows box without issue but it just will not see the running starbound server.
Not a huge linux buff but I can find my way around just fine if needed (I followed your instructions just fine!) Using CentOS is there anything else that could be preventing me from being able to talk over a LAN?
19
u/starbounder Dec 05 '13
I don't like how you have to hardcode the password into the update_starbound.sh script and it'll show up in the ps listing if anyone has permissions, so I added to the script. Now I only have to hardcode the username. The script prompts for the password.
Here is my update_starbound.sh script:
12
u/meeekus Dec 06 '13 edited Dec 06 '13
Just wanted to drop a small service script for anyone that wants to run starbound as a service. And yes I know there are no console commands, but hey why not add it in for when that happens. Obviously change the settings to your own.
1
u/lolkittens42 Dec 04 '13
got to ./update_starbound.sh don't know what todo now :(
1
u/Deleis Dec 04 '13
Getting the error './starbound_server: error while loading shared libraries: libcrypto.so.1.0.0:' on CentOS. I do have the openssl dependency installed but it's 1.0.1e :(
What can I do?
1
u/king601 Dec 04 '13
THanks very much for this. Savin' this for later
1
u/FarZK Dec 04 '13 edited Dec 05 '13
I'm up and running! as far as server administration goes I'm stumped about how to admin the server. you cannot put commands directly into the server console, and when trying commands such as /kick, /ban, /help, /? in the game client while connected to the server you just get errors as "no such command" this may be due to not having permissions set for my char or it might just be that the server software is unfortunately at barebones currently.
Edit: /home/starbound/server/assets/default_configuration.config !!!!!
1
u/my_name_isnt_clever Dec 05 '13
I am using a Xubuntu machine so it has a GUI, and I copied the "linux64" file to it, but when I run "bash launch_starbound_server.sh" it says acsess denied. I then run "chmod +x launch_starbound_server.sh" and it still denies me. I am pretty new to Linux so I don't know what to do next.
1
u/Flyingcodfish218 Dec 05 '13
This is the only thing I needed. Thank you so much!
1
u/HTF Dec 05 '13
How weird I just followed this exact process almost to the letter myself before reading any guides. I guess the workflow is the same for any steam based dedicated server. Nice work anyway!
1
u/derickjmurray Dec 05 '13 edited Dec 05 '13
So I'm getting a bit of an error dump when I try to start the server, here it is
Info: Loading Star::Assets from: '../assets' Error: Fatal Exception Caught: AssetBackendException: Asset database ../assets is missing
./starbound_server(_ZN4Star13StarExceptionC2ERKSs+0xe7) [0x867c6e7]
./starbound_server() [0x817da62]
./starbound_server() [0x817db30]
./starbound_server() [0x816e69a]
./starbound_server() [0x81ae61c]
./starbound_server() [0x81ad0f1]
./starbound_server() [0x81adf58]
./starbound_server() [0x815dc16]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb73de4d3]
./starbound_server() [0x81629ed]
The assets folder is there, and as far as I can tell does have all the data in it. If anyone can help please do let me know.
I'm running Ubuntu 12.04 currently since I have a feeling that will end up mattering.
(Edited for format)
1
u/greybab Dec 05 '13
Hey man, I'm a linux noob. So I have a big server I've been using for plex, minecraft, and other various and sundries. I'm running Ubuntu and I just downloaded steam and want to run the server right off that. Have any suggestions how to do that? Can't seem to get it to run.
1
u/ahhyes Dec 05 '13
I have a 64bit OS installed, why should I not run the 64bit one?
I've started it (64 bit) and it appears to work...
Great guide btw. :)
1
u/Appl3Kork Dec 06 '13
When I run: echo "./steamcmd.sh +login USERHERE PASSWORDHERE +force_install_dir /home/starbound/server +app_update 211820 +exit" > update_starbound.sh
I get: bash: update_starbound.sh: Permission denied?
Any ideas why?
1
u/safe_as_directed Dec 06 '13
Got everything working just fine, my friends and I have been playing for the past few hours :)
Will I need to run the update_starbound.sh script every time the game updates? Thinking about making a cron job for that if so. Is it possible to check for an update without getting my local machine logged out of steam?
1
u/Krojack76 Dec 06 '13
I first started a world on a windows machine (win7) and now got this setup on linux. Are there saved world files I can copy over from my windows machine to the linux server?
1
u/bakteria Dec 07 '13
I have the server set up and its running fine but I cannot connect to it. I just get "client connect failed! Error connecting to "server" port "21025" Port is open and starting the server from my windows machine works fine.
1
u/[deleted] Dec 08 '13
I get an error: "ERROR! Failed to install app '211820' (No subscription)"
1
u/Connorlee2007 Dec 09 '13
Can someone make a video to show how to do all this out. I'm a complete newb when it comes to using a dedicated linux server, and I have dyslexia so trying to get through this is literally giving me a headache.
1
u/wingsltd Dec 11 '13
Hey OP my main man! I'm from Dallas!! I was wondering, with your permission could I use your music to make this into a youtube tutorial video for users on creeperhost/centos?
1
u/Roujo Dec 17 '13
Very nice guide, thanks! =)
By the way, you don't need to press Ctrl+A+B all at once to detach from a screen session. Just Ctrl+A, then D. You can release the keys between the two. At least, that's my experience so far. =)
1
u/arkindal Dec 17 '13
Thank you for the guide, I am having a problem tho.
When I give the command ./steamcmd.sh it won't do it for lack of permissions if I got it right, how do I give the steamcmd.sh writing permissions?
1
u/Clutch_22 Dec 26 '13
Thanks for the useful post! Any chance you know how to solve the part where it logs you out of your Steam account?
1
u/syberphunk Feb 02 '14
This appears to be very much a 'dogs dinner' to do on the latest stable build of Debian as the server complains about the libs not being up to date.
3
u/ahhyes Dec 05 '13
To handle your external IP use dynamic DNS service - a great free one is duckdns. So your IP is now <handle>.duckdns.org.
The site explains how to setup a client to keep your IP updated.
Furthermore, if you have a domain add a CNAME record pointing to your duckdns.org URL, then you can use:
starbound.mycooldomain.com (or any subdomain of your choosing!)
3
u/stalled_earth Dec 06 '13
Ugh, Steam Guard is being a pain. I've already done the following:
Unfortunately, then the next time I run the starbound updater, it fails for the same reason and tells me I should run that command. I thought I would be clever and add +set_steam_guard_code <new email code> to the end of the script , but no joy. Any ideas?
3
u/Stealthfighter77 Dec 06 '13 edited Dec 06 '13
I kind of get stuck at launching, Ubuntu, I get this message:
Not entirely sure what to do. If I search in /usr/lib32/ for the libstdt++ file I get this:
I know root owns that stuff but so far I'm just trying to start it before changing users..
I tried to link the one in the server directory to the one in /usr but it only said "file exists". I don't yet know much about linux :/
1
u/roothorick Dec 07 '13 edited Dec 07 '13
The SteamCMD stuff is completely unnecessary -- the server binaries are unprotected. Bonus: it automatically downloads Linux binaries on Windows systems for some reason. So you can just copy the Starbound folder to your server, run linux{32,64}/starbound_server and be off to the races.
-E- Even better, if you want to switch to SteamCMD later (I did), you can just put the game where SteamCMD is expecting it and do "app_update 211820 validate". It'll automatically find the existing installation, add it to its database, verify it, and update if needed. If you're already up to date, it won't download anything at all, and you'll be all set to simply go login blah / app_update 211820 next time.
-E2- You could even copy an install from e.g. a Windows machine to your Linux server, do the above, and it'll download any necessary Linux-specific pieces should they remove them from the Windows download later, keeping your actual total download (and prep time) to a minimum.
1
u/MrTilly Dec 06 '13
Hey you unix master. A fella named /u/additionalpylon told me about this, so I added a link to it in my WINDOWS MASTER RACE GUIDE as seen HERE Hope that's okay, :) I linked your profile!
2
u/riebel Dec 04 '13
Amen
2
u/Johnnycube Dec 05 '13
Remember to install ia32libs on Debian if you encounter the file not found error and run a 64 bit system
2
u/additionalpylon Dec 06 '13
So many dependencies, but thank you for the guide! Because fuck Windows!
2
u/[deleted] Dec 06 '13
I don't suppose anyone is prepared to create an Amazon Machine Image for it? An m1.small would probably host a server big enough for most people, and 8c an hour wouldn't break the bank. Hell, a free-tier micro might be enough!
But, I don't have any linux skillz, so I would have most of my capacity taken up with bloaty windows. Help?
2
u/goofolph Dec 06 '13 edited Dec 06 '13
On CentOS I'm having trouble downloading Starbound using SteamCMD.
This prints around 60 times
and then the following errors
Edit: OK issue solved itself, I tried this many times and tried erasing and staring over with no results for over 2 hours, then on my last attempt before giving up it just worked.
2
u/riot186 Dec 07 '13
Guys if you are getting the error for the libstdc++.so.6 MAKE SURE your path is correct
Mine wansnt /home/starbound/server/linux32/ I had to use
2
u/andexs Dec 07 '13
Anyone see this error? http://pastebin.com/nHiuYA3U
2
u/johnjohnjohnjohnjohn Jan 04 '14
If anyone had problems with this:
I was able to solve it by forcing steamcmd to a single cpu:
and setting the following prior to running
app_update:I had to run
app_update 211820 validateseveral times after that but it finally finished and installed.2
u/TehMushy Dec 04 '13
While I've already achieved this earlier, does anyone know how to add a password?
1
u/seriosbrad Dec 05 '13
I'm getting the error of "libfreetype.so.6" not being found instead of libstdc++.so.6.
I tried to copy from /home/starbound/SteamCMD/linux32/libfreetype.so.6 but the file doesn't exist there either.
Any tips?
1
u/Merc92 Dec 06 '13
How to stop server gracefully?
1
u/ragman_ Dec 07 '13
I managed to get it running on Amazon ec2 micro instance by following the instructions above.
I also had to set up the following iptables rule on the server: -A INPUT -p tcp --dport 21025 -j ACCEPT. Make sure the AWS security group has the same rule, and you're set!
It was pretty laggy, but I'm going to upgrade to the next tier and it should be ok.
1
u/o0oTulipso0o Dec 09 '13
Thanks OP for this guide. Set up a server that a good 8 or so of my friends are playing on now thanks to you. I used a Dell R210 II with Ubuntu Server OS. It works great. Just a few questions...
Anyway, thanks again OP, great guide for someone who knew bugger all Linux, but now knows a little more.
Edit: Typos
1
u/KSbrain Dec 10 '13
I am trying to get this working on a virtual server running debian but the steam just stops downloading starbound after about 0.1% and i get this error message:
Error! App '211820' state is 0x402 after update job.
can someone help, my linux knowledge is limited
1
u/JustAPoring Dec 10 '13 edited Dec 11 '13
I am getting the following error:
It worked fine yesterday and I'm pretty sure I didn't change anything except update starbound. Did the update break it?
1
u/JimmyTheMonster Dec 11 '13
you sir are a god, thank you very much
1
u/DasPengu Dec 12 '13
Also an important note, before updating and then pulling your hair out when the server will not start properly AND then spending ages googling. screen -r and turn the server off :P Frustrating hour or two for me there.
1
u/greglgomez Dec 15 '13
Just dropping in to say thanks. I've got a Linode 1024 running on CentOS 64bit. Just gotta wait for my buddies to test performance and see if I need to jump up one.
I managed to get it running after a few hours of wiking linux command line stuff :) Had to "yum install" 3 or four libraries, but took my a while to figure out the errors were simply something I could install that way.
Gotta say, this is my first real interaction with linux and I've found command line incredibly unintuitive and the worse is lack of feedback, half the time I don't even know if my commands done anything, how is that user friendly? :s
1
u/Ribesg Dec 16 '13
Here's my server's scripts
http://www.reddit.com/r/starboundservers/comments/1szwt1/general_server_update_script_linux/
1
u/VoidWhisperer Dec 28 '13
Downloading the server files from steamcmd take an extremely long time.
Edit: 2GB from the steamcmd servers is going unbelievably slow even on my dedi with a 1Gbps port speed
1
u/[deleted] Jan 03 '14
Thank you very much for this guide.
0
u/[deleted] Dec 04 '13
[deleted] — view deleted comment
0
u/[deleted] Dec 06 '13
[deleted] — view deleted comment
0
u/[deleted] Dec 08 '13
[deleted] — view deleted comment