How to run a TUG Server! (Updated for InDev Jan 16, 2015)

GhostGhost REGISTERED, Developers Posts: 74 Developer
edited April 2015 in Support
Hello seedlings! I am taking time to write you an overview of running your own TUG server. Users already experienced in running their own game servers will most likely be able to figure out the menu options and configurations needed in order to get their server up and running. However, for those of you who don't I will give you the information you need in order to host your own TUG server so you can get to playing with all of your friends!

Server Overview Information
  • - Default Port is UDP 6600 (no TCP ports are used - We use a reliable UDP architecture)
  • - You will need to port-forward your router
  • - Recommended max number of players is 4-5 on most systems
  • - Recommended max view distance is 8-12, depending on computers performance

Server Control In-Game Commands
  • - /maxviewdistance -- Get or Set the max view distance allowed on the server for all players
  • - /kick <player name> -- kick a player by name
  • - /ban <player name> -- Ban a player by name
  • - /unban <ip> -- Unban a player by IP address (hint: use /banlist to see IPs of banned players)
  • - /banlist -- See a list of current bans, and the associated IP Addresses
  • - /clearbans -- Clear any and all bans
  • - /maxplayers -- Get and Set the max players allowed on the server
  • - /allowconnections <true or false> -- setting for the server to allow new connections mid-game

Server Terminology
  • - Max View Distance - The maximum view distance allowed by the server. This will cap whatever the clients attempt to set their view distances at. The larger clients can adjust their view distance, the more of a performance impact it is on the server
  • - UDP Port - TUG Multiplayer only uses UDP (Reliable UDP Architecture), unlike most games, we do not use TCP Ports right now, purely UDP. The default port is 6600, but the server can adjust their port to any other valid number that isn't being used.
  • - Max Players - The total maximum number of connections the server will accept on their server

Server's Configuration Screen
http://i.imgur.com/DQgJFmx.jpg

Client's Configuration Screen
http://i.imgur.com/SYfbXfE.jpg

Basic Server Steps
Once you are on the multi-player screen, do the following...
  • 1. Pick a port you want to use. 6600 will work for most people unless they are hosting other applications utilizing this port, so this might not need to be changed. If the port is in use, you will get an error attempting to start the game.
  • 2. Select the maximum number of players you want to join your game. This can be adjusted once you are in-game with the slash command /maxplayers -- 5 is recommended maximum, though it will allow up to 20, but performance can't be guaranteed past 5.
  • 3. Select the max view distance allowed on your server. This can be adjusted once you are in-game with the slash command /maxviewdistance -- 8-12 is recommended maximum, though it will allow up to very large amounts, but performance can't be guaranteed past 8-12 for most systems.
  • 4. Setup your other world options as you normally would in single player
  • 5. Click "Start Game" for a new game or "Load Game" for an existing game. Server settings are NOT part of the save file, so whatever options you load with will be used.

Any errors with the setup will give you a popup with the problem for you to correct. If the game launches, then your settings should be ok!

Getting your friends to connect
Clients need to know two things from you in order to connect: Your IP Address and the port you used to launch the server.

If you are playing locally (both client and server are on the same LAN and using the same router) your local IP on the network can be used. In most cases this can be found by opening up the Windows Command Prompt and typing the command "ipconfig" -- This will be the IPv4 address listed (for instance 192.168.1.105)

If you are playing globally (a client is connecting from another physical location... i.e. over the internet) your global IP needs to be used. You can use the site http://whatsmyip.net to obtain your global IP address.

The port the clients need is whatever was entered on the server configuration screen (default is 6600). If you are playing locally on the same LAN, then most likely you are good to go. However if you are playing globally then you will need to configure your router to port-forward to your computer. (Read the Port Forwarding Section Below)

Port Forwarding and YOU!
If you are an advanced user who knows how to port-forward, then all you need to do is forward the UDP port of your server to your local IP and you should be good to go. Nothing more should be needed.

If you are not an an advanced user, please read on!

Hosting your own server can be fun and rewarding, but getting it setup to play with your friends from all over the world can be tricky to get configured. The router you use to connect your computer to your local network and out to the internet needs to have some more advanced settings put in place, so outside information on a particular port will get routed to your computer on your network.

