Kalgoorlie Retro Docs

Documentation for the Kalgoorlie Retro BBS, its games and servers

User Tools

Site Tools


lordsrv:running

Running the server

In a window

Start menu > LORD Server > LORD Server (console), or run lordsrv.exe. The server runs while that window is open. Typing quit stops it, after asking.

As a Windows service

A service runs with no one logged on and starts with Windows. Any of these installs it:

  • Windows service in the installer, or the MSI with SERVICE=1;
  • Start menu > LORD Server > Install as a Windows service (and Remove the Windows service);
  • service install or service remove in the console;
  • in a Command Prompt in the server folder:
Command What it does
lordsrv -install Install the service “LORD Server” and start it.
lordsrv -uninstall Stop the service and remove it.
lordsrv -start Start it (or net start LORDServer).
lordsrv -stop Stop it (or net stop LORDServer), and wait for the games to save their players.
lordsrv -d <folder> Use another server folder (for testing a second copy).
lordsrv -pause Wait for Enter before closing (used by the Start menu items).

Installing or removing a service needs administrator rights; Windows asks for them. If the server is running in a console window when the service is installed, it is stopped first (its players are saved) and the service takes over.

The service's name is LORDServer. It runs as LocalSystem, starts automatically, and Windows restarts it a minute after a failure (not after a normal stop).

The console of a service

Open LORD Server (console) as usual. When the server is already running, the console attaches to it and the title bar says [attached]. quit then closes only the console; the server carries on. shutdown stops the server.

If the server stops or restarts (an upgrade, restart, settings saved), an attached console waits and attaches again by itself; Esc closes it.

The console reaches the server through the admin port: AdminPort in lordsrv.ini, 2399 by default, on this computer only (127.0.0.1). The server writes a new key to lordsrv.key each time it starts, and only a program that can read that file can use the port.

Stopping

Any of these stops the server. Each one disconnects the players first, and their games save them.

  • quit or shutdown in the console;
  • lordsrv -stop (Start menu > Stop LORD Server);
  • net stop LORDServer for the service;
  • a file called lordsrv.stop in the server folder.

Only one server can run in a folder at a time; the file lordsrv.run is held open while it runs.

When the server starts

It reads lordsrv.ini, loads the accounts (users.dat) and BBSes (bbses.dat), makes any new game folders from the template, and starts listening. The log shows each step and any notes, for example:

LORD Server 1.4 starting in C:\LORDSRV\ (service)
game A: Legend of the Red Dragon (C:\LORDSRV\games\A\)
listening for telnet on port 2300
listening for rlogin on port 5130
note: RLoginAllow is blank, so anyone can rlogin as any user name
lordsrv/running.txt · Last modified: by 127.0.0.1