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 |
Example
Section titled “Example”API_PORT=3030WEBRTC_SERVER_PORT=44444SERVER_PUBLIC_IP=203.0.113.10API_KEY=change-meDEFAULT_CHANNEL=defaultPROTOCOL_MODE=udpMAX_DISTANCE=20Channels
Section titled “Channels”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.