Knight docs
EN ID
GitHub

Running a Server

server.cfg, command-line flags, RCON and day-to-day operation.

Start the server

bash
knight-server -cfg server.cfg
knight-server -cfg server.cfg -gamemode Gamemodes/tdm.sa

Command-line flags

FlagMeaning
-cfg <file>Configuration file (default server.cfg).
-gamemode <file>Load this .sa file instead of the one in the config.
-loglevel <level>debug, info, warn, error.
-logtracePrint raw packet traces (very verbose).

server.cfg

The configuration is line-based and forgiving: unknown keys are warned about, not fatal.

cfg
port 7777
hostname "My Knight Server"
gamemode0 bare 1
language English
password ""
rcon_password "change-me"
maxplayers 100
worldtime 12
weather 10
gravity 0.008
serialcheck 0
streamdistance 200

# rate limiting (unknown sources)
ipratelimit_burst 100
ipratelimit_persec 50

# classes (fallback if the gamemode adds none)
addclass 0 1958.4 1343.2 15.4 270.0 24 100 25 50

RCON

Send rcon <password> <command> in the console, or use the server-browser RCON. Built-in commands:

CommandAction
echo <text>Print text to the log.
say <text>Broadcast a chat message.
playersList connected players.
kick <id> [reason]Kick a player.
ban <id> [reason]Ban a player.
reloadgamemodeReload the current gamemode.
varlist / cmdlistList server variables / commands.

Running as a service

On Linux, keep the server alive with systemd. This restarts it automatically if it crashes.

cfg
[Unit]
Description=Knight server
After=network.target

[Service]
WorkingDirectory=/srv/knight
ExecStart=/usr/local/bin/knight-server -cfg server.cfg
Restart=on-failure
User=knight

[Install]
WantedBy=multi-user.target
bash
sudo systemctl daemon-reload
sudo systemctl enable --now knight

Query and monitoring

Knight answers SA-MP server-browser queries (i, c, r, o, p) on the same UDP port. Use any SA-MP server-browser query tool.

Tip
Set hostname, gamemode0 and mapname so the server browser shows the right details.