Skip to content

Configuration Examples

Below is a complete config.yaml example demonstrating a typical production setup with Webhooks and MQTT enabled, a custom GC configuration, and an initial set of cameras and tags to be migrated on first boot.

yaml
server:
  port: 8080
  debug: false
  pprof_port: 0
  record_retention_days: 30
  gc_percent: 50
  gc_memory_limit_mb: 2048
  cors_allowed_origins:
    - "https://dashboard.mycompany.com"

auth:
  secret: "" # Will be auto-generated

global_tags:
  - id: "indoor"
    name: "Indoor"
    color: "#3b82f6"
  - id: "outdoor"
    name: "Outdoor"
    color: "#ef4444"

cameras:
  - id: "cam-front"
    url: "rtsp://admin:pass@10.0.10.50/stream1"
    record: true
    retention_days: 14
    transport: "tcp"
    tags: ["outdoor"]
  
  - id: "cam-lobby"
    url: "rtsp://admin:pass@10.0.10.51/stream1"
    record: true
    retention_days: 0 # Uses global 30 days
    transport: "tcp"
    tags: ["indoor"]
    lazy_hls: true

events:
  webhooks:
    - url: "https://internal-api.mycompany.com/ruseon-events"
      topics: ["camera.online", "camera.offline"]
      secret: "super-secret-key"
  mqtt:
    enabled: true
    broker: "tcp://mqtt.mycompany.com:1883"
    username: "ruseon_agent"
    password: "strongpassword"
    topic: "building/cameras"

Released under the MIT License.