Skip to content

Configuration

Inari is configured with environment variables. For local runs, create a .env file at the root of the server (see .env.example).

Name Description Default
SERVER_PUBLIC_IP Public IP address announced to WebRTC clients. 127.0.0.1
API_PORT Port of the web page and WebSocket API. 3030
API_KEY Key used by the game connector to authenticate. Randomly generated (14 characters)
WEBRTC_SERVER_PORT Port of the WebRTC server. 44444
MAX_DISTANCE Maximum distance at which users can hear each other. 20
DEFAULT_CHANNEL Channel used when a player does not specify one. default
PROTOCOL_MODE udp or tcp. Default audio transport; clients are not forced to use it. udp
.env
API_PORT=3030
WEBRTC_SERVER_PORT=44444
SERVER_PUBLIC_IP=203.0.113.10
API_KEY=change-me
DEFAULT_CHANNEL=default
PROTOCOL_MODE=udp
MAX_DISTANCE=20

Each channel is an isolated voice space with its own audio router. A connector authenticates on one channel and only manages the players of that channel. Use several channels to host several game servers on a single Inari instance.