Difference between revisions of "Running your own server"

From LugdunonWiki
Jump to: navigation, search
(Setting up the server)
(Introduction)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{engine}}
 +
 
==Introduction==
 
==Introduction==
  
Line 8: Line 10:
  
  
==Setting up the server==
+
Starting with 0.1.1 of the standalone client and 0.6.3 of the server, a compatible 32-bit or 64-bit JRE is pre-packaged for you in the download.
  
 +
==Setting up the server==
  
If you are upgrading an existing installation, you can download just the <code>lugdunon-server.jar</code> [http://alpha.lugdunon.net/release/current/lugdunon-server.jar here].
+
The lastest server release is available for Windows, x86 Linux, and MacOS at [http://lugdunon.net/downloads.html lugdunon.net]. Once you have downloaded the correct archive for your operating system, decompress it in a convenient location.
 
+
Otherwise, the lastest server release is available as either a [http://alpha.lugdunon.net/release/current/lugdunonServer.zip .zip] or a [http://alpha.lugdunon.net/release/current/lugdunonServer.tar.gz .tar.gz] file. Once you have downloaded one of the two above archives, decompress it in a convenient location.
+
  
  
Line 19: Line 20:
  
 
* <code>/lugdunonServer</code>
 
* <code>/lugdunonServer</code>
 +
** <code>/bin</code>
 
** <code>/dat</code>
 
** <code>/dat</code>
 
*** <code>server.cfg</code>
 
*** <code>server.cfg</code>
** <code>lugdunon-server.jar</code>
+
** <code>/lib</code>
** <code>run.bat</code>
+
** <code>/logs</code>
** <code>run.sh</code>
+
** <code>run.bat OR run.sh</code>
  
  
Line 31: Line 33:
 
<code>
 
<code>
 
server.name=Your Server Name<br/>
 
server.name=Your Server Name<br/>
host       =ip address or host name to bind to<br/>
+
host           =ip address or host name to bind to<br/>
 
su.account =your super user's lugdunon account name<br/>
 
su.account =your super user's lugdunon account name<br/>
su.password=your super user's lugdunon account password<br/>
 
 
</code>
 
</code>
  
Line 81: Line 82:
  
  
If you do have any issues, please feel free send email to [mailto://lugdunondev@gmail.com lugdunondev@gmail.com] with any questions that you might have.
+
If you do have any issues, please feel free send email to [mailto://support@lugdunon.net support@lugdunon.net] with any questions that you might have.
  
 
To let your friends join your server you have to open the ports: ’41975′ and ’41976′. Then you can give your external ip to your friends and they will be able to join.
 
To let your friends join your server you have to open the ports: ’41975′ and ’41976′. Then you can give your external ip to your friends and they will be able to join.
Line 103: Line 104:
 
|required
 
|required
 
|The server super user’s account name
 
|The server super user’s account name
 
|-
 
|su.password
 
|required
 
|The server super user’s password
 
  
 
|-
 
|-
Line 276: Line 272:
  
 
|}
 
|}
 +
 +
[[Category:Server Hosting|Running your own server]]

Latest revision as of 16:41, 9 May 2017

Engine Content: This information applies to the engine and therefore to all servers.

Contents

Introduction

This page should hopefully make getting your own Lugdunon server up and running a little bit easier. It is assumed that you have at least some knowledge in basic networking, executing java .jar files, and how to use the command line.


The server does require java (preferably the latest version so that all the latest security fixes are available), but should run fine on earlier versions (1.6+). You can check your version of java by typing java -version on the command line.


Starting with 0.1.1 of the standalone client and 0.6.3 of the server, a compatible 32-bit or 64-bit JRE is pre-packaged for you in the download.

Setting up the server

The lastest server release is available for Windows, x86 Linux, and MacOS at lugdunon.net. Once you have downloaded the correct archive for your operating system, decompress it in a convenient location.


Your file structure should now look like this:

  • /lugdunonServer
    • /bin
    • /dat
      • server.cfg
    • /lib
    • /logs
    • run.bat OR run.sh


Now open the /lugdunonServer/dat/server.cfg file in your favorite plaintext editor and enter the following information into this file:


server.name=Your Server Name
host =ip address or host name to bind to
su.account =your super user's lugdunon account name


Note, to find out what your ip address is you can:

  • On Windows: open a console and type in "ipconfig /all" without the "".
  • On MacOS / Linux: from the console type in "ifconfig" without the "".

That should show you your IPV4. If you are planning on allowing other machines to connect, do not use your virtual loopback interface (127.0.0.1).


Save and close the /lugdunonServer/dat/server.cfg.


Once the above steps have been completed you should be able to launch the server by executing the provided run.bat file for windows or the run.sh file for unix/linux/macosx. On startup the server will recognize that it is missing a world definition and attempt to create a default one for you. If everything has been set up correctly, you should see the server start up cleanly and something akin to the following written to the console:


19/02/2013 17:58:42.744 INFO Successfully validated super-user.
19/02/2013 17:58:42.783 INFO World file doesn't exist. Creating default at SERVER_ROOT/dat/default.
19/02/2013 17:58:42.784 INFO Generating default world configuration.
19/02/2013 17:58:42.785 INFO Generating default terrain data.
19/02/2013 17:58:47.659 INFO Config file: etc/commands.json doesn't exist. Creating default.
...
19/02/2013 17:58:48.477 INFO Config file: etc/advancements.json doesn't exist. Creating default.
19/02/2013 17:58:48.553 INFO Manifest initialized with 61 entries.
19/02/2013 17:58:48.596 INFO ItemDefinitions initialized with 207 entries.
19/02/2013 17:58:48.604 INFO ItemCache initialized with 15 entries.
19/02/2013 17:58:48.604 INFO ItemCache initialized with 0 entries.
19/02/2013 17:58:48.606 INFO PlaceableItemCache initialized with 0 entries.
19/02/2013 17:58:48.607 INFO WaypointCache initialized with 0 entries.
19/02/2013 17:58:48.608 INFO NpcDefinitions initialized with 4 entries.
19/02/2013 17:58:48.687 INFO Advancements initialized with 27 entries.
19/02/2013 17:58:48.689 INFO NpcCache initialized with 0 entries.
19/02/2013 17:58:48.768 INFO Recipes initialized with 82 entries.
19/02/2013 17:58:48.781 INFO Server 'Test Server' initialized with world 'Default 1024x1024 World'.
19/02/2013 17:58:48.787 INFO Generating Manifest...
19/02/2013 17:58:50.297 INFO ...Manifest Generation Complete.
19/02/2013 17:58:50.299 INFO Computing Impassability Flags...
19/02/2013 17:58:52.391 INFO ...Done in 2.091711 seconds.
19/02/2013 17:58:52.463 INFO Command '(0x0001) Ping' registered with interpreter.
...
19/02/2013 17:58:52.792 INFO Command '(0x0047) Add / Edit Crafting Recipe' registered with interpreter.
19/02/2013 17:58:52.896 INFO Lugdunon Server Started In: 12.35505 seconds.
19/02/2013 17:58:52.914 INFO Autosaving at 30 minute intervals.


If you do have any issues, please feel free send email to support@lugdunon.net with any questions that you might have.

To let your friends join your server you have to open the ports: ’41975′ and ’41976′. Then you can give your external ip to your friends and they will be able to join.

Configuring your server

There are a few configuration options you can specify for server. The server’s configuration is stored in the lugdunonServer/dat directory in a file named server.cfg.


The available options for the server’s configuration are:


Name Required Description
su.account required The server super user’s account name
server.name required The server’s name. shown on server select screen.
world optional The directory (under lugdunonServer/dat) containing the server’s world data.

Defaults to ‘default’.

host optional The host name for the server to bind to. either and ip address or host name is valid.

Defaults to ‘localhost’.

ws.port optional The port for the websockets server to bind to.

Defaults to ’41975′. Note: your players will have to know this when connecting if it is anything other than the default.

cs.port optional The port for the content server to bind to.

Defaults to ’41976′.

save.interval optional The amount of time (in minutes) between autosaves.

Defaults to ’30′.

npc.name.filter optional Regular expression used for new NPC name validation.

Defaults to [0-9A-Za-z]{3,}

npc.name.filter.error optional The error message returned if the new NPC name validation fails.

Defaults to ‘Name must consist of alpha numeric characters and must also be longer than 2 characters.’.

name.filter optional Regular expression used for new player character name validation.

Defaults to [0-9A-Za-z\"\'\s]{3,}

name.filter.error optional The error message returned if the new player character name validation fails.

Defaults to ‘Name must consist of alpha numeric characters,’,\”,-,whitespace and must also be longer than 2 characters.’.

add.manifest.extensions optional A comma delimited list of any additional file extensions (with the ‘.’) that the dynamic manifest generator should pick up.

By default, .js, .json , .png , .html, .css are included in manifest generation.

allow.guests optional Set to false to block access by guest accounts.

Defaults to true.

Configuring your world

The world’s configuration is stored in the lugdunonServer/dat/WORLD directory in a file named world.cfg.


The available options for the worlds configuration are:


Name Required Description
name required The world’s name. Shown on server select screen.
chunk.size optional The size in tiles for a chunk’s dimensions (width / height)

Defaults to 8.

seed optional The random seed used in many of lugdunon’s functions. May be a string or integer.

Defaults to the time in milliseconds of the server’s start.

tileset.config optional Custom tileset config location.

Defaults to ‘net.lugdunon.world.defaults.Tileset’.

ui.config optional Custom ui config location.

Defaults to ‘net.lugdunon.world.defaults.UI’.

icon.config optional Custom icon config location.

Defaults to ‘net.lugdunon.world.defaults.Icons’.

etc.config optional Custom etc config location.

Defaults to ‘net.lugdunon.world.defaults.etc’.

character.stats optional Custom character stats module location.

Defaults to ‘net.lugdunon.state.character.advancement.def.DefaultCharacterStats’.

default.console.cmd optional Default console command (if no / command is sent).

Defaults to ‘yell’.

json.write.readable optional Boolean value that determines whether to write all JSON data to disk in human readable or compact form.

Defaults to ‘true’.

ping.interval optional The interval (in milliseconds) between server to client ping commands.

Defaults to ‘6000’.

chunk.size optional The map chunk size.

Defaults to ‘8’.

environment.second.length optional The length of an in game second (in milliseconds).

Defaults to ‘50’. This equates to an in game day length of 72 real time minutes.