Configuration
Neko uses the Viper library to manage configuration. The configuration file is optional and is not required for Neko to run. If a configuration file is present, it will be read in and merged with the default configuration values.
The merge order is as follows:
- Default configuration values
- Configuration file
- Environment variables
- Command-line arguments
Example merging order
# Default Value: 127.0.0.1:8080
# Config File
cat config.yaml <<EOF
server:
bind: "127.0.0.1:8081"
EOF
# Environment Variable
export NEKO_SERVER_BIND=127.0.0.1:8082
# Command-line Argument
./neko -config=config.yaml -server.bind=127.0.0.1:8083
The final value of server.bind
will be 127.0.0.1:8083
.
Configuration File
You have multiple ways to specify the configuration file for the neko server:
- Command-line argument:
-config=/path/to/config.yaml
- Environment variable:
NEKO_CONFIG=/path/to/config.yaml
- Place the
neko.yaml
file in the same directory as the neko binary. - Place the
neko.yaml
file to/etc/neko/neko.yaml
(ideal for Docker containers).
The configuration file can be specified in YAML, JSON, TOML, HCL, envfile, and Java properties format. Throughout the documentation, we will use the YAML format.
Example configuration files
- YAML
- JSON
- TOML
- HCL
- Envfile
- Java Properties
capture:
screencast:
enabled: false
server:
pprof: true
desktop:
screen: "1920x1080@60"
member:
provider: "multiuser"
multiuser:
admin_password: "admin"
user_password: "neko"
session:
merciful_reconnect: true
implicit_hosting: false
inactive_cursors: true
cookie:
enabled: false
webrtc:
icelite: true
iceservers:
# Backend servers are ignored if icelite is true.
backend:
- urls: [ stun:stun.l.google.com:19302 ]
frontend:
- urls: [ stun:stun.l.google.com:19305 ]
{
"capture": {
"screencast": {
"enabled": false
}
},
"server": {
"pprof": true
},
"desktop": {
"screen": "1920x1080@60"
},
"member": {
"provider": "multiuser",
"multiuser": {
"admin_password": "admin",
"user_password": "neko"
}
},
"session": {
"merciful_reconnect": true,
"implicit_hosting": false,
"inactive_cursors": true,
"cookie": {
"enabled": false
}
},
"webrtc": {
"icelite": true,
"iceservers": {
"backend": [
{
"urls": [ "stun:stun.l.google.com:19302" ]
}
],
"frontend": [
{
"urls": [ "stun:stun.l.google.com:19305" ]
}
]
}
}
}
[capture.screencast]
enabled = false
[server]
pprof = true
[desktop]
screen = "1920x1080@60"
[member]
provider = "multiuser"
[member.multiuser]
admin_password = "admin"
user_password = "neko"
[session]
merciful_reconnect = true
implicit_hosting = false
inactive_cursors = true
[session.cookie]
enabled = false
[webrtc]
icelite = true
[[webrtc.iceservers.backend]]
urls = [ "stun:stun.l.google.com:19302" ]
[[webrtc.iceservers.frontend]]
urls = [ "stun:stun.l.google.com:19305" ]
capture {
screencast {
enabled = false
}
}
server {
pprof = true
}
desktop {
screen = "1920x1080@60"
}
member {
provider = "multiuser"
multiuser {
admin_password = "admin"
user_password = "neko"
}
}
session {
merciful_reconnect = true
implicit_hosting = false
inactive_cursors = true
cookie {
enabled = false
}
}
webrtc {
icelite = true
iceservers {
backend {
urls = [ "stun:stun.l.google.com:19302" ]
}
frontend {
urls = [ "stun:stun.l.google.com:19305" ]
}
}
}
CAPTURE_SCREENCAST_ENABLED=false
SERVER_PPROF=true
DESKTOP_SCREEN=1920x1080@60
MEMBER_PROVIDER=multiuser
MEMBER_MULTIUSER_ADMIN_PASSWORD=admin
MEMBER_MULTIUSER_USER_PASSWORD=neko
SESSION_MERCIFUL_RECONNECT=true
SESSION_IMPLICIT_HOSTING=false
SESSION_INACTIVE_CURSORS=true
SESSION_COOKIE_ENABLED=false
WEBRTC_ICELITE=true
WEBRTC_ICESERVERS_BACKEND="[{"urls":["stun:stun.l.google.com:19302"]}]"
WEBRTC_ICESERVERS_FRONTEND="[{"urls":["stun:stun.l.google.com:19305"]}]"
capture.screencast.enabled = false
server.pprof = true
desktop.screen = 1920x1080@60
member.provider = multiuser
member.multiuser.admin_password = admin
member.multiuser.user_password = neko
session.merciful_reconnect = true
session.implicit_hosting = false
session.inactive_cursors = true
session.cookie.enabled = false
webrtc.icelite = true
webrtc.iceservers.backend[0].urls[0] = stun:stun.l.google.com:19302
webrtc.iceservers.frontend[0].urls[0] = stun:stun.l.google.com:19305
Room Configuration
This is the initial configuration of the room that can be modified by an admin in real-time.
- YAML Configuration File
- Environment Variables
- Command Line Arguments
NEKO_SESSION_PRIVATE_MODE=false
NEKO_SESSION_LOCKED_LOGINS=false
NEKO_SESSION_LOCKED_CONTROLS=false
NEKO_SESSION_CONTROL_PROTECTION=false
NEKO_SESSION_IMPLICIT_HOSTING=true
NEKO_SESSION_INACTIVE_CURSORS=false
NEKO_SESSION_MERCIFUL_RECONNECT=true
NEKO_SESSION_HEARTBEAT_INTERVAL=120
--session.private_mode false
--session.locked_logins false
--session.locked_controls false
--session.control_protection false
--session.implicit_hosting true
--session.inactive_cursors false
--session.merciful_reconnect true
--session.heartbeat_interval 120
session:
private_mode: false
locked_logins: false
locked_controls: false
control_protection: false
implicit_hosting: true
inactive_cursors: false
merciful_reconnect: true
heartbeat_interval: 120
private_mode
whether private mode is enabled, users do not receive the room video or audio.locked_logins
whether logins are locked for users, admins can still login.locked_controls
whether controls are locked for users, admins can still control.control_protection
users can gain control only if at least one admin is in the room.implicit_hosting
automatically grants control to a user when they click on the screen, unless an admin has locked the controls.inactive_cursors
whether to show inactive cursors server-wide (only for users that have it enabled in their profile).merciful_reconnect
whether to allow reconnecting to the websocket even if the previous connection was not closed. This means that a new login can kick out the previous one.heartbeat_interval
interval in seconds for sending a heartbeat message to the server. This is used to keep the connection alive and to detect when the connection is lost.
Server Configuration
This is the configuration of the neko server.
- YAML Configuration File
- Environment Variables
- Command Line Arguments
NEKO_SERVER_BIND="127.0.0.1:8080"
NEKO_SERVER_CERT=<string>
NEKO_SERVER_KEY=<string>
NEKO_SERVER_CORS=<comma-separated list of strings>
NEKO_SERVER_METRICS=true
NEKO_SERVER_PATH_PREFIX="/"
NEKO_SERVER_PPROF=false
NEKO_SERVER_PROXY=false
NEKO_SERVER_STATIC=<string>
--server.bind "127.0.0.1:8080"
--server.cert <string>
--server.key <string>
--server.cors <comma-separated list of strings>
--server.metrics true
--server.path_prefix "/"
--server.pprof false
--server.proxy false
--server.static <string>
server:
bind: "127.0.0.1:8080"
cert: <string>
key: <string>
cors: [ <string> ]
metrics: true
path_prefix: "/"
pprof: false
proxy: false
static: <string>
bind
address/port/socket to serve neko. For docker you might want to bind to0.0.0.0
to allow connections from outside the container.cert
andkey
paths to the SSL cert and key used to secure the neko server. If both are empty, the server will run in plain HTTP.cors
is a list of allowed origins for CORS.- If empty, CORS is disabled, and only same-origin requests are allowed.
- If
*
is present, all origins are allowed. Neko will respond always with the requested origin, not with*
since credentials are not allowed with wildcard. - If a list of origins is present, only those origins are allowed for CORS.
metrics
when true, prometheus metrics are available at/metrics
.path_prefix
is the prefix for all HTTP requests. This is useful when running neko behind a reverse proxy and you want to serve neko under a subpath, e.g./neko
.pprof
when true, the pprof endpoint is available at/debug/pprof
for debugging and profiling. This should be disabled in production.proxy
when true, neko will trust theX-Forwarded-For
andX-Real-IP
headers from the reverse proxy. Make sure your reverse proxy is configured to set these headers and never trust them when not behind a reverse proxy. See Reverse Proxy Setup for more information.static
path to the directory containing the neko client files to serve. This is useful if you want to serve the client files on the same domain as the server.
Logging Configuration
This is the configuration of the logging system.
- YAML Configuration File
- Environment Variables
- Command Line Arguments
NEKO_LOG_DIR=<string>
NEKO_LOG_JSON=false
NEKO_LOG_LEVEL="info"
NEKO_LOG_NOCOLOR=false
NEKO_LOG_TIME="unix"
--log.dir <string>
--log.json false
--log.level "info"
--log.nocolor false
--log.time "unix"
log:
dir: <string>
json: false
level: "info"
nocolor: false
time: "unix"
dir
directory to store logs. If empty, logs are written to stdout. This is useful when running neko in a container.json
when true, logs are written in JSON format.level
log level to set. Available levels aretrace
,debug
,info
,warn
,error
,fatal
,panic
, anddisabled
.nocolor
when true, ANSI colors are disabled in non-JSON output. Accepts as wellNO_COLOR
environment variable.time
time format used in logs. Available formats areunix
,unixms
, andunixmicro
.
Shortcut environment variable to enable DEBUG mode: NEKO_DEBUG=true
Full Configuration Reference
Here is a full configuration with default values as shown in the help command. Please refer to the sub-sections for more details.
- YAML Configuration File
- Environment Variables
- Command Line Arguments
You can set the following environment variables in your docker-compose.yaml
file or in your shell environment.
# audio codec to be used (string)
NEKO_CAPTURE_AUDIO_CODEC="opus"
# pulseaudio device to capture (string)
NEKO_CAPTURE_AUDIO_DEVICE="audio_output.monitor"
# gstreamer pipeline used for audio streaming (string)
NEKO_CAPTURE_AUDIO_PIPELINE=<string>
# broadcast audio bitrate in KB/s (int)
NEKO_CAPTURE_BROADCAST_AUDIO_BITRATE=128
# automatically start broadcasting when neko starts and broadcast_url is set (boolean)
NEKO_CAPTURE_BROADCAST_AUTOSTART=true
# gstreamer pipeline used for broadcasting (string)
NEKO_CAPTURE_BROADCAST_PIPELINE=<string>
# broadcast speed preset for h264 encoding (string)
NEKO_CAPTURE_BROADCAST_PRESET="veryfast"
# initial URL for broadcasting, setting this value will automatically start broadcasting (string)
NEKO_CAPTURE_BROADCAST_URL=<string>
# broadcast video bitrate in KB/s (int)
NEKO_CAPTURE_BROADCAST_VIDEO_BITRATE=4096
# pulseaudio device used for microphone (string)
NEKO_CAPTURE_MICROPHONE_DEVICE="audio_input"
# enable microphone stream (boolean)
NEKO_CAPTURE_MICROPHONE_ENABLED=true
# enable screencast (boolean)
NEKO_CAPTURE_SCREENCAST_ENABLED=false
# gstreamer pipeline used for screencasting (string)
NEKO_CAPTURE_SCREENCAST_PIPELINE=<string>
# screencast JPEG quality (string)
NEKO_CAPTURE_SCREENCAST_QUALITY="60"
# screencast frame rate (string)
NEKO_CAPTURE_SCREENCAST_RATE="10/1"
# video codec to be used (string)
NEKO_CAPTURE_VIDEO_CODEC="vp8"
# X display to capture (string)
NEKO_CAPTURE_VIDEO_DISPLAY=<string>
# ordered list of video ids (strings)
NEKO_CAPTURE_VIDEO_IDS=<comma-separated list of strings>
# shortcut for configuring only a single gstreamer pipeline, ignored if pipelines is set (string)
NEKO_CAPTURE_VIDEO_PIPELINE=<string>
# pipelines config used for video streaming (object)
NEKO_CAPTURE_VIDEO_PIPELINES=<json encoded object>
# v4l2sink device used for webcam (string)
NEKO_CAPTURE_WEBCAM_DEVICE="/dev/video0"
# enable webcam stream (boolean)
NEKO_CAPTURE_WEBCAM_ENABLED=false
# webcam stream height (int)
NEKO_CAPTURE_WEBCAM_HEIGHT=720
# webcam stream width (int)
NEKO_CAPTURE_WEBCAM_WIDTH=1280
# X display to use for desktop sharing (string)
NEKO_DESKTOP_DISPLAY=<string>
# whether to handle file chooser dialog externally (boolean)
NEKO_DESKTOP_FILE_CHOOSER_DIALOG=false
# whether custom xf86 input driver should be used to handle touchscreen (boolean)
NEKO_DESKTOP_INPUT_ENABLED=true
# socket path for custom xf86 input driver connection (string)
NEKO_DESKTOP_INPUT_SOCKET="/tmp/xf86-input-neko.sock"
# default screen size and framerate (string)
NEKO_DESKTOP_SCREEN="1280x720@30"
# automatically unminimize window when it is minimized (boolean)
NEKO_DESKTOP_UNMINIMIZE=true
# whether drop upload is enabled (boolean)
NEKO_DESKTOP_UPLOAD_DROP=true
# member file provider: whether the passwords are hashed using sha256 or not (recommended) (boolean)
NEKO_MEMBER_FILE_HASH=true
# member file provider: path to the file containing the users and their passwords (string)
NEKO_MEMBER_FILE_PATH=<string>
# member multiuser provider: password for admin users (string)
NEKO_MEMBER_MULTIUSER_ADMIN_PASSWORD="admin"
# member multiuser provider: profile template for admin users (object)
NEKO_MEMBER_MULTIUSER_ADMIN_PROFILE=<json encoded object>
# member multiuser provider: password for regular users (string)
NEKO_MEMBER_MULTIUSER_USER_PASSWORD="neko"
# member multiuser provider: profile template for regular users (object)
NEKO_MEMBER_MULTIUSER_USER_PROFILE=<json encoded object>
# member object provider: list of users with their passwords and profiles (array)
NEKO_MEMBER_OBJECT_USERS=<json encoded array>
# selected member provider (string)
NEKO_MEMBER_PROVIDER="multiuser"
# path to neko plugins to load (string)
NEKO_PLUGINS_DIR="./bin/plugins"
# load plugins in runtime (boolean)
NEKO_PLUGINS_ENABLED=false
# if true, neko will exit if there is an error when loading a plugin (boolean)
NEKO_PLUGINS_REQUIRED=false
# address/port/socket to serve neko (string)
NEKO_SERVER_BIND="127.0.0.1:8080"
# path to the SSL cert used to secure the neko server (string)
NEKO_SERVER_CERT=<string>
# list of allowed origins for CORS, if empty CORS is disabled, if '*' is present all origins are allowed (strings)
NEKO_SERVER_CORS=<comma-separated list of strings>
# path to the SSL key used to secure the neko server (string)
NEKO_SERVER_KEY=<string>
# enable prometheus metrics available at /metrics (boolean)
NEKO_SERVER_METRICS=true
# path prefix for HTTP requests (string)
NEKO_SERVER_PATH_PREFIX="/"
# enable pprof endpoint available at /debug/pprof (boolean)
NEKO_SERVER_PPROF=false
# trust reverse proxy headers (boolean)
NEKO_SERVER_PROXY=false
# path to neko client files to serve (string)
NEKO_SERVER_STATIC=<string>
# API token for interacting with external services (string)
NEKO_SESSION_API_TOKEN=<string>
# users can gain control only if at least one admin is in the room (boolean)
NEKO_SESSION_CONTROL_PROTECTION=false
# domain of the cookie (string)
NEKO_SESSION_COOKIE_DOMAIN=<string>
# whether cookies authentication should be enabled (boolean)
NEKO_SESSION_COOKIE_ENABLED=true
# expiration of the cookie (duration)
NEKO_SESSION_COOKIE_EXPIRATION="24h0m0s"
# use http only cookies (boolean)
NEKO_SESSION_COOKIE_HTTP_ONLY=true
# name of the cookie that holds token (string)
NEKO_SESSION_COOKIE_NAME="NEKO_SESSION"
# path of the cookie (string)
NEKO_SESSION_COOKIE_PATH=<string>
# use secure cookies (boolean)
NEKO_SESSION_COOKIE_SECURE=true
# if sessions should be stored in a file, otherwise they will be stored only in memory (string)
NEKO_SESSION_FILE=<string>
# interval in seconds for sending heartbeat messages (int)
NEKO_SESSION_HEARTBEAT_INTERVAL=120
# allow implicit control switching (boolean)
NEKO_SESSION_IMPLICIT_HOSTING=true
# show inactive cursors on the screen (boolean)
NEKO_SESSION_INACTIVE_CURSORS=false
# whether controls should be locked for users initially (boolean)
NEKO_SESSION_LOCKED_CONTROLS=false
# whether logins should be locked for users initially (boolean)
NEKO_SESSION_LOCKED_LOGINS=false
# allow reconnecting to websocket even if previous connection was not closed (boolean)
NEKO_SESSION_MERCIFUL_RECONNECT=true
# whether private mode should be enabled initially (boolean)
NEKO_SESSION_PRIVATE_MODE=false
# limits the pool of ephemeral ports that ICE UDP connections can allocate from (string)
NEKO_WEBRTC_EPR=<string>
# enables debug logging for the bandwidth estimator (boolean)
NEKO_WEBRTC_ESTIMATOR_DEBUG=false
# how bigger the difference between estimated and stream bitrate must be to trigger upgrade/downgrade (float)
NEKO_WEBRTC_ESTIMATOR_DIFF_THRESHOLD=0.15
# how long to wait before downgrading again after previous downgrade (duration)
NEKO_WEBRTC_ESTIMATOR_DOWNGRADE_BACKOFF="10s"
# enables the bandwidth estimator (boolean)
NEKO_WEBRTC_ESTIMATOR_ENABLED=false
# initial bitrate for the bandwidth estimator (int)
NEKO_WEBRTC_ESTIMATOR_INITIAL_BITRATE=1000000
# passive estimator mode, when it does not switch pipelines, only estimates (boolean)
NEKO_WEBRTC_ESTIMATOR_PASSIVE=false
# how often to read and process bandwidth estimation reports (duration)
NEKO_WEBRTC_ESTIMATOR_READ_INTERVAL="2s"
# how long to wait for stable connection (upward or neutral trend) before upgrading (duration)
NEKO_WEBRTC_ESTIMATOR_STABLE_DURATION="12s"
# how long to wait for stalled bandwidth estimation before downgrading (duration)
NEKO_WEBRTC_ESTIMATOR_STALLED_DURATION="24s"
# how long to wait for stalled connection (neutral trend with low bandwidth) before downgrading (duration)
NEKO_WEBRTC_ESTIMATOR_UNSTABLE_DURATION="6s"
# how long to wait before upgrading again after previous upgrade (duration)
NEKO_WEBRTC_ESTIMATOR_UPGRADE_BACKOFF="5s"
# configures whether or not the ICE agent should be a lite agent (boolean)
NEKO_WEBRTC_ICELITE=false
# STUN and TURN servers used by the backend (array)
NEKO_WEBRTC_ICESERVERS_BACKEND=<json encoded array>
# STUN and TURN servers used by the frontend (array)
NEKO_WEBRTC_ICESERVERS_FRONTEND=<json encoded array>
# configures whether cadidates should be sent asynchronously using Trickle ICE (boolean)
NEKO_WEBRTC_ICETRICKLE=true
# URL address used for retrieval of the external IP address (string)
NEKO_WEBRTC_IP_RETRIEVAL_URL="https://checkip.amazonaws.com"
# sets a list of external IP addresses of 1:1 (D)NAT and a candidate type for which the external IP address is used (strings)
NEKO_WEBRTC_NAT1TO1=<comma-separated list of strings>
# single TCP mux port for all peers (int)
NEKO_WEBRTC_TCPMUX=0
# single UDP mux port for all peers, replaces EPR (int)
NEKO_WEBRTC_UDPMUX=0
# configuration file path (string)
NEKO_CONFIG=<string>
# enable debug mode (boolean)
NEKO_DEBUG=false
# logging directory to store logs (string)
NEKO_LOG_DIR=<string>
# logs in JSON format (boolean)
NEKO_LOG_JSON=false
# set log level (trace, debug, info, warn, error, fatal, panic, disabled) (string)
NEKO_LOG_LEVEL="info"
# no ANSI colors in non-JSON output (boolean)
NEKO_LOG_NOCOLOR=false
# time format used in logs (unix, unixms, unixmicro) (string)
NEKO_LOG_TIME="unix"
You can list the following command line arguments using neko serve --help
.
# audio codec to be used (string)
--capture.audio.codec "opus"
# pulseaudio device to capture (string)
--capture.audio.device "audio_output.monitor"
# gstreamer pipeline used for audio streaming (string)
--capture.audio.pipeline <string>
# broadcast audio bitrate in KB/s (int)
--capture.broadcast.audio_bitrate 128
# automatically start broadcasting when neko starts and broadcast_url is set (boolean)
--capture.broadcast.autostart true
# gstreamer pipeline used for broadcasting (string)
--capture.broadcast.pipeline <string>
# broadcast speed preset for h264 encoding (string)
--capture.broadcast.preset "veryfast"
# initial URL for broadcasting, setting this value will automatically start broadcasting (string)
--capture.broadcast.url <string>
# broadcast video bitrate in KB/s (int)
--capture.broadcast.video_bitrate 4096
# pulseaudio device used for microphone (string)
--capture.microphone.device "audio_input"
# enable microphone stream (boolean)
--capture.microphone.enabled true
# enable screencast (boolean)
--capture.screencast.enabled false
# gstreamer pipeline used for screencasting (string)
--capture.screencast.pipeline <string>
# screencast JPEG quality (string)
--capture.screencast.quality "60"
# screencast frame rate (string)
--capture.screencast.rate "10/1"
# video codec to be used (string)
--capture.video.codec "vp8"
# X display to capture (string)
--capture.video.display <string>
# ordered list of video ids (strings)
--capture.video.ids <comma-separated list of strings>
# shortcut for configuring only a single gstreamer pipeline, ignored if pipelines is set (string)
--capture.video.pipeline <string>
# pipelines config used for video streaming (object)
--capture.video.pipelines <json encoded object>
# v4l2sink device used for webcam (string)
--capture.webcam.device "/dev/video0"
# enable webcam stream (boolean)
--capture.webcam.enabled false
# webcam stream height (int)
--capture.webcam.height 720
# webcam stream width (int)
--capture.webcam.width 1280
# X display to use for desktop sharing (string)
--desktop.display <string>
# whether to handle file chooser dialog externally (boolean)
--desktop.file_chooser_dialog false
# whether custom xf86 input driver should be used to handle touchscreen (boolean)
--desktop.input.enabled true
# socket path for custom xf86 input driver connection (string)
--desktop.input.socket "/tmp/xf86-input-neko.sock"
# default screen size and framerate (string)
--desktop.screen "1280x720@30"
# automatically unminimize window when it is minimized (boolean)
--desktop.unminimize true
# whether drop upload is enabled (boolean)
--desktop.upload_drop true
# member file provider: whether the passwords are hashed using sha256 or not (recommended) (boolean)
--member.file.hash true
# member file provider: path to the file containing the users and their passwords (string)
--member.file.path <string>
# member multiuser provider: password for admin users (string)
--member.multiuser.admin_password "admin"
# member multiuser provider: profile template for admin users (object)
--member.multiuser.admin_profile <json encoded object>
# member multiuser provider: password for regular users (string)
--member.multiuser.user_password "neko"
# member multiuser provider: profile template for regular users (object)
--member.multiuser.user_profile <json encoded object>
# member object provider: list of users with their passwords and profiles (array)
--member.object.users <json encoded array>
# selected member provider (string)
--member.provider "multiuser"
# path to neko plugins to load (string)
--plugins.dir "./bin/plugins"
# load plugins in runtime (boolean)
--plugins.enabled false
# if true, neko will exit if there is an error when loading a plugin (boolean)
--plugins.required false
# address/port/socket to serve neko (string)
--server.bind "127.0.0.1:8080"
# path to the SSL cert used to secure the neko server (string)
--server.cert <string>
# list of allowed origins for CORS, if empty CORS is disabled, if '*' is present all origins are allowed (strings)
--server.cors <comma-separated list of strings>
# path to the SSL key used to secure the neko server (string)
--server.key <string>
# enable prometheus metrics available at /metrics (boolean)
--server.metrics true
# path prefix for HTTP requests (string)
--server.path_prefix "/"
# enable pprof endpoint available at /debug/pprof (boolean)
--server.pprof false
# trust reverse proxy headers (boolean)
--server.proxy false
# path to neko client files to serve (string)
--server.static <string>
# API token for interacting with external services (string)
--session.api_token <string>
# users can gain control only if at least one admin is in the room (boolean)
--session.control_protection false
# domain of the cookie (string)
--session.cookie.domain <string>
# whether cookies authentication should be enabled (boolean)
--session.cookie.enabled true
# expiration of the cookie (duration)
--session.cookie.expiration "24h0m0s"
# use http only cookies (boolean)
--session.cookie.http_only true
# name of the cookie that holds token (string)
--session.cookie.name "NEKO_SESSION"
# path of the cookie (string)
--session.cookie.path <string>
# use secure cookies (boolean)
--session.cookie.secure true
# if sessions should be stored in a file, otherwise they will be stored only in memory (string)
--session.file <string>
# interval in seconds for sending heartbeat messages (int)
--session.heartbeat_interval 120
# allow implicit control switching (boolean)
--session.implicit_hosting true
# show inactive cursors on the screen (boolean)
--session.inactive_cursors false
# whether controls should be locked for users initially (boolean)
--session.locked_controls false
# whether logins should be locked for users initially (boolean)
--session.locked_logins false
# allow reconnecting to websocket even if previous connection was not closed (boolean)
--session.merciful_reconnect true
# whether private mode should be enabled initially (boolean)
--session.private_mode false
# limits the pool of ephemeral ports that ICE UDP connections can allocate from (string)
--webrtc.epr <string>
# enables debug logging for the bandwidth estimator (boolean)
--webrtc.estimator.debug false
# how bigger the difference between estimated and stream bitrate must be to trigger upgrade/downgrade (float)
--webrtc.estimator.diff_threshold 0.15
# how long to wait before downgrading again after previous downgrade (duration)
--webrtc.estimator.downgrade_backoff "10s"
# enables the bandwidth estimator (boolean)
--webrtc.estimator.enabled false
# initial bitrate for the bandwidth estimator (int)
--webrtc.estimator.initial_bitrate 1000000
# passive estimator mode, when it does not switch pipelines, only estimates (boolean)
--webrtc.estimator.passive false
# how often to read and process bandwidth estimation reports (duration)
--webrtc.estimator.read_interval "2s"
# how long to wait for stable connection (upward or neutral trend) before upgrading (duration)
--webrtc.estimator.stable_duration "12s"
# how long to wait for stalled bandwidth estimation before downgrading (duration)
--webrtc.estimator.stalled_duration "24s"
# how long to wait for stalled connection (neutral trend with low bandwidth) before downgrading (duration)
--webrtc.estimator.unstable_duration "6s"
# how long to wait before upgrading again after previous upgrade (duration)
--webrtc.estimator.upgrade_backoff "5s"
# configures whether or not the ICE agent should be a lite agent (boolean)
--webrtc.icelite false
# STUN and TURN servers used by the backend (array)
--webrtc.iceservers.backend <json encoded array>
# STUN and TURN servers used by the frontend (array)
--webrtc.iceservers.frontend <json encoded array>
# configures whether cadidates should be sent asynchronously using Trickle ICE (boolean)
--webrtc.icetrickle true
# URL address used for retrieval of the external IP address (string)
--webrtc.ip_retrieval_url "https://checkip.amazonaws.com"
# sets a list of external IP addresses of 1:1 (D)NAT and a candidate type for which the external IP address is used (strings)
--webrtc.nat1to1 <comma-separated list of strings>
# single TCP mux port for all peers (int)
--webrtc.tcpmux 0
# single UDP mux port for all peers, replaces EPR (int)
--webrtc.udpmux 0
# configuration file path (string)
--config <string>
# enable debug mode (boolean)
--debug false
# logging directory to store logs (string)
--log.dir <string>
# logs in JSON format (boolean)
--log.json false
# set log level (trace, debug, info, warn, error, fatal, panic, disabled) (string)
--log.level "info"
# no ANSI colors in non-JSON output (boolean)
--log.nocolor false
# time format used in logs (unix, unixms, unixmicro) (string)
--log.time "unix"
You can create a /etc/neko/neko.yaml
file with the following configuration options.
capture:
audio:
# audio codec to be used (string)
codec: "opus"
# pulseaudio device to capture (string)
device: "audio_output.monitor"
# gstreamer pipeline used for audio streaming (string)
pipeline: <string>
broadcast:
# broadcast audio bitrate in KB/s (int)
audio_bitrate: 128
# automatically start broadcasting when neko starts and broadcast_url is set (boolean)
autostart: true
# gstreamer pipeline used for broadcasting (string)
pipeline: <string>
# broadcast speed preset for h264 encoding (string)
preset: "veryfast"
# initial URL for broadcasting, setting this value will automatically start broadcasting (string)
url: <string>
# broadcast video bitrate in KB/s (int)
video_bitrate: 4096
microphone:
# pulseaudio device used for microphone (string)
device: "audio_input"
# enable microphone stream (boolean)
enabled: true
screencast:
# enable screencast (boolean)
enabled: false
# gstreamer pipeline used for screencasting (string)
pipeline: <string>
# screencast JPEG quality (string)
quality: "60"
# screencast frame rate (string)
rate: "10/1"
video:
# video codec to be used (string)
codec: "vp8"
# X display to capture (string)
display: <string>
# ordered list of video ids (strings)
ids: [ <string> ]
# shortcut for configuring only a single gstreamer pipeline, ignored if pipelines is set (string)
pipeline: <string>
# pipelines config used for video streaming (object)
pipelines: {}
webcam:
# v4l2sink device used for webcam (string)
device: "/dev/video0"
# enable webcam stream (boolean)
enabled: false
# webcam stream height (int)
height: 720
# webcam stream width (int)
width: 1280
desktop:
# X display to use for desktop sharing (string)
display: <string>
# whether to handle file chooser dialog externally (boolean)
file_chooser_dialog: false
input:
# whether custom xf86 input driver should be used to handle touchscreen (boolean)
enabled: true
# socket path for custom xf86 input driver connection (string)
socket: "/tmp/xf86-input-neko.sock"
# default screen size and framerate (string)
screen: "1280x720@30"
# automatically unminimize window when it is minimized (boolean)
unminimize: true
# whether drop upload is enabled (boolean)
upload_drop: true
member:
file:
# member file provider: whether the passwords are hashed using sha256 or not (recommended) (boolean)
hash: true
# member file provider: path to the file containing the users and their passwords (string)
path: <string>
multiuser:
# member multiuser provider: password for admin users (string)
admin_password: "admin"
# member multiuser provider: profile template for admin users (object)
admin_profile: {}
# member multiuser provider: password for regular users (string)
user_password: "neko"
# member multiuser provider: profile template for regular users (object)
user_profile: {}
object:
# member object provider: list of users with their passwords and profiles (array)
users: []
# selected member provider (string)
provider: "multiuser"
plugins:
# path to neko plugins to load (string)
dir: "./bin/plugins"
# load plugins in runtime (boolean)
enabled: false
# if true, neko will exit if there is an error when loading a plugin (boolean)
required: false
server:
# address/port/socket to serve neko (string)
bind: "127.0.0.1:8080"
# path to the SSL cert used to secure the neko server (string)
cert: <string>
# list of allowed origins for CORS, if empty CORS is disabled, if '*' is present all origins are allowed (strings)
cors: [ <string> ]
# path to the SSL key used to secure the neko server (string)
key: <string>
# enable prometheus metrics available at /metrics (boolean)
metrics: true
# path prefix for HTTP requests (string)
path_prefix: "/"
# enable pprof endpoint available at /debug/pprof (boolean)
pprof: false
# trust reverse proxy headers (boolean)
proxy: false
# path to neko client files to serve (string)
static: <string>
session:
# API token for interacting with external services (string)
api_token: <string>
# users can gain control only if at least one admin is in the room (boolean)
control_protection: false
cookie:
# domain of the cookie (string)
domain: <string>
# whether cookies authentication should be enabled (boolean)
enabled: true
# expiration of the cookie (duration)
expiration: "24h0m0s"
# use http only cookies (boolean)
http_only: true
# name of the cookie that holds token (string)
name: "NEKO_SESSION"
# path of the cookie (string)
path: <string>
# use secure cookies (boolean)
secure: true
# if sessions should be stored in a file, otherwise they will be stored only in memory (string)
file: <string>
# interval in seconds for sending heartbeat messages (int)
heartbeat_interval: 120
# allow implicit control switching (boolean)
implicit_hosting: true
# show inactive cursors on the screen (boolean)
inactive_cursors: false
# whether controls should be locked for users initially (boolean)
locked_controls: false
# whether logins should be locked for users initially (boolean)
locked_logins: false
# allow reconnecting to websocket even if previous connection was not closed (boolean)
merciful_reconnect: true
# whether private mode should be enabled initially (boolean)
private_mode: false
webrtc:
# limits the pool of ephemeral ports that ICE UDP connections can allocate from (string)
epr: <string>
estimator:
# enables debug logging for the bandwidth estimator (boolean)
debug: false
# how bigger the difference between estimated and stream bitrate must be to trigger upgrade/downgrade (float)
diff_threshold: 0.15
# how long to wait before downgrading again after previous downgrade (duration)
downgrade_backoff: "10s"
# enables the bandwidth estimator (boolean)
enabled: false
# initial bitrate for the bandwidth estimator (int)
initial_bitrate: 1000000
# passive estimator mode, when it does not switch pipelines, only estimates (boolean)
passive: false
# how often to read and process bandwidth estimation reports (duration)
read_interval: "2s"
# how long to wait for stable connection (upward or neutral trend) before upgrading (duration)
stable_duration: "12s"
# how long to wait for stalled bandwidth estimation before downgrading (duration)
stalled_duration: "24s"
# how long to wait for stalled connection (neutral trend with low bandwidth) before downgrading (duration)
unstable_duration: "6s"
# how long to wait before upgrading again after previous upgrade (duration)
upgrade_backoff: "5s"
# configures whether or not the ICE agent should be a lite agent (boolean)
icelite: false
iceservers:
# STUN and TURN servers used by the backend (array)
backend: []
# STUN and TURN servers used by the frontend (array)
frontend: []
# configures whether cadidates should be sent asynchronously using Trickle ICE (boolean)
icetrickle: true
# URL address used for retrieval of the external IP address (string)
ip_retrieval_url: "https://checkip.amazonaws.com"
# sets a list of external IP addresses of 1:1 (D)NAT and a candidate type for which the external IP address is used (strings)
nat1to1: [ <string> ]
# single TCP mux port for all peers (int)
tcpmux: 0
# single UDP mux port for all peers, replaces EPR (int)
udpmux: 0
# configuration file path (string)
config: <string>
# enable debug mode (boolean)
debug: false
log:
# logging directory to store logs (string)
dir: <string>
# logs in JSON format (boolean)
json: false
# set log level (trace, debug, info, warn, error, fatal, panic, disabled) (string)
level: "info"
# no ANSI colors in non-JSON output (boolean)
nocolor: false
# time format used in logs (unix, unixms, unixmicro) (string)
time: "unix"
Next Steps
📄️ Authentication
Configuration related to the Authentication and Sessions in Neko.
📄️ Audio & Video Capture
Configuration related to Gstreamer capture in Neko.
📄️ Desktop Environment
Configuration related to the Desktop Environment in Neko.
📄️ WebRTC Configuration
Configuration related to the WebRTC and Networking in Neko.
📄️ Plugins Configuration
Configuration related to the Neko plugins.