Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • trosnoth trosnoth
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • Games
  • trosnothtrosnoth
  • Wiki
  • Running a Server

Running a Server · Changes

Page history
Create Running a Server authored May 28, 2020 by Joshua D. Bartlett's avatar Joshua D. Bartlett
Hide whitespace changes
Inline Side-by-side
Running-a-Server.md 0 → 100644
View page @ dc7a6df2
# Running your own Trosnoth Server #
You can get a copy of the latest Trosnoth server release here: https://trosnoth.org/download
When you run the server executable, a browser tab should open showing the server web interface, logged in as autoadmin.
## Typical LAN setup ##
You can access the server configuration by clicking on "configure server" in the header bar. If you're running a Trosnoth server on a LAN, the options you may want to look at are:
* **Server name**: You should change this to a name your players will recognise. This name is displayed when people browse to the server web interface, and may be used in future Trosnoth versions to identify your server to the user within the game.
* **Welcome HTML**: You should change this to some welcome message for your players. This HTML is displayed on the front page of the server's web interface. In Trosnoth 1.14.0 and earlier this setting can't be left blank. If you don't want to display a message on the front page, just enter ` `.
* **Web server port**: It's safe to leave this as 0, but leaving this as 0 means that the server web interface will have a different address every time you start the server. If you want your players to be able to view the server web interface in their browsers, you should set this to some known number like 8000. Then after you restart the server you can copy and paste the server's URL and give it to your players so they can view match statistics etc.
If a player has lost their password, you can reset their password using "manage players" from the header bar.
To control the current Trosnoth match on the server, click on "running games" in the header bar. Options you might typically use are:
* **[start scenario]**: This link will appear on the "Status" line when there is at least one player in the game. You can use it to start a Trosnoth match or other scenario such as free for all or Trosball.
* **Automatically start new game after**: This is the number of seconds between when one match ends and the next one starts. If you're finding that people don't have long enough to select the next game mode, you can increase this value.
* **Action**: This dropdown allows you to cancel the current match and return all players to the lobby, or to boot all players and restart the game. This second action can be useful if you find a bug that is affecting all players.
## Other settings ##
"Configure server" also has the following settings:
* **Elephant name**: You shouldn't normally need to change this. If you're setting up the server for camp, you might like to change this to "Fenix" or the name of whatever other plush elephant the campers are most familiar with.
* **Authentication port**: You shouldn't need to change this.
* **Debug access port/password**: You shouldn't need to use this unless your developing or debugging Trosnoth.
* **Trust client usernames**: In most circumstances you should leave this switched off. If you're setting up the server for camp, see the information below about this option.
* **Allowed hosts**: Leave this blank unless you're trying to run an internet Trosnoth server or you've set up a DNS name pointing to your server.
* **Secret key**: It's supposed to be secret. Don't share it with anyone.
* **Enable debugging**: Leave this switched off unless you're developing or debugging Trosnoth.
"Running games" also has the following settings:
* **Name**: The name of the arena. If you configure multiple arenas, this will be displayed to players to allow them to select which arena to connect to. (If you only have one arena, there is a link for setting up multiple arenas at the bottom of the "running games" page.)
* **Enabled**: Whether or not this arena is enabled.
* **Game port**: You shouldn't normally need to change this, but if you have multiple arenas you must provide a different port for each arena.
* **Current tournament**: Groups matches together on the game records page. Currently the only way to create a tournament is by directly editing the database through the admin interface. (You can access the admin interface by the link at the top of the "configure server" page.)
* **Log profiling stats**: Leave this switched off unless you're developing or debugging Trosnoth.
## Camp setup ##
If you're setting up a server for Übertweak, you may want to consider the following additional steps:
### Simplify the login process ###
Usually players have to create an account on a Trosnoth server and remember their username and password. On camp, campers are usually already logged into their computers using unique usernames, so we can instruct Trosnoth to just use the campers' computer login name.
To do this you will need to:
1. Under "configure server" activate the option "Trust client usernames".
1. On all client machines, create a file called `policy.ini` in the `trosnoth` directory (the directory that contains `const.py` and `version.py`). The `policy.ini` file must contain:
```
[privacy]
sendusername = 1
```
### Configuring the elephant ###
If one of your camp leaders wears a plush elephant on his head, you might like to configure the server accordingly. You will need to:
1. Change the elephant name under "configure server".
1. Get the leader in question to create an account on the server (by running Trosnoth and connecting to the server).
1. Go to "manage players" then type the leader's username and click "edit user".
1. Tick the "owns elephant" box and save settings.
## Running an internet server ##
If you want to make your Trosnoth server accessible on the internet, you will need to, at a minimum, forward the authentication port (defaults to 6787) and game port (defaults to 6789) through your firewall. These are both TCP ports. This step is necessary or players will not be able to connect to your server at all.
If you want players to be able to access the server's web interface over the internet, you will also need to:
1. Set a web port for your server and forward it through your firewall.
1. Add your public IP address or domain name to the "Allowed hosts" server setting.
**Warning:** simply following these steps will result in the web interface being accessible over HTTP which is insecure and is vulnerable to man-in-the-middle attacks. If you log in to the server website when it's set up in this way your login details could be stolen. To avoid this you could set up a reverse proxy to a secure address using a web server like Apache or nginx.
\ No newline at end of file
Clone repository
  • Adding an Upgrade
  • Contribute to Trosnoth
  • Feature Brainstorm
  • Getting Started
  • How to Play
  • Match Kinds
  • Play Online
  • Running a Server
  • Running from Source
  • Skinning Trosnoth
  • Testing Trosnoth
  • Upgrade System Overhaul
  • Home