Dedicated Server Setup [Java Version]

  • Requirements
    The Rising World Dedicated Server requires Java 8 to be installed, Java 9 is currently not supported. If using Linux, only 64-bit is supported.
    Please keep in mind that some dependencies need to be installed in order to run the server on Linux: https://developer.valvesoftware.com/wiki/SteamCMD#Manually


    It's recommended to have at least 1 GB of RAM (for small servers with very few players), for bigger servers (several players and/or large worlds) it's recommendable to have 4-8 GB of RAM.



    Download
    Currently the dedicated server files are only available through Steam. They can also be downloaded via SteamCMD: https://forum.rising-world.net/thread/7827/



    Run the server
    To run the server, it's recommended to use one of the server start scripts (win_startscript.bat for Windows, linux_startscript.sh or linux_screen.sh for Linux). On Linux, it's important to set the LD_LIBRARY_PATH environment variable to the "/linux64" folder in the server directory before launching the server.
    When using the start scripts, the amount of memory set for server_memory in the server.properties file will be allocated automatically. If you use your own start script, you have to assign the amount of memory manually (see the Java "-Xmx" argument).


    Java command to manually start the server (allocating 2048 MB of RAM): java -Xmx2048m -jar server.jar


    Important: It's necessary to restart the server at least every 24 hours :!:



    IP Address
    You can bind the RW server to an IP address. To do that, open the server.properties file and put the IP into the server_ip field. Alternatively you can provide the IP via argument to the server (see below), then the value in the server.properties file will be ignored. If you leave the field blank (default setting), the server binds to all addresses. Especially when hosting the RW server on your local machine (i.e. behind a router), it's recommended to keep the server_ip field blank, otherwise it might not work.



    Ports
    The server port can be set in the server.properties file. By default, the server uses port 4255. The http query port is always serverport-1 TCP (so when using the default server port, it's 4254).
    Please keep in mind that the server also requires the port range serverport to serverport+4 TCP and UDP (both protocols are required), so when using default server port, the server requires ports 4254, 4255, 4256, 4257, 4258 and 4259 TCP and UDP.


    If the RCON protocol is enabled (optional), the server also requires a separate port for the RCON protocol. By default, the server uses port 4253, but it can be changed to any other unused port (independently of the server port).


    When hosting the server on your local machine, make sure to forward the ports in your router :!:


    Examples:


    Query
    The http query port of the server is always serverport-1 TCP, i.e. when using the default port (4255), the query port is 4254. A http query returns a JSON string containing some information about the server (e.g. server name, player count etc).
    Alternatively you can also use the Source Query Protocol using UDP/IP packets. The query port is serverport UDP (do not use TCP!), so when using the default port setup, it's 4255. More information about the protocol can be found here: https://developer.valvesoftware.com/wiki/Server_queries


    If you want to query the server, never establish a TCP connection to ports serverport - serverport+4, since the server considers that connection as a client connection!



    Start arguments
    There are some start arguments available which can be passed to the server to override some server.properties settings. Format: +argument=value
    Example: java -Xmx4096m server.jar +maxplayer=4 +serverport=4255 +servername="My fabulous RW Server"


    Input commands
    There are some commands available which can be sent to the server process:


    MySQL vs. SQLite
    By default, worlds are stored in an SQLite database (i.e. ".db" files in the worlds folder). Optionally you can enable MySQL (but then you either have to convert the SQLite world manually, or create a new world). Both SQLite and MySQL have some advantages and disadvantages. When using SQLite, all data related to the world are stored in a separate subfolder in the Worlds folder, so it's easy to create backups of it or move it to another server. MySQL, on the other hand, can be faster than SQLite, but it requires a separate MySQL server (note that some world data - e.g. custom images - are still stored in the worlds folder).
    If you only run a small server with few players, it's recommendable to stick to SQLite. However, if there are several players playing on your server, it's still fine to use SQLite, but you may get a small performance boost when using MySQL (but keep in mind that once the world is converted to MySQL, you can't convert it back to SQLite).


    To enable MySQL, you have to set database_type in the server.properties file to "mysql", and enter the database_mysql_... credentials.



    Linux Game Server Managers
    If you run your server on Linux, you can use Linux Game Server Managers (LinuxGSM): https://linuxgsm.com/lgsm/rwserver/
    It provides an easy way to set up and manage the server, run updates, create server backups etc.

  • red51

    Changed the title of the thread from “Dedicated Server Setup” to “Dedicated Server Setup [Java Version]”.

Participate now!

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