---
title: "Get server configuration."
method: GET
path: "/config"
tags: ["system"]
---

# Get server configuration.

`GET /config`

Returns available hardware accelerators (OS-detected), static enum lists, publisher listener ports, and the current runtime GlobalConfig.

## Response `200`

OK

- ApidocsConfigData
  - `audio_codecs` DomainAudioCodec[]
  - `global_config` DomainGlobalConfig
    - `auth` ConfigAuthConfig
      - `api` ConfigAPIAuthConfig
        - `enabled` boolean
        - `users` ConfigAPIUser[]
          - `password_hash` string
          - `role` string
          - `username` string
    - `buffer` ConfigBufferConfig
      - `capacity` integer — Capacity is the number of MPEG-TS packets per stream buffer.
    - `hooks` ConfigHooksConfig
      - `batch_flush_interval_sec` integer — BatchFlushIntervalSec is the global default for the per-hook flush timer in seconds. Per-hook overrides win; code default is DefaultHookBatchFlushIntervalSec.
      - `batch_max_items` integer — BatchMaxItems is the global default for HTTP hook batch size. Per-hook BatchMaxItems overrides this; the code default (DefaultHookBatchMaxItems) wins only when both are 0.
      - `batch_max_queue_items` integer — BatchMaxQueueItems is the global default for the per-hook in-memory queue cap. Per-hook overrides win; code default is DefaultHookBatchMaxQueueItems.
      - `file_root_dir` string — FileRootDir confines file-type hooks to this directory (S-2). When set, a file hook's target must resolve inside it — preventing arbitrary host-file create/append (e.g. clobbering the store, filling disk). Empty keeps the legacy "any absolute path" behaviour for backward compatibility; operators are encouraged to set it (e.g. /var/log/open-streamer/hooks).
      - `worker_count` integer — WorkerCount sizes the events.Bus worker pool that fans events out to subscribers. Each worker invokes the registered handler for an incoming event; with the batched HTTP delivery, the hook handler just enqueues into a per-hook batcher (~µs) so this number rarely needs tuning. 1-4 covers nearly every workload. 0 = use 4.
    - `ingestor` ConfigIngestorConfig
      - `hls_max_segment_buffer` integer — HLSMaxSegmentBuffer caps the number of pre-fetched HLS segments held in memory. This is a server-wide memory guard, not a per-stream policy.
    - `listeners` ConfigListenersConfig
      - `rtmp` ConfigRTMPListenerConfig
        - `enabled` boolean
        - `listen_host` string
        - `port` integer — default 1935
      - `rtsp` ConfigRTSPListenerConfig
        - `enabled` boolean
        - `listen_host` string
        - `port` integer — default 554
        - `transport` string — Transport is "tcp" (default) or "udp" for the RTSP muxer.
      - `srt` ConfigSRTListenerConfig
        - `enabled` boolean
        - `latency_ms` integer — LatencyMS is the SRT latency in milliseconds applied to the listener.
        - `listen_host` string
        - `port` integer — default 9999
    - `log` ConfigLogConfig
      - `format` string — text | json
      - `level` string — trace | debug | info | warn | error
    - `manager` ConfigManagerConfig
      - `input_packet_timeout_sec` integer — InputPacketTimeoutSec is the maximum gap without a successful read on the active input before it is marked failed. Pull protocols that deliver in bursts (e.g. HLS: one segment per Read) need this at least as large as the typical interval between reads (segment duration + playlist poll), or a healthy primary will be falsely failed over to a lower priority.
    - `publisher` ConfigPublisherConfig
      - `dash` ConfigPublisherDASHConfig
        - `dir` string
        - `live_ephemeral` boolean — Live* mirror HLS packaging semantics for the DASH muxer.
        - `live_history` integer
        - `live_segment_sec` integer
        - `live_window` integer
      - `hls` ConfigPublisherHLSConfig
        - `dir` string
        - `live_ephemeral` boolean — LiveEphemeral enables bounded retention (sliding manifest, delete old segments).
        - `live_history` integer — LiveHistory is extra segments kept on disk after they leave the manifest.
        - `live_segment_sec` integer — LiveSegmentSec is segment duration in seconds.
        - `live_window` integer — LiveWindow is the sliding window size (segments) in the playlist.
      - `max_playback_conn_per_stream` integer — MaxPlaybackConnPerStream / MaxPlaybackConnTotal cap concurrent RTSP / RTMP / SRT / HTTP-MPEGTS playback connections (per stream and globally) to bound the heavyweight per-connection state a flood can allocate (A-1). Unset (0) applies a protective default; a negative value means unlimited. HLS/DASH viewers go over stateless HTTP and are not counted here.
      - `max_playback_conn_total` integer
    - `server` ConfigServerConfig
      - `cors` ConfigCORSConfig
        - `allow_credentials` boolean — AllowCredentials sets Access-Control-Allow-Credentials. Must be false when AllowedOrigins contains "*".
        - `allowed_headers` string[] — AllowedHeaders lists Access-Control-Allow-Headers; empty uses a common API default set.
        - `allowed_methods` string[] — AllowedMethods lists Access-Control-Allow-Methods; empty uses a REST default set.
        - `allowed_origins` string[] — AllowedOrigins lists values for Access-Control-Allow-Origin. Use "*" for any origin (cannot be used together with AllowCredentials).
        - `enabled` boolean — Enabled turns CORS middleware on for the HTTP listener.
        - `exposed_headers` string[] — ExposedHeaders lists Access-Control-Expose-Headers.
        - `max_age` integer — MaxAge is the preflight cache duration in seconds (Access-Control-Max-Age).
      - `http_addr` string
      - `pprof_addr` string — PprofAddr enables Go's net/http/pprof + runtime introspection endpoints on a SEPARATE listener. Default empty = disabled. Recommend "127.0.0.1:6060" so the listener stays loopback-only — pprof exposes goroutine stacks and heap layouts that should never be reachable from the public network. Reach it from a remote box via SSH tunnel: `ssh -L 6060:127.0.0.1:6060 host`. Endpoints exposed when set: /debug/pprof/heap — heap snapshot (live objects) /debug/pprof/allocs — cumulative alloc profile /debug/pprof/goroutine — goroutine stack dump (?debug=2 for text) /debug/pprof/profile — 30s CPU profile /debug/pprof/block — blocking profile (needs SetBlockProfileRate) /debug/pprof/mutex — mutex contention (needs SetMutexProfileFraction)
    - `sessions` ConfigSessionsConfig
      - `enabled` boolean — Enabled toggles the entire feature. When false, the tracker no-ops and the API endpoints return empty.
      - `geoip_db_path` string — GeoIPDBPath, when non-empty, points to a MaxMind .mmdb file (GeoLite2-Country / GeoLite2-City; commercial GeoIP2 also works). The wiring layer opens it once at startup and uses it to fill PlaySession.Country with the ISO 3166-1 alpha-2 code. When empty (default) or when opening fails, sessions degrade silently to Country="" via NullGeoIP — no impact on session tracking itself. Hot-reloading the file on disk requires a server restart; the .mmdb is mmap'd for the lifetime of the process.
      - `idle_timeout_sec` integer — IdleTimeoutSec is how long a session may go without activity before the reaper closes it. Default 30 s when <= 0.
      - `max_lifetime_sec` integer — MaxLifetimeSec, when > 0, hard-closes any session older than this even if it's still seeing activity. 0 disables the cap.
    - `watermarks` ConfigWatermarksConfig
      - `dir` string — Dir is the assets directory. Must be writable by the open-streamer process. Defaults to "./watermarks" when empty (matches the layout install scripts use under /var/lib/open-streamer/watermarks).
  - `hw_accels` DomainHWAccel[]
  - `output_protocols` string[]
  - `ports` ApidocsConfigPorts
    - `http_addr` string
    - `rtmp_port` integer
    - `rtsp_port` integer
    - `srt_port` integer
  - `stream_statuses` DomainStreamStatus[]
  - `version` VersionInfo
    - `built_at` string
    - `commit` string
    - `version` string
  - `video_codecs` DomainVideoCodec[]
  - `watermark_positions` DomainWatermarkPosition[]
  - `watermark_types` DomainWatermarkType[]

---

[API](https://skmtc.net/datvietvac-techhub/apis/open-streamer-api.md) · [All operations](https://skmtc.net/datvietvac-techhub/apis/open-streamer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datvietvac-techhub/open-streamer-api/versions/9f723293b698/schema)