Unfortunately, every router is different. Each have their own steps and differences that makes writing an easy step-by-step port-forwarding guide pretty much impossible. However there is a very handy website that can help basic users port-forward their specific router to get a server up and running.

Here is a more in depth overview of ports and why port-forwarding is necessary:
http://portforward.com/help/portforwarding.htm

Here is the guide-list for a wide variety of router types.
http://portforward.com/english/routers/port_forwarding/routerindex.htm

Once you've selected your router and model, you should see a link to the default configuration guide. See this image to find that default guide page for a specific router model.
http://i.imgur.com/514QJPp.jpg -- Look for the link underlined in red

Then follow the steps! In the end the goal is to get the UDP port you used (default 6600) to port forward to your local IP on your router.

Multi-player FAQ
I think I have it setup properly, but clients still can't connect. What do I do?
It's possible your firewall settings need to be checked. It could be blocking incoming connections. See your firewall's documentation for more details.

I was able to host as a server before, but now I can't. What happened?
It's quite possible your local IP address might have changed on your router, and your port-forwarding needs to be adjusted for the new IP. Also make sure your global IP address and firewall settings haven't changed either.

Running as a server is REALLY laggy. Any way I can improve this?
Running as a TUG server requires a LOT of processing horsepower. If you have a lot of players connecting (more than 5) then that might be too much for your system. Also, your maximum allowable view distance could be too high, and a particular client is generating a LOT of terrain. Try adjusting the maximum view distance lower.

Also, the more spread out players are away from each other, the harder the server has to work since it's generating fresh terrain that's not shared between players. Players playing closer together help the server's performance.

Why are clients on my server getting a lot of delay from actions? (i.e. Network Lag)
This could be one of two main reasons. There could possibly be disruptions in either yours or your clients internet connection, or your internet speeds may be too low to support several people playing on your server. When you visit a website like this one, you are primarily affected by your internet's download speed. However when you host a server, like TUG, you are primarily affected by your internet's upload speed. Some ISPs may offer you very fast download speeds, but very low upload speeds. The upload speeds affect how fast you can send data out from your computer, where download speeds affect what's coming in. Hosting a TUG Server with several clients requires you to send out lots and lots of data to keep the game in sync with each player. You can have super awesome download speeds of 20mpbs (megabits per second) but maybe just a 1mpbs upload speed depending on your ISP connection. The faster the upload speed, the better you can handle speedy game-play and cut out the network lag.

You should be able to host 4-5 players with a 5mbps upload speed or higher, 10mpbs+ being preferred. If you have a slower upload rate, of lets say, 1mpbs, then you might even have difficulty hosting just one player.

A client is crashing when attempting to join my server. Why?
Right now there is a known issue that with a lot of activity going on in the game, a client may crash when joining. If everyone playing on the server stops performing actions until the client joins in game, then this should help prevent the crash from happening. Once a client has joined the game fully, normal game-play can resume.

Is there any difference between a saved game on Single Player and a saved game on Server?
No. These are completely inter-changeable between single-player and multi-player.

A client is saying they are randomly missing a terrain tile, or terrain/objects aren't synchronized properly. Can this be resolved?
Yes it can be resolved. There are still a few issues we are working through to maintain a proper synchronization between all the clients running on the server, but a few edge-cases can cause de-synchronizations to occur. Most of these can be resolved by the client leaving the server and rejoining.

The client's information will be saved upon them leaving the game, so when the rejoin they should pick up where they left off.

How does a client get saved?
Right now, client saving is solely based upon the name they chose when they entered the game. If a client connects as "Corey" and then rejoins the game as "Peter", then they will be considered a new player and will start fresh. However if "Peter" logs out and rejoins as "Corey" who previously played on the server, then Peter would receive all of Corey's last saved state (item inventory, position, etc). There are MANY future plans in talks for accounts and user IDs in future releases.

Do Bans get saved?
No. Bans only persist for the active game the server is playing. If the server closes the game and re-opens a world, then all the previous bans from any saved game in the past would not persist.

Does TUG Support Proxy Servers?
No not currently, there may be more plans for more advanced server configuration settings with future releases.

Any plans for NAT?
We have talked about support NAT and it may become an available option in the future, but as of right now we do not support NAT punch-through setups.

Please follow up in this post with any questions you have about running your TUG Server and I will do my best to answer them!

Enjoy
- Ghost

