1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Discussion How to: Set up a linux server on ubuntu

Discussion in 'Multiplayer' started by sovredcat, Dec 4, 2013.

  1. sovredcat

    sovredcat Big Damn Hero

    Hopefully this is useful for some of you :)

    This tutorial assumes you have some basic knowledge of Linux and is based upon Ubuntu 12.04. This tutorial will work if you are completely new to Linux so don't be discouraged.

    What you need:
    1) An VPS or dedicated server with Linux on it.
    2) SSH access to it.

    First we need to login to SSH, we will be using Putty to do this. Simply download it, put it on your desktop and start it up. Then input the IP of your vps/dedi, press 'open' and continue to login.

    We will be using SteamCMD to download the dedicated server, for more info check https://developer.valvesoftware.com/wiki/SteamCMD

    First we need to move to our home directory, then make a Steam folder there.
    Code:
    cd /home
    mkdir steam
    cd steam
    

    Now we need to download SteamCMD and unpack it.
    Code:
    wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
    tar -xvzf steamcmd_linux.tar.gz
    

    Now we will remove the tar.gz file we downloaded and run SteamCMD.
    Code:
    rm steamcmd_linux.tar.gz
    ./steamcmd.sh
    

    Let it update, and wait till you see "Steam>", now you can type Steam commands, let's login to our account first:
    Code:
    login your_steam_user_name your_steam_password
    This will log you in into your Steam account. If you have Steam open on any other computer (like the one you are on right now), you will be logged out.
    SteamCMD will now log you in using your account you bought Starbound on, and it will most likely ask you to input a Steamguard code if you have set that up, simply follow the instructions on screen to continue.

    After logging in type:
    Code:
    force_install_dir ./starbound
    Assuming you are in /home/steam this will make a folder called starbound inside /home/steam/starbound, now type:
    Code:
    app_update 211820
    This will download and update Starbound, wait till it finishes (might take a while depending on how fast the connection is).


    Now we can safely exit SteamCMD using the following command:
    Code:
    quit

    After it's downloaded we can now run the Starbound server. Depending on whether your Linux operating system is 32 or 64 bit we need to move to the correct directory.
    I am using 64bit so I will type "cd /home/steam/starbound/linux64" to get to the right place. Now we can launch the startbound server using the following command:
    Code:
    ./starbound_server

    But before you do that I would suggest running that in screen, as followed:
    Code:
    screen -S starbound -d -m ./starbound_server
    Using screen will basically run the Starbound server in another window (screen), you can enter and exit this screen at any time, might be a bit confusing at first but you'll get the hang of it.

    "starbound" is the screen name.

    If you accidentally ran starbound_server before running it in screen press CTRL + Z to close it.


    Type the following to enter the screen:
    Code:
    screen -d -R starbound
    Press CTRL + A then CTRL + D to exit the screen without shutting down the starbound server.


    Type the following to get a list of screens:
    Code:
    screen -ls

    And type the following to shutdown (kill) the server and the screen at the same time:
    Code:
    screen -S starbound -X quit

    To update the server repeat the following steps:
    Code:
    cd /home/steam
    ./steamcmd.sh
    

    Then:
    Code:
    login your_steam_username your_steam_password
    force_install_dir ./starbound
    app_update 211820
    quit
     
    Last edited: Apr 9, 2014
    Rumble Bot, newdark, Usiemon and 9 others like this.
  2. akaikee

    akaikee Space Spelunker

    Lets hope it helps! Im gonna give some feedback if it works!
     
  3. sovredcat

    sovredcat Big Damn Hero

    Good luck! If anyone knows how to change the amount of players slots let me know... I have no idea either what it is by default. Or password, or anything for that matter.
     
  4. necrogami

    necrogami Yeah, You!

    This also assumes your linux server has a gui... most dont
     
  5. sovredcat

    sovredcat Big Damn Hero

    What? I did this through SSH.
     
  6. necrogami

    necrogami Yeah, You!

    How is steam starting without x?
     
  7. sovredcat

    sovredcat Big Damn Hero

  8. SeanWcom

    SeanWcom Void-Bound Voyager

    Should we use this method rather than just copying the files up and running the server? Is there a benefit to having the server logged into my steam account?
     
  9. nebiz

    nebiz Intergalactic Tourist

    Will this require your steam account to be logged in once you have the server installed and running?
     
  10. love doctor

    love doctor Cosmic Narwhal

    cant seem to get it to work via copying the files so this method may work better
     
  11. Syntax42

    Syntax42 Pangalactic Porcupine

    Using the SteamCMD to add the files to your server can be helpful in case of future updates. You don't use Steam to launch it--only to download the files and update them in the future.

    In the tutorial above, you can skip the creation of the .txt file if you just put those commands in SteamCMD directly when it is running. Some might find it a bad idea to save unencrypted passwords on their drive.

    I was able to get a server set up using Ubuntu 12.04 LTS server (not desktop) on an old 32-bit Xeon machine I have. The instructions above are accurate. I did not force an install directory. Instead, I allowed SteamCMD to install in the default location, which is inside the user's home folder in Ubuntu ( /home/<username>/Steam/SteamApps/common/Starbound ).

    A tip for those using SSH to control their server: learn to use Screen!
    https://help.ubuntu.com/community/Screen

    Before you launch your server app, type screen and hit enter. Now, launch it. While it is running, you can press Ctrl+a then press d to detach from the screen and it will run in the background, allowing you to perform other tasks. To return to your screen, type "screen -r" or if you have multiple screens running, type "screen -ls" then "screen -r 1234" replacing 1234 with the process number of your screen. To end the a screen, return to it and press Ctrl+a then type :quit and press enter. Only do this after ending the server program by pressing ctrl+c first.
     
  12. sovredcat

    sovredcat Big Damn Hero

    You can copy files I suppose yeah, but it's nice to use steam cause you can update it by typing a command.

    No.
     
  13. Thanks for that but I'm not fine installing Steam on my linux dedicated server, they will probably add later an auto update feature something similar that you see in King Arthur World server. They will probably so provide a way to download the server software from the site too so we are able to wget it easy because uploading like 700MB is a bit heavy for my small upload connection, like 1h40 at 100Kb/s upload huhu

    Yet I just packed linux64 and assets myself and deleted linux64/starbound to save 300MB
     
    supernet2 likes this.
  14. FracOMac

    FracOMac Intergalactic Tourist

    ./starbound_server: /usr/lib/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./starbound_server)

    seems that I have CXXABI_1.3.3 anyone know how to update that?
     
  15. Interesting, are you using CentOS ? if that's the case will need to recompile gcc , I did this to solve similiar server issue for King Arthur's Gold server and CentOS machine where libstdc++ is a lower version
     
  16. ModeSix

    ModeSix Space Spelunker

    Anyone figured out how to set the password, set slots, server name etc?
     
  17. Syntax42

    Syntax42 Pangalactic Porcupine

    What operating system? CentOS is not compatible with a lot of libraries required for SteamCMD, and I suspect this is the case with the Starbound binaries as well. The easiest OS to use for this is Ubuntu.

    There is another thread on these forums with the server.config file information.
     
  18. darkinnit

    darkinnit Aquatic Astronaut

    Quoting that Tweet here for the lazy:

    "if you want to set a password on your server: assets/default_configuration.config edit the serverPasswords list."
     
    class101 likes this.
  19. can confirm you need rebuild a newer libstdc++ (through gcc) for it to work on CentOS, shouldn't be a problem on Debian/Ubuntu(they have newest libstdc++), will make a CentOS guide once I get my centos set
     
  20. FracOMac

    FracOMac Intergalactic Tourist

    Actually I'm using ubuntu 10.04.4 server. I'm guessing I'll probably just need to upgrade to the newer lts release. (never got around to it, since it hasn't been needed for anything and is supported until 2015)
     

Share This Page