Server administration

This page explains what you can do if you are an administrator of a Hedgewars server.

Purpose

The purpose of a Hedgewars server is basically to provide the list of rooms to play in, provide the chat, and provide the functionality of rooms, in order to bring players together. The server is not (directly) involved in the actual games themselves.

There is one official Hedgewars server maintained by the Hedgewars developers. But anyone with a computer can launch their own server. You could either provide it in the Internet or you could start it to play Hedgewars in a LAN.

All servers are independent. The Hedgewars developers are not responsible for whatever happens on unofficial servers.

Getting the server

Normally, Hedgewars comes with the server software installed by default and you don't have to download anything extra.

In some builds of Hedgewars (i.e. from some GNU/Linux distributions), the server program might not be available, or it is distributed seperately. The official downloads always come with the server program.

Starting the server

Starting your own Hedgewars server is very easy and Hedgewars does pretty much all of the boring work for you. There are two ways to start Hedgewars: From Hedgewars itself or from the command-line.

In Hedgewars

In the main menu, click on “network game”, then “Play in local network”. Click on “Start server” and enter the desired information. Please note: If the Hedgewars server is not installed on your computer, this button does not exist.

If you click on “Start”, the server starts and you immediately go to the lobby.

Important: If you choose this option, the server will only run as long you run Hedgewars. As soon you quit the lobby, the Hedgewars server shuts down.

From the command-line

Run hedgewars-server (or hedgewars-server.exe on Windows) to start the server.

Hit Ctrl+C in the terminal to shutdown the server.

Command-line arguments

There are two optional command-line options:

  • -p PORT: Set port number to listen to (default: 46631)
  • -d BOOL: BOOL is “True” or “False”. If it's “True”, the server starts as dedicated server

Connecting

You can connect to your server via “Play in local network”. If your server does not appear in the list, click on “Specify” and enter the address and port number.

Administration

Hedgewars servers don't require a lot of administration, the relevant settings all have sane defaults.

One thing you should always keep up-to-date is the protocol number. You have to update this whenever you update the version of Hedgewars.

To administer a server, you have to join it like a player. In the lobby, a button labelled “Administer” appears.

Basic administration

In the “Administer” page. To make changes to the “General” tab, you have to click “Load data” first.

You can do the following things:

  • Select the correct protocol number. Usually this should match the version if your installed Hedgewars. See here for a list: list of protocol numbers
  • Set a custom Message of the Day (MOTD) for players with a matching version and players with an old version. One of these messages are shown when players join your server. These fields support basic HTML
  • Ban players from the server, either based on their IP address or their name

Changes made in the “General” tab only take affect after you click on “Save data”.

Chat commands

The following chat commands can be used by server administrators, in addition to the chat commands which can be used by non-administrators.

CommandEffectUsable in …
/global TEXT Sends global chat message which can be seen in lobby and all rooms (including in-game) Lobby and room
/registered_only Lock down server to registered players only, or undo this when typing it in again Lobby and room
/super_power Activate your super power. You can enter any room and can't be kicked out of them. Expires when you leave server Lobby and room
/stats Writes server stats into chat (only visible to you) Lobby
/force RESULT Force vote result (“yes” or “no”) for active vote Room
/fix Force room to stay open even if everyone left. Room
/unfix Undo the /fix command. Note: You must be room master Room
/save ID NAME Add current room configuration as votable choice for /callvote map Room
/delete ID Delete a votable room configuration Room
/saveroom FILE Save all votable room configurations (and the greeting) of this room into a file Room (official server only)
/loadroom FILE Load votable room configurations (and greeting) from a file Room (official server only)

User login

Copyright © 2004-2023 Hedgewars Project. All rights reserved. [ contact ]