Comments

  • ListforgeListforge REGISTERED Posts: 5 Podling
    Does the current server includes a query protocol? (to be able to get the status, the number of players connected etc.... )
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    It's currently not fully working yet, but if you press "Tab" while in game you can see a list of players and their associated pings... while the player list and number of players are correct, the pings are not updating right now -- hopefully we'll have it fixed next release.

    Edit:
    Re-read your question and I think I mis-understood at first :)

    There is no built in query protocol right now. Running as a server right now means you are playing the game. We don't have a dedicated server setup yet, but that's our next big push for the networking side of the game. Not sure if we will add a query protocol setup in that or not.
  • ListforgeListforge REGISTERED Posts: 5 Podling
    Thank you for the answer.

    I really hope that you will consider adding it with dedicated server. It seems like something not important, but it could allow people/company to build several online services around TUG (tracking, monitoring, and also used in server hosting). And these servics can improve the popularity ^^.

    Regards
  • PamcakesPamcakes REGISTERED, Moderator Posts: 738 Seed
    Listforge wrote:
    Thank you for the answer.

    I really hope that you will consider adding it with dedicated server. It seems like something not important, but it could allow people/company to build several online services around TUG (tracking, monitoring, and also used in server hosting). And these servics can improve the popularity ^^.

    Regards


    They have been planning on it. There will even be official NK servers someday, but MP is still super fresh and all that jazz. Time will be good to us.
    That's a really cool shirt you have on.
  • SimbaSimba REGISTERED, Developers Posts: 74 Developer
    Pamcakes wrote:
    They have been planning on it. There will even be official NK servers someday, but MP is still super fresh and all that jazz. Time will be good to us.
    We are planning on dedicated servers, yes, but what Listforge is asking is different. Listforge is asking if the servers will support a separate protocol for querying the server to determine how many players are connected, max players, and other server stats, without having to connect to it yourself.

    A query protocol would be useful for a number of reasons, but most notably is a server browser which displays information before joining, and third-party community websites which track server uptime and activity. Such functionality is not on our roadmap yet, but may be sometime in the future after dedicated servers are released.
  • CharlockCharlock REGISTERED, Tester Posts: 293 Seed
    Are there any plans for a dedicated server executable, so that the host does not need to be connected and "in world" as Seed in order for the server to be up and accessible to others?

    This might even lighten the load on the host machine, as far as performance requirements.
    "I’ve been drunk for about a week now, and I thought it might sober me up to sit in a library."
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    Charlock wrote:
    Are there any plans for a dedicated server executable, so that the host does not need to be connected and "in world" as Seed in order for the server to be up and accessible to others?

    This might even lighten the load on the host machine, as far as performance requirements.

    I am currently working on the design and analysis phase for the dedicated server. It's a big thing to get off the ground so it will take some time, but the initial work is underway!
  • ListforgeListforge REGISTERED Posts: 5 Podling
    In 0.8.4 patch announcement, there is this :

    "Along with this, dedicated servers are ALMOST done, and you should follow @camfergusondfw for updates on that."

    So Ghost please tell me that it will be at least possible to query a dedicated servers to know the status of the server?
  • SimbaSimba REGISTERED, Developers Posts: 74 Developer
    Listforge wrote:
    So Ghost please tell me that it will be at least possible to query a dedicated servers to know the status of the server?
    If we were to add a query protocol, what information would you like to be query-able?
  • ListforgeListforge REGISTERED Posts: 5 Podling
    jalb wrote:
    If we were to add a query protocol, what information would you like to be query-able?

    Most important are :
    - Connected players
    - Maxplayers
    - Version

    If possible:
    - Mode (creative, etc...)
    - Passworded or not
    - Player list (with name)
    - Hostname/MOTD
    - Platform (Windows, Linux...) (Usefull for global stats)
  • Red AgliatorRed Agliator REGISTERED Posts: 307 Seed
    Please also include a server setting about whether to be visible to these queries or not. I'd hate to accidentally show up on a list of joinable servers just because I didn't know better.
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    Please also include a server setting about whether to be visible to these queries or not. I'd hate to accidentally show up on a list of join-able servers just because I didn't know better.

    Absolutely. Currently Simba and I are exploring adding in the query interface and seeing what it would take to get it implemented. If we do happen to deploy the dedicated with a query interface, then it would definitely be an opt-in feature, nothing you'd be required to do.

    If we manage to get a query interface in, it's going to be rather basic. The user can define a TCP port for the query interface to use, then a server browser, for instance, would just connect to the server IP with that TCP port and request information using a set of network packet APIs we will provide to get that information.

    This would also be something that would just be used in the dedicated server only, not running a server as a client like we currently have.
    Listforge wrote:
    jalb wrote:
    If we were to add a query protocol, what information would you like to be query-able?

    Most important are :
    - Connected players
    - Maxplayers
    - Version

    If possible:
    - Mode (creative, etc...)
    - Passworded or not
    - Player list (with name)
    - Hostname/MOTD
    - Platform (Windows, Linux...) (Usefull for global stats)

    We only support windows right now for platform. Also our first version of dedicated server will not be password capable so no need to query that information.

    For the Hostname/MOTD section, we had talked about adding a part to the configuration that would allow users to put a description and servername simply for the query interface.

    Like I said before, this is something we are looking into, not something we are guaranteeing just yet.
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    edited July 2015
    It has been a long time since I have visited the forums and remember seeing a post on running a personal MP test server for TUG. I was thinking about setting one up on my old intel xenon x3350 but wasn't sure what the requirements were to run this on an actual server as opposed to a normal pc. The server is set up with raid 5, has 8 gigs of ECC ram and is running ms server 2008. Would that work and would the setup be the same as listed in this post?
    12.jpg
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    The requirements for running the dedicated server is really dependent on the number of people you plan on hosting. We are currently taking requests for closed dedicated server testing too.

    If you would like more info on our dedicated server closed testing opt-in, hit me up [email protected]

    Thanks!
    Ghost
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    I just got my server all patched up this morning and will be setting up TUG on it after work. I have hosted a minecraft server in the past so I suspect this should be similar. I am not sure what is involved with running a dedicated server for closed testing but I would be interested in learning more. Please shoot me some details.

    I upgraded to an IBM x3500 m3 with 32g of ECC ram on RAID 5 and an IMM for min down time in the event of a crash. With 5 mbps up I should be able to accommodate a few people online at a time.

    Thanks!
    12.jpg
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    @Kiarrasw What are your processor specs?
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    I have a Nehalem 2.13 ghz quad core in there but have the option of tossing in another core if needed. I may just do that but I realize my internet is really the main bottle neck on this thing at this point. I am pretty sure that 5 is the top end of their residential up speeds unfortunately.

    Here is a link: Processor

    It's an older model but a trusty lil work horse. 8-)

    12.jpg
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    Was also wondering if this would support using a domain name instead of exposing an ipaddress...
    12.jpg
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    I have the Launcher installed on the server but when attempting to launch for the first time, the following popups present themselves:

    "Login Denied" & "Unable to init ssl context"

    I assume it is due to running it on a server that is pretty much locked down as I am fine on my desktop and laptop pcs. Any thoughts on how to get past this?

    Thanks much!
    12.jpg
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    Looks like I didn't have all my updates on the fresh server yet. After installing my .net framework feature it let me update the launcher. Hope this helps others trying to set this up as well. - Cheers!
    12.jpg
  • ShadeeShadee REGISTERED, ADMINISTRATORS, Moderator, Developers Posts: 401 Site Admin
    Kiarrasw said:

    Was also wondering if this would support using a domain name instead of exposing an ipaddress...

    Yup, it'll take a domain name instead of an IP address. :)

    -Dee.
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    The best performance for processors has been seen with ~3.2+ ghz processors that have around 12-16 cores. I think you'd have a hard time supporting 3-4 people with the 2.13 ghz quad core. What other options do you have regarding that?
  • KiarraswKiarrasw REGISTERED Posts: 61 Seed
    Ah I think my server is just too old for it tbh. Even tossing the 2nd core in there would still be lacking. I can just hop on to one of the other dedicated servers for my multiplayer fix if need be. Thanks for the speedy replies though. ;)
    12.jpg
  • Adrian1205Adrian1205 REGISTERED Posts: 2 Podling
    edited December 2015
    It has been a long time since I have visited the forums...
    protector cover for s6 edge
    cheap covers
  • RawrRawr REGISTERED, Tester Posts: 509 Seed
    wb
    Programmer, designer, artist.
Sign In or Register to comment.