wesnothd doesn't read custom config file

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
stonehold
Posts: 3
Joined: June 22nd, 2026, 5:43 am

wesnothd doesn't read custom config file

Post by stonehold »

Hi,

I'm working on deploying a dedicated server for the Battle for Wesnoth for my community to use, but have run into a problem. The wesnothd server binary is not loading the configuration file I point it to. The ownership and permissions are fine, so I wonder if it's something in the WML formatting and syntax, but I don't know the language well enough to check that. When I start the server I see this:

Code: Select all

root@thedagora:~# wesnothd-1.18 -c /opt/storage/wesnoth/wesnothd.cfg
20260622 05:06:35 info server: Server configuration from file: '/opt/storage/wesnoth/wesnothd.cfg' read.
20260622 05:06:35 info server: opened fifo at '/run/wesnothd/1.18/socket'. Server commands may be written to this file.
The output says it reads the file, but it doesn't load any of the variables I put in there. Here/s the config file contents:

Code: Select all

[game_config]
  [server]
      name = "CogCos"
      port = "8118"
      versions_accepted = "*"
      passwd = "********"
      replay_save_path = "/opt/storage/wesnoth/replay/"
      room_save_file = "/opt/storage/wesnoth/room.saves"
      ban_save_file = "/opt/storage/wesnoth/ban.gz"
      save_replays = "true"
      connections_allowed = "3"
      max_messages = "7"
      user_handler = "forum"
      motd = "Welcome to the Battle for Wesnoth Cognitive Cosmos dedicated game server! Please remember to password protect your rooms and store those passwords in a safe and secure loca>
  [/server]
  [user_handler]
      db_host = "localhost"
      db_name = "wesnoth"
      db_user = "wesnoth"
      db_password = "*******"
      db_extra_table = "ext_wesnoth"
      db_game_info_table = "game_info"
      db_game_player_info_table = "player_info"
      db_game_modification_info_table = "game_mod_info"
  [/user_handler]
[/game_config]
I'm running a Debian 12 server on Linode and installed the wesnoth server binaries using apt. Any tips or a nudge in the right direction would be much appreciated.

~Ken
Last edited by Ravana on June 22nd, 2026, 1:15 pm, edited 1 time in total.
Reason: [code]
gnombat
Posts: 1034
Joined: June 10th, 2010, 8:49 pm

Re: wesnothd doesn't read custom config file

Post by gnombat »

stonehold wrote: June 22nd, 2026, 10:23 am motd = "Welcome to the Battle for Wesnoth Cognitive Cosmos dedicated game server! Please remember to password protect your rooms and store those passwords in a safe and secure loca>
That part certainly doesn't look right.

To be honest, the entire config file looks strange - was this file generated using AI? 🤖
stonehold
Posts: 3
Joined: June 22nd, 2026, 5:43 am

Re: wesnothd doesn't read custom config file

Post by stonehold »

That part certainly doesn't look right.
Caught that a couple hours back from a suggestion on IRC to use wmllint. Still won't read the file.
was this file generated using AI?
No. I never use AI for creation, at most I use it for voice typing.
Perhaps it looked off because the indents got mangled. Here's how the file actually looks:

Image
gnombat
Posts: 1034
Joined: June 10th, 2010, 8:49 pm

Re: wesnothd doesn't read custom config file

Post by gnombat »

I would recommend just starting with a very minimal config file, like this:

Code: Select all

motd="Welcome to the Battle for Wesnoth Cognitive Cosmos dedicated game server!"
Nothing else - no [game_config] or [server] tags, just a simple one-line file. Then try starting wesnothd and connecting to it. If you see your custom MOTD in the game, then you know the config file is working and you can start adding other lines to it.
User avatar
Pentarctagon
Project Manager
Posts: 5825
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: wesnothd doesn't read custom config file

Post by Pentarctagon »

It looks like you started with https://github.com/wesnoth/wesnoth/blob ... config.cfg as a base for some reason? Since those are specific to that file, not the wesnothd config file, so the reason it seems like it doesn't find anything is because it's looking for attributes at the the root of the file rather than within those subtags. I'd suggest starting with a minimal example as gnombat suggested as well as reading through the manpage for wesnothd.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
stonehold
Posts: 3
Joined: June 22nd, 2026, 5:43 am

Re: wesnothd doesn't read custom config file

Post by stonehold »

For those interested, I found the answer on the Wesnoth IRC channel. When setting up a custom server configuration file, you must not enclose the global keys listed in the man page in opening and closing tags. I posted a modified version of the now working configuration file to my site for others perusal. Here's the link:
https://www.thedagora.social/wesnoth/we ... onfig.html

~Ken
Soliton
Site Administrator
Posts: 1765
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: wesnothd doesn't read custom config file

Post by Soliton »

Note that the attributes name and address do not exist.
"If gameplay requires it, they can be made to live on Venus." -- scott
Post Reply