UPDATED: Linux Dedicated Server Startup Guide

  • I thought I would write a quick basic guide to get you up and running on a linux server.


    Preamble:
    I have a working knowledge of several distros of linux but I always prefer Ubuntu LTS flavors.
    I purchased VPS services from a reputable, trusted company that I have used before.
    I chose x64 architecture and Ubuntu 12.04 lts.


    The VPS specs:

    • Quad Core
    • 6GB Memory
    • 30GB Storage
    • 2TB Traffic Limit
    • 10Gbit Connection

    1. Everyone has their own methods of getting around linux on a remote server
    but here I will be using what I used to get through this.


    Download an SSH client of your choosing. I prefer Putty. You can find it http://www.chiark.greenend.org…atham/putty/download.html


    2. Connect to your remote linux server. (I log in as "root" and do my "business", when everything is as it should be, you can start buttoning down your server for more security.


    3. Download the dedicated server files. (The zip will contain dedicated server startup scripts for windows, mac & linux.


    4. Install JAVA on the dedicated server. PLEASE NOTE: You may have to use "sudo apt-get"

    • apt-get update
    • java -version (check to see if java is already installed, and what version if so)
    • apt-get install default-jre
    • apt-get install default-jdk
    • apt-get install openjdk-7-jre (I'm not 100% positive this is needed but it won't hurt your server nor slow it down)
    • apt-get install openjdk-7-jdk
    • apt-get install python-software-properties
    • add-apt-repository ppa:webupd8team/java
    • apt-get update
    • apt-get install oracle-java7-installer ((( I could not get the linux startup script to run without installing the oracle JDK ))))

    5. Install "Screen"

    • apt-get install screen

    6. At this point lets test the server and its dependencies (JAVA) to see if everything is working like it should.

    • start the server with:
      Code
      java -Xmx1G -Xms32M -jar server.jar

      in the terminal.

    • PLEASE NOTE THAT THE Xmx and Xms variables should reflect the amount of memory you have/want to use.
    • Xms = START the server with certain amount of memory. Example: Xms1G this = 1 Gigabyte (start the server with this minimal amount of memory) [format is numerical amount, followed by delegated M for megabytes, G for gigabytes etc]
    • Xmx = GIVE the server this defined MAX amount of memory when needed. Example: Xms6G = 6 Gigabytes
    • you should get server success, if you do not then chances are that you don't have all the JAVA repositories/dependencies that you need.
    • Reboot the server here and log back in via your chosen SSH client.
    • I highly recommend you change your SSH listening port from the default to avoid brute force SSH attempts, and believe me sooner or later it WILL happen.
    • I also recommend a package called fail2ban to auto block ip's of people who are trying to attack your server.


    7. Edit the "server.properties" file with your desired settings. (WILL INCLUDE MORE DETAILS HERE FOR YOU WHEN FINISHED)


    8. You will need to "cd" to the directory where your dedicated rising world server files are located and start the script OR use the java start method mentioned above and you should be ready to rock with your server showing up in the server list via "Multiplayer" in the game.


    9. Now if you have configured everything and started the server with

    Code
    java -Xmx1G -Xms32M -jar server.jar

    followed by success and connected to server hive, then we know it works.


    I welcome contributions and input on this so we can clean it up and make it something worth reading to people interested in running their own server.





    Epic Insomniacs Rising World!


    Come have some fun @ 62.213.195.243:4255 or find us in the server list:
    [420] Epic Insomniacs Rising World Server


    Edited 3 times, last by Droophoria ().

  • AFAIK, some steps are not necessary, and while you install "screen", you never make use of it :) The server actually comes with a Shell script to launch the game with "screen".


    ** 2016-01-30 : You need to install Java 8. Support for Java 7 has ended last year. **


    1. Install Oracle Java 8


    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer oracle-java8-set-default


    2. Install dependencies


    apt-get install screen python-software-properties mysql-server


    3. Download dedicated server file here
    4. Extract files (ex: /home/$USER/risingworld) and edit server.properties


    NOTE : When using MySQL, use the root user by default. For more experienced users, create and configure your Rising World Server user accordingly.


    5. Start server


    cd ~/risingworld
    ./linux_startscript.sh start


    If everything worked fine, running ./linux_startscript.sh status should display information about the server running normally.


    6. For advanced users only, create an init script


    Note : this script has not been tested, but should be a good ground for starting. Feedback appreciated!


  • I am trying to log in using the linux_startscript.sh but I keep getting the "No Server title set" and then it exits. My linux_startscript is below. I have also altered all the names in the server.properties to the same naming scheme. I have probably made stupid oversight here but I am trying to learn Linux as I go with this. Thank you for help.



  • I am getting a weird java error after following these steps to the T twice.


    Here is the Java error:


    Also, if I wanted to move my local LAN server to this Mint server, what would I need to do?


    Linux Mint 17.3
    3 GB RAM
    Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz

  • java version "1.7.0_80"
    Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)


    I'm wondering if this new distro of Linux Mint has some other Java in it and I can't see anything other than version 7 installed so... I think JDK 8 is still beta though so that wouldn't be on there anyways.


    Edit: Java 8 is released, I wonder if I pushed 8 if it would work.

  • java version "1.7.0_80"
    Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)


    I'm wondering if this new distro of Linux Mint has some other Java in it and I can't see anything other than version 7 installed so... I think JDK 8 is still beta though so that wouldn't be on there anyways.


    Edit: Java 8 is released, I wonder if I pushed 8 if it would work.


    Yes. If you search the keyword "Java" on this forum, you'll find some post talking about it. I updated my first post to reflect that.

  • Worldpart generating...
    08/16/2016 04:32 PM server.Main
    SEVERE: Fatal error occurred!
    java.lang.OutOfMemoryError: Java heap space
    at java.util.ArrayList.<init>(ArrayList.java:152)
    at r.u.a(SourceFile:799)
    at r.u.a(SourceFile:704)
    at r.l.a(SourceFile:279)
    at r.l.a(SourceFile:579)
    at r.l.a(SourceFile:198)
    at server.util.a.a(SourceFile:144)
    at server.c.a(SourceFile:1192)
    at server.c.a(SourceFile:1098)
    at server.c.a(SourceFile:940)
    at server.Main.c(SourceFile:437)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)


    Fatal error occurred!
    java.lang.OutOfMemoryError: Java heap space
    at java.util.ArrayList.<init>(ArrayList.java:152)
    at r.u.a(SourceFile:799)
    at r.u.a(SourceFile:704)
    at r.l.a(SourceFile:279)
    at r.l.a(SourceFile:579)
    at r.l.a(SourceFile:198)
    at server.util.a.a(SourceFile:144)
    at server.c.a(SourceFile:1192)
    at server.c.a(SourceFile:1098)
    at server.c.a(SourceFile:940)
    at server.Main.c(SourceFile:437)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)



    Uncaught exception thrown in Thread[jME3 Headless Main,5,main]
    Shutdown 1 database threads...
    08/16/2016 04:32 PM x.a
    INFO: DatabaseTaskManager stopped!









    hello guys wat is here the problem i try to update my server en than i got this :p

  • @'LordFoobar


    I can't get the init script you wrote to work. There are a few typos, ex daemon is typed deamon, but that was easy to spot. The error i see in journalctl is " /etc/init.d/risingworld: 40: return: Illegal number: exec"


    The linux_startscript.sh works fine. Its the init script that isn't working for me. I will post the line that is giving the error below.



    Code
    return exec su -l $USER -c "$DAEMON start" # $DAEMON_ARGS"

    I commented out the daemon_args just to make sure that wasn't the problem.

  • Is it possible to run a dedicated server on a virtualbox guest machine?


    Naturally using NAT or network NAT and port-forwarding to port forward all the needed ports to host. In such a case the client should be connect to localhost, otherwise it is always possible to use Bridged Network configuration, giving the guest an network interface on the LAN.


    I should have enough CPU computing power (intel i7-4820K) and RAM (16GB) to make it working...


    Have you already done any trial about installing it in a virtualbox guest machine?



  • why?


    you can run lan/dedicated server on windows, mac and linux

  • Most gaming servers out there for rent are virtual machines so I don't see what issues you'll have as far as resources go. As long as your virtual network adapter is bridged to the physical adapter, you should be able to run two IP addresses on a single device. Assuming this is your home gaming machine, just open up the necessary ports on your router and you're good to go.


    Just keep in mind that depending on how many people you plan to host for, you'll easily eat up 4GB of memory or more.

  • why?


    you can run lan/dedicated server on windows, mac and linux

    Because if it works, the server becomes indipendent by the host than the actual hardware and host OS that is running it, that is:

    • easier to mantain.
    • easier to migrate hardware and host OS.
    • easier to scale up and down. 8)

    EDIT: I can confirm that it runs round and smooth, :thumbsup:


    Right now I am reading docs and infos on the forum to configure the server to tune the gameplay experience.

  • hello alls i god problems with the update



    this is what i got when i try to start


    Start context...
    java.sql.SQLException: failed to load commons/definitions/definitions.db: java.io.IOException: failed to remove existing DB file: /tmp/sqlite-jdbc-tmp--1748519013.db
    at org.sqlite.core.CoreConnection.open(CoreConnection.java:181)
    at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76)
    at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:26)
    at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24)
    at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
    at org.sqlite.JDBC.createConnection(JDBC.java:114)
    at org.sqlite.JDBC.connect(JDBC.java:88)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)
    at d.a.a(SourceFile:46)
    at commons.definitions.Items.<clinit>(SourceFile:57)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at server.Main.b(SourceFile:374)
    at server.Main.initApplication(SourceFile:278)
    at commons.JIWApplication.initialize(SourceFile:236)
    at com.jme3.system.NullContext.initInThread(NullContext.java:87)
    at com.jme3.system.NullContext.run(NullContext.java:130)
    at java.lang.Thread.run(Thread.java:748)
    java.lang.NullPointerException
    at d.a.a(SourceFile:84)
    at commons.definitions.Items.<clinit>(SourceFile:59)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at server.Main.b(SourceFile:374)
    at server.Main.initApplication(SourceFile:278)
    at commons.JIWApplication.initialize(SourceFile:236)
    at com.jme3.system.NullContext.initInThread(NullContext.java:87)
    at com.jme3.system.NullContext.run(NullContext.java:130)
    at java.lang.Thread.run(Thread.java:748)



    thanks for helping :p

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!