webpage/versioned_docs/version-v2/configuration.md
Config values can be set using three methods, sorted on this page by priority.
Example, setting nat1to1 variable:
NEKO_NAT1TO1=<ip>--nat1to1=<ip>nat1to1: <ip>
NEKO_SCREEN:1920x1080@30NEKO_PASSWORD:user_passwordNEKO_PASSWORD_ADMIN:admin_passwordNEKO_CONTROL_PROTECTION:falseNEKO_IMPLICIT_CONTROL:falseNEKO_LOCKS:controlloginfile_transfercontrolNEKO_EPR:52000-52099NEKO_UDPMUX:52100NEKO_TCPMUX:52100NEKO_NAT1TO1:10.0.0.1NEKO_IPFETCH:nat1to1 is not specified.http://checkip.amazonaws.comNEKO_ICELITE:falseNEKO_ICESERVER:stun:stun.l.google.com:19302NEKO_ICESERVERS:[{"urls": ["turn:turn.example.com:19302", "stun:stun.example.com:19302"], "username": "name", "credential": "password"}, {"urls": ["stun:stun.example2.com:19302"]}]NEKO_VIDEO_CODEC:NEKO_VIDEO_BITRATE:NEKO_VIDEO:gstreamer1.0-plugins-basegstreamer1.0-plugins-goodgstreamer1.0-plugins-badgstreamer1.0-plugins-uglyximagesrc display-name=%s show-pointer=true use-damage=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! video/x-raw,format=NV12 ! x264enc threads=4 bitrate=3500 key-int-max=60 vbv-buf-capacity=4000 byte-stream=true tune=zerolatency speed-preset=veryfast ! video/x-h264,stream-format=byte-stream,profile=constrained-baselineNEKO_MAX_FPS:0NEKO_HWENC:NEKO_AUDIO_CODEC:NEKO_AUDIO_BITRATE:196NEKO_AUDIO:pulsesrc device=%s ! audio/x-raw,channels=2 ! audioconvert ! opusenc bitrate=128000NEKO_BROADCAST_PIPELINE:{url}, {device} and {display} will be replaced.NEKO_BROADCAST_URL:rtmp://<your-server>:1935/ingest/<stream-key>NEKO_BROADCAST_AUTOSTART:trueNEKO_BIND::8080NEKO_CERT:/certs/cert.pemNEKO_KEY:/certs/key.pemNEKO_PROXY:X-Forwarded-For headers.falseNEKO_PATH_PREFIX:/neko/NEKO_CORS:* for all.127.0.0.1 neko.example.comNEKO_FILE_TRANSFER_ENABLED:trueNEKO_FILE_TRANSFER_PATH:/home/neko/Downloads. If the path doesn't exist, it will be created./home/neko/DesktopNEKO_DISPLAY:NEKO_DEVICE:NEKO_STATIC:You can execute neko serve --help to see available arguments.
Usage:
neko serve [flags]
Flags:
--audio string audio codec parameters to use for streaming
--audio_bitrate int audio bitrate in kbit/s (default 128)
--audio_codec string audio codec to be used (default "opus")
--bind string address/port/socket to serve neko (default "127.0.0.1:8080")
--broadcast_pipeline string custom gst pipeline used for broadcasting, strings {url} {device} {display} will be replaced
--broadcast_url string URL for broadcasting, setting this value will automatically enable broadcasting
--cert string path to the SSL cert used to secure the neko server
--control_protection control protection means, users can gain control only if at least one admin is in the room
--cors strings list of allowed origins for CORS (default [*])
--device string audio device to capture (default "audio_output.monitor")
--display string XDisplay to capture (default ":99.0")
--epr string limits the pool of ephemeral ports that ICE UDP connections can allocate from (default "59000-59100")
--file_transfer_enabled enable file transfer feature (default false)
--file_transfer_path string path to use for file transfer (default "/home/neko/Downloads")
--g722 DEPRECATED: use audio_codec
--h264 DEPRECATED: use video_codec
-h, --help help for serve
--hwenc string use hardware accelerated encoding
--icelite configures whether or not the ice agent should be a lite agent
--iceserver strings describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer (default [stun:stun.l.google.com:19302])
--iceservers string describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer
--implicit_control if enabled members can gain control implicitly
--ipfetch string automatically fetch IP address from given URL when nat1to1 is not present (default "http://checkip.amazonaws.com")
--key string path to the SSL key used to secure the neko server
--locks strings resources, that will be locked when starting (control, login)
--max_fps int maximum fps delivered via WebRTC, 0 is for no maximum (default 25)
--nat1to1 strings sets a list of external IP addresses of 1:1 (D)NAT and a candidate type for which the external IP address is used
--opus DEPRECATED: use audio_codec
--password string password for connecting to stream (default "neko")
--password_admin string admin password for connecting to stream (default "admin")
--path_prefix string path prefix for HTTP requests (default "/")
--pcma DEPRECATED: use audio_codec
--pcmu DEPRECATED: use audio_codec
--proxy enable reverse proxy mode
--screen string default screen resolution and framerate (default "1280x720@30")
--static string path to neko client files to serve (default "./www")
--tcpmux int single TCP mux port for all peers
--udpmux int single UDP mux port for all peers
--video string video codec parameters to use for streaming
--video_bitrate int video bitrate in kbit/s (default 3072)
--video_codec string video codec to be used (default "vp8")
--vp8 DEPRECATED: use video_codec
--vp9 DEPRECATED: use video_codec
Global Flags:
--config string configuration file path
-d, --debug enable debug mode
-l, --logs save logs to file
You can mount YAML config file to docker container on this path /etc/neko/neko.yaml and store your configuration there.
Config uses the keys from arguments, that can be viewed in program's help output.
Example (with just some of the available arguments):
# audio bitrate in kbit/s
audio_bitrate: 128
# video bitrate in kbit/s
video_bitrate: 3072
# maximum fps delivered via WebRTC, 0 is for no maximum
max_fps: 25
# password for connecting to stream
password: "neko"
# admin password for connecting to stream
password_admin: "admin"
# default screen resolution and framerate
screen: "1280x720@30"
# limits the pool of ephemeral ports that ICE UDP connections can allocate from
epr: "59000-59100"