Operate

Config Reference

icey-server reads configuration from a JSON file. CLI flags override config values. If neither is set, built-in defaults apply.

Default config path: ./config.json. Override with --config /path/to/config.json.

Sections

http — Server bind settings
FieldTypeDefaultDescription
hoststring"0.0.0.0"Bind address
portnumber4500HTTP and WebSocket port
{
  "http": {
    "host": "0.0.0.0",
    "port": 4500
  }
}
tls — Direct HTTPS/WSS serving
FieldTypeDefaultDescription
certstring""Path to the TLS certificate file
keystring""Path to the TLS private key file
{
  "tls": {
    "cert": "/etc/icey-server/certs/fullchain.pem",
    "key": "/etc/icey-server/certs/privkey.pem"
  }
}
Note

Direct TLS is optional. If both fields are empty, icey-server serves plain HTTP/WSS on the primary port. If either field is set, both must be valid and loadable or --doctor will fail the preflight.

turn — Embedded TURN relay
FieldTypeDefaultDescription
enabledbooltrueEnable the embedded TURN server
portnumber3478TURN listen port
realmstring"0state.com"TURN authentication realm
externalIpstring""Public IP to advertise in TURN allocations
{
  "turn": {
    "enabled": true,
    "port": 3478,
    "realm": "0state.com",
    "externalIp": ""
  }
}
Warning

If you are behind a NAT and need relay to work for external browsers, externalIp must be your public IP. Without it, TURN allocations advertise the private address and remote browsers cannot connect. This is the single most common deployment failure.

media — Mode, source, and encoding
FieldTypeDefaultDescription
modestring"stream"stream, record, or relay
sourcestring""File path, device path, or RTSP URL (stream mode)
recordDirstring"./recordings"Output directory for record mode
loopbooltrueLoop the source in stream mode

media.video

FieldTypeDefaultDescription
codecstring"libx264"Video codec
widthnumber1280Output width
heightnumber720Output height
fpsnumber30Frame rate
bitratenumber2000000Target bitrate in bits/sec (adapts via REMB)

media.audio

FieldTypeDefaultDescription
codecstring"libopus"Audio codec
channelsnumber2Channel count
sampleRatenumber48000Sample rate in Hz
bitratenumber128000Audio bitrate in bits/sec
{
  "media": {
    "mode": "stream",
    "source": "/path/to/video.mp4",
    "recordDir": "./recordings",
    "loop": true,
    "video": {
      "codec": "libx264",
      "width": 1280,
      "height": 720,
      "fps": 30,
      "bitrate": 2000000
    },
    "audio": {
      "codec": "libopus",
      "channels": 2,
      "sampleRate": 48000,
      "bitrate": 128000
    }
  }
}
media.intelligence — Vision and speech analysis

Intelligence branches run as side pipelines on decoded media. They emit events over the signalling channel without affecting transport.

Note

These stages currently activate only in stream mode. If you keep them configured in record or relay, icey-server leaves them inactive and reports that state as a warning in --doctor and /api/ready.

media.intelligence.vision

FieldTypeDefaultDescription
enabledboolfalseEnable vision analysis
everyNthFramenumber6Sample every Nth decoded frame
minIntervalUsecnumber200000Minimum interval between samples (μs)
queueDepthnumber8Analysis queue depth

media.intelligence.vision.motion

FieldTypeDefaultDescription
gridWidthnumber32Motion detection grid width
gridHeightnumber18Motion detection grid height
warmupFramesnumber2Frames before detection activates
thresholdnumber0.08Motion threshold (0.0–1.0)
cooldownUsecnumber500000Cooldown between motion events (μs)

media.intelligence.speech

FieldTypeDefaultDescription
enabledboolfalseEnable speech analysis
queueDepthnumber32Analysis queue depth
startThresholdnumber0.045VAD start threshold
stopThresholdnumber0.02VAD stop threshold
minSilenceUsecnumber250000Minimum silence to end speech (μs)
updateIntervalUsecnumber250000Status update interval (μs)
webRoot — Web UI path
FieldTypeDefaultDescription
webRootstring"./web/dist"Path to the built web UI directory

The server serves static files from this directory at /. If the directory does not exist or does not contain index.html, the web UI will not load but the API and WebSocket endpoints will still work.

Packaged release artifacts and Debian packages bundle the web UI under share/icey-server/web. If you leave webRoot unset and ./web/dist is missing, icey-server falls back to that packaged path automatically.

## Config Examples
{
  "media": {
    "source": "/path/to/video.mp4"
  }
}
{
  "turn": {
    "externalIp": "203.0.113.50"
  },
  "media": {
    "source": "rtsp://192.168.1.100:554/stream1",
    "loop": false
  }
}
{
  "turn": {
    "enabled": false
  },
  "media": {
    "mode": "record",
    "recordDir": "/data/recordings"
  }
}
{
  "media": {
    "source": "/path/to/video.mp4",
    "video": {
      "width": 640,
      "height": 360,
      "fps": 15,
      "bitrate": 500000
    },
    "audio": {
      "bitrate": 64000
    }
  }
}