Skip to main content
The settings/default/network.lua file controls connectivity between the database, client, and server executables. All values live under xi.settings.network.
The TCP socket and IP rule settings should only be modified by those familiar with networking. Incorrect values can prevent clients from logging in.

Database connection

SQL_HOST
string
default:"'127.0.0.1'"
Hostname or IP address of the MariaDB server.Environment variable: XI_NETWORK_SQL_HOST or MARIADB_HOST
SQL_PORT
number
default:"3306"
Port the MariaDB server listens on.Environment variable: XI_NETWORK_SQL_PORT
SQL_LOGIN
string
default:"'root'"
MariaDB username.Environment variable: XI_NETWORK_SQL_LOGIN or MARIADB_USER
SQL_PASSWORD
string
default:"'root'"
MariaDB password.Environment variable: XI_NETWORK_SQL_PASSWORD or MARIADB_PASSWORD
SQL_DATABASE
string
default:"'xidb'"
Name of the MariaDB database.Environment variable: XI_NETWORK_SQL_DATABASE or MARIADB_DATABASE
SQL_QUERY_RETRY_COUNT
number
default:"1"
Number of times to reconnect and retry a failed database query before giving up.

Login server ports

These settings configure the addresses and ports that the xi_connect login server binds to. The default bind address 0.0.0.0 listens on all interfaces.
SettingDefaultDescription
LOGIN_DATA_IP'0.0.0.0'Bind address for the login data channel
LOGIN_DATA_PORT54230Port for the login data channel
LOGIN_VIEW_IP'0.0.0.0'Bind address for the login view channel
LOGIN_VIEW_PORT54001Port for the login view channel
LOGIN_AUTH_IP'0.0.0.0'Bind address for the login auth channel
LOGIN_AUTH_PORT54231Port for the login auth channel
LOGIN_CONF_IP'0.0.0.0'Bind address for the login conf channel
LOGIN_CONF_PORT51220Port for the login conf channel

Map server

MAP_PORT
number
default:"54230"
UDP port the xi_map process listens on for client zone connections.

Search server

SEARCH_PORT
number
default:"54002"
Port the xi_search process listens on for auction house and /sea queries.

HTTP API

ENABLE_HTTP
boolean
default:"false"
Enable the HTTP API served by xi_world.
HTTP_HOST
string
default:"'localhost'"
Hostname the HTTP server binds to. Set to '0.0.0.0' to listen on all interfaces.Environment variable: XI_NETWORK_HTTP_HOST
HTTP_PORT
number
default:"8088"
Port for the HTTP API.

ZMQ (inter-process messaging)

ZMQ settings are used by xi_world as the central message server. All map server instances and the world server must share the same ZMQ settings.
ZMQ_IP
string
default:"'127.0.0.1'"
IP address of the ZMQ message server.Environment variable: XI_NETWORK_ZMQ_IP
ZMQ_PORT
number
default:"54003"
Port for the ZMQ message server.

TCP socket settings

Debug

UDP_DEBUG
boolean
default:"false"
Log debug reports for UDP socket errors.
TCP_DEBUG
boolean
default:"false"
Log debug reports for TCP socket errors.
TCP_STALL_TIME
number
default:"60"
Seconds a socket can stall before the connection is forcibly closed.

IP rules

TCP_ENABLE_IP_RULES
boolean
default:"true"
Enable IP-based connection filtering and DDoS protection.
TCP_ORDER
string
default:"'deny,allow'"
Order in which allow and deny rule lists are evaluated. Valid values:
  • 'deny,allow' — Check deny rules first, then allow rules. Allow if no rule matches.
  • 'allow,deny' — Check allow rules first, then deny rules. Allow if no rule matches.
  • 'mutual-failure' — Allow only if an allow rule matches and no deny rules match.
TCP_ALLOW
string
default:"''"
Comma-separated list of IP addresses or CIDR ranges to explicitly allow. Examples: '127.0.0.1,192.168.0.0/16', 'all'.
TCP_DENY
string
default:"''"
Comma-separated list of IP addresses or CIDR ranges to explicitly deny. Example: '10.0.0.0/8'.

Connection rate limiting

TCP_CONNECT_INTERVAL
number
default:"3000"
Time window in milliseconds within which repeated connection attempts are counted. Default is 3 seconds.
TCP_CONNECT_COUNT
number
default:"10"
Maximum number of connection attempts within TCP_CONNECT_INTERVAL before the source IP is locked out.
TCP_CONNECT_LOCKOUT
number
default:"600000"
Duration in milliseconds that a locked-out IP is blocked. Default is 10 minutes.

Docker environment variables

For Docker deployments, the most commonly overridden network settings map to these environment variables:
XI_NETWORK_SQL_HOST=database
XI_NETWORK_SQL_PORT=3306
XI_NETWORK_SQL_DATABASE=xidb
XI_NETWORK_SQL_LOGIN=xiadmin
XI_NETWORK_SQL_PASSWORD='password'
XI_NETWORK_ZMQ_IP=world
XI_NETWORK_HTTP_HOST=0.0.0.0
The MARIADB_DATABASE, MARIADB_USER, and MARIADB_PASSWORD aliases (used by the official MariaDB Docker image) are also accepted.

Build docs developers (and LLMs) love