### JSON Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example of a Neko server configuration file in JSON format. This demonstrates the equivalent configuration to the YAML example. ```json { "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" ] } ] } } } ``` -------------------------------- ### Install Docker Source: https://neko.m1k1o.net/docs/v3/quick-start Installs the stable version of Docker on your system using a convenience script. ```bash curl -sSL https://get.docker.com/ | CHANNEL=stable bash ``` -------------------------------- ### C# HttpClient Example Source: https://neko.m1k1o.net/docs/v3/api/keyboard-map-get Example of how to make a GET request to the keyboard map API using HttpClient in C#. Ensure to replace `` with a valid authentication token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/room/keyboard/map"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### YAML Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example of a Neko server configuration file in YAML format. This is the default format used throughout the documentation. ```yaml 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 ] ``` -------------------------------- ### TOML Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example of a Neko server configuration file in TOML format. This format is often used for its readability and simplicity. ```toml [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" ] ``` -------------------------------- ### Envfile Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example of a Neko server configuration using an .env file. This format is convenient for environment variable-based configuration. ```env 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"]}]" ``` -------------------------------- ### Neko YAML Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example configuration for `/etc/neko/neko.yaml`. This file allows detailed customization of capture devices, broadcasting, desktop sharing, member management, plugins, server, and session settings. ```yaml 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: 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: # broadcast speed preset for h264 encoding (string) preset: "veryfast" # initial URL for broadcasting, setting this value will automatically start broadcasting (string) url: # 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: # 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: # ordered list of video ids (strings) ids: [ ] # shortcut for configuring only a single gstreamer pipeline, ignored if pipelines is set (string) pipeline: # 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: # 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: 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: # list of allowed origins for CORS, if empty CORS is disabled, if '*' is present all origins are allowed (strings) cors: [ ] # path to the SSL key used to secure the neko server (string) key: # 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: session: # API token for interacting with external services (string) api_token: # 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: # whether cookies authentication should be enabled (boolean) enabled: true ``` -------------------------------- ### C# HttpClient Example Source: https://neko.m1k1o.net/docs/v3/api/keyboard-modifiers-get Example of how to make a GET request to retrieve keyboard modifiers using HttpClient in C#. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/room/keyboard/modifiers"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example for Creating Member Source: https://neko.m1k1o.net/docs/v3/api/members-create Example demonstrating how to create a member using HttpClient in C#. Ensure you replace `` with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/members"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"username\": \"string\",\n \"password\": \"string\",\n \"profile\": {\n \"name\": \"string\",\n \"is_admin\": true,\n \"can_login\": true,\n \"can_connect\": true,\n \"can_watch\": true,\n \"can_host\": true,\n \"can_share_media\": true,\n \"can_access_clipboard\": true,\n \"sends_inactive_cursor\": true,\n \"can_see_inactive_cursors\": true,\n \"plugins\": {}\n }\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example Source: https://neko.m1k1o.net/docs/v3/api/control-take Example of taking control of a room using HttpClient in C#. Ensure to replace `` with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/room/control/take"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example Source: https://neko.m1k1o.net/docs/v3/api/stats Example of how to make a GET request to the /api/stats endpoint using HttpClient in C#. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/stats"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Download and Start Neko with Docker Compose Source: https://neko.m1k1o.net/docs/v3/quick-start Downloads the Neko docker-compose configuration file and starts the Neko service in detached mode. ```bash wget https://raw.githubusercontent.com/m1k1o/neko/master/docker-compose.yaml sudo docker compose up -d ``` -------------------------------- ### Install Pulseaudio Source: https://neko.m1k1o.net/docs/v3/developer-guide Installs Pulseaudio for audio support on Debian-based systems. ```bash sudo apt-get install pulseaudio; ``` -------------------------------- ### Install Other Dependencies Source: https://neko.m1k1o.net/docs/v3/developer-guide Installs additional utilities and libraries including xdotool, xclip, GTK, Opus, and VPX. ```bash sudo apt-get install xdotool xclip libgtk-3-0 libgtk-3-dev libopus0 libvpx6; ``` -------------------------------- ### Force Install Specific Extensions Source: https://neko.m1k1o.net/docs/v3/customization/browsers Force install specific extensions like SponsorBlock and uBlock Origin by providing their installation URLs and setting 'installation_mode' to 'force_installed'. ```json { "policies": { "ExtensionSettings": { "*": { "installation_mode": "blocked" }, "sponsorBlocker@ajay.app": { "install_url": "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi", "installation_mode": "force_installed" }, "uBlock0@raymondhill.net": { "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi", "installation_mode": "force_installed" } } } } ``` -------------------------------- ### Build Neko Frontend Source: https://neko.m1k1o.net/docs/v3/developer-guide/build Navigate to the client directory, install frontend dependencies, and build the production version of the frontend. ```bash cd client; npm install; npm run build; ``` -------------------------------- ### Install X.Org Dependencies Source: https://neko.m1k1o.net/docs/v3/developer-guide Installs X.Org development libraries required for X11 server interaction. ```bash sudo apt-get install libx11-dev libxrandr-dev libxtst-dev libxcvt-dev xorg; ``` -------------------------------- ### Successful Response Example (200 OK) Source: https://neko.m1k1o.net/docs/v3/api/whoami Example JSON response when the user information is retrieved successfully. Includes user ID, profile details, and state. ```json { "id": "string", "profile": { "name": "string", "is_admin": true, "can_login": true, "can_connect": true, "can_watch": true, "can_host": true, "can_share_media": true, "can_access_clipboard": true, "sends_inactive_cursor": true, "can_see_inactive_cursors": true, "plugins": {} }, "state": { "is_connected": true, "is_watching": true } } ``` -------------------------------- ### HCL Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example of a Neko server configuration file in HCL (HashiCorp Configuration Language) format. This format is known for its flexibility. ```hcl 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" ] } } } ``` -------------------------------- ### Install Server Build Dependencies Source: https://neko.m1k1o.net/docs/v3/developer-guide/build Install the necessary system libraries required for building the Neko server. This command is for Debian-based systems. ```bash sudo apt-get install -y --no-install-recommends libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev libxcvt-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev ``` -------------------------------- ### GHCR Neko Docker Image Versioning Examples Source: https://neko.m1k1o.net/docs/v3/installation/docker-images Examples demonstrating the versioning scheme for Neko Docker images on GHCR, including 'latest', major, major.minor, and specific patch versions. ```text ghcr.io/m1k1o/neko/firefox:latest ``` ```text ghcr.io/m1k1o/neko/firefox:3 ``` ```text ghcr.io/m1k1o/neko/firefox:3.0 ``` ```text ghcr.io/m1k1o/neko/firefox:3.0.0 ``` -------------------------------- ### Install and Load v4l2loopback Module Source: https://neko.m1k1o.net/docs/v3/configuration/capture Commands to install the v4l2loopback kernel module on Debian/Ubuntu and load it with `exclusive_caps=1`. ```bash # Install the required packages (Debian/Ubuntu) sudo apt install v4l2loopback-dkms v4l2loopback-utils linux-headers-`uname -r` linux-modules-extra-`uname -r` # Load the module with exclusive_caps=1 to allow multiple applications to access the virtual webcam sudo modprobe v4l2loopback exclusive_caps=1 ``` -------------------------------- ### Java Properties Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration Example of a Neko server configuration using Java Properties format. This format is commonly used in Java applications. ```properties 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 ``` -------------------------------- ### Create Member Request Body Example Source: https://neko.m1k1o.net/docs/v3/api/members-create Example of the JSON body required to create a new member. All fields within 'profile' are optional. ```json { "username": "string", "password": "string", "profile": { "name": "string", "is_admin": true, "can_login": true, "can_connect": true, "can_watch": true, "can_host": true, "can_share_media": true, "can_access_clipboard": true, "sends_inactive_cursor": true, "can_see_inactive_cursors": true, "plugins": {} } } ``` -------------------------------- ### Successful Response Example Source: https://neko.m1k1o.net/docs/v3/api/keyboard-modifiers-get Example of a successful JSON response when retrieving keyboard modifiers. ```json { "shift": true, "capslock": true, "control": true, "alt": true, "numlock": true, "meta": true, "super": true, "altgr": true } ``` -------------------------------- ### Example Object Member Configuration (YAML) Source: https://neko.m1k1o.net/docs/v3/configuration/authentication An example YAML configuration defining two users, 'admin' and 'user', with their respective passwords and profiles. The 'admin' user has administrator privileges. ```yaml member: provider: object object: users: - username: "admin" password: "admin" profile: name: "Administrator" is_admin: true can_login: true can_connect: true can_watch: true can_host: true can_share_media: true can_access_clipboard: true sends_inactive_cursor: true can_see_inactive_cursors: true - username: "user" password: "neko" profile: name: "User" is_admin: false can_login: true can_connect: true can_watch: true can_host: true can_share_media: true can_access_clipboard: true sends_inactive_cursor: true can_see_inactive_cursors: false ``` -------------------------------- ### Install Netcat Package Source: https://neko.m1k1o.net/docs/v3/troubleshooting If the 'nc' command is not found, install the netcat package using your system's package manager. ```bash sudo apt-get install netcat ``` -------------------------------- ### C# HttpClient Example Source: https://neko.m1k1o.net/docs/v3/api/screen-shot-image Example using C# HttpClient to retrieve a screenshot. Ensure to replace '' with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/room/screen/shot.jpg"); request.Headers.Add("Accept", "image/jpeg"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Remmina Configuration File Example Source: https://neko.m1k1o.net/docs/v3/installation/docker-images A sample Remmina configuration file (`.remmina`) defining connection details for a VNC server. ```ini [remmina] name=Default protocol=VNC server=server.local port=5900 ``` -------------------------------- ### C# HttpClient Example for Setting Keyboard Map Source: https://neko.m1k1o.net/docs/v3/api/keyboard-map-set Example demonstrating how to use HttpClient in C# to send a POST request to update the keyboard map. Ensure to replace "" with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/room/keyboard/map"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"layout\": \"sk\",\n \"variant\": \"qwerty\"\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Example Screencast Gstreamer Pipeline Source: https://neko.m1k1o.net/docs/v3/configuration/capture An example Gstreamer pipeline for screencasting, specifying framerate and quality. The `{display}` placeholder is used for the X display name. ```yaml capture: screencast: enabled: true pipeline: | ximagesrc display-name={display} show-pointer=true use-damage=false ! video/x-raw,framerate=10/1 ! videoconvert ! queue ! jpegenc quality=60 ! appsink name=appsink ``` -------------------------------- ### C# HttpClient Example for Upload and Drop Source: https://neko.m1k1o.net/docs/v3/api/upload-drop Example using C# HttpClient to send a POST request for uploading and dropping files. Ensure to replace `` with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/room/upload/drop"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent(string.Empty); content.Headers.ContentType = new MediaTypeHeaderValue("multipart/form-data"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example Source: https://neko.m1k1o.net/docs/v3/api/clipboard-get-text Example of how to retrieve clipboard content using HttpClient in C#. Ensure to replace "" with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/room/clipboard"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Block All Extension Installations Source: https://neko.m1k1o.net/docs/v3/customization/browsers Set the 'installation_mode' to 'blocked' for all extensions to prevent users from installing any new extensions. ```json { "policies": { "ExtensionSettings": { "*": { "installation_mode": "blocked" } } } } ``` -------------------------------- ### Install Docker Compose Plugin Source: https://neko.m1k1o.net/docs/v3/quick-start Installs the Docker Compose plugin for managing multi-container Docker applications. ```bash sudo apt-get update sudo apt-get install docker-compose-plugin ``` -------------------------------- ### C# HttpClient Example for Bulk Member Update Source: https://neko.m1k1o.net/docs/v3/api/members-bulk-update Example using C# HttpClient to update member profiles in bulk. Requires setting the Authorization header and JSON content. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/members_bulk/update"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{ \n \"ids\": [ \n \"string\" \n ], \n \"profile\": { \n \"name\": \"string\", \n \"is_admin\": true, \n \"can_login\": true, \n \"can_connect\": true, \n \"can_watch\": true, \n \"can_host\": true, \n \"can_share_media\": true, \n \"can_access_clipboard\": true, \n \"sends_inactive_cursor\": true, \n \"can_see_inactive_cursors\": true, \n \"plugins\": {} \n } \n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example for Resetting Room Control Source: https://neko.m1k1o.net/docs/v3/api/control-reset Example demonstrating how to reset room control status using HttpClient in C#. Requires a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/room/control/reset"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example for Release Control Source: https://neko.m1k1o.net/docs/v3/api/control-release Example of how to use HttpClient in C# to send a POST request to the Release Control API. Ensure you replace `` with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3000/api/room/control/release"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Get Member Profile Request (C#) Source: https://neko.m1k1o.net/docs/v3/api/members-get-profile Example of how to make a GET request to retrieve a member's profile using HttpClient in C#. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/members/:memberId"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Get List of Screen Configurations Source: https://neko.m1k1o.net/docs/v3/api/room-screen Retrieve a list of all available screen configurations. ```APIDOC ## GET /room/screen/configurations ### Description Retrieve a list of all available screen configurations. ### Method GET ### Endpoint /room/screen/configurations ``` -------------------------------- ### Make Authenticated GET Request using C# HttpClient Source: https://neko.m1k1o.net/docs/v3/api/whoami Example of how to make a GET request to the /api/whoami endpoint using C#'s HttpClient, including setting the Authorization header with a Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/whoami"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Clone Neko Repository Source: https://neko.m1k1o.net/docs/v3/developer-guide/build Start by cloning the Neko Git repository to your machine and navigating into the project directory. ```bash git clone https://github.com/m1k1o/neko.git cd neko ``` -------------------------------- ### Make Health Check Request with HttpClient Source: https://neko.m1k1o.net/docs/v3/api/healthcheck Example of how to perform a GET request to the health check endpoint using HttpClient in C#. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/health"); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Run Neko with Docker Source: https://neko.m1k1o.net/docs/v3/installation Use this command to start a basic Neko container. It maps necessary ports and sets essential environment variables for user authentication and WebRTC configuration. ```bash docker run -d --rm \ -p 8080:8080 \ -p 56000-56100:56000-56100/udp \ -e NEKO_WEBRTC_EPR=56000-56100 \ -e NEKO_WEBRTC_NAT1TO1=127.0.0.1 \ -e NEKO_MEMBER_MULTIUSER_USER_PASSWORD=neko \ -e NEKO_MEMBER_MULTIUSER_ADMIN_PASSWORD=admin \ ghcr.io/m1k1o/neko/firefox:latest ``` -------------------------------- ### Retrieve API Metrics with HttpClient (C#) Source: https://neko.m1k1o.net/docs/v3/api/metrics Example of retrieving API metrics using HttpClient in C#. This code sends a GET request and prints the response content. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/metrics"); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Set Frontend ICE Servers via Command Line Argument Source: https://neko.m1k1o.net/docs/v3/configuration/webrtc Use the --webrtc.iceservers.frontend command line argument followed by a JSON encoded array to configure STUN and TURN servers for the frontend. ```bash --webrtc.iceservers.frontend ``` -------------------------------- ### Start Broadcast Source: https://neko.m1k1o.net/docs/v3/api/room-broadcast Start broadcasting the room's content. ```APIDOC ## POST /room/broadcast/start ### Description Start broadcasting the room's content. ### Method POST ### Endpoint /room/broadcast/start ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the broadcast has started. ``` -------------------------------- ### Build Neko Server Source: https://neko.m1k1o.net/docs/v3/developer-guide/build Navigate to the server directory and execute the build script to compile the server binary and its plugins. ```bash cd server; ./build; ``` -------------------------------- ### Desktop Sharing Configuration - Environment Variables Source: https://neko.m1k1o.net/docs/v3/configuration Configure desktop sharing settings via environment variables. Specify display, input driver, screen size, framerate, and window unminimize behavior. ```bash # X display to use for desktop sharing (string) NEKO_DESKTOP_DISPLAY= # 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 ``` -------------------------------- ### Build Custom Neko Client Source: https://neko.m1k1o.net/docs/v3/customization/ui Clone the Neko repository, navigate to the client directory, install dependencies, and build the project to create custom UI files. ```bash # Clone the repository git clone https://github.com/m1k1o/neko # Change to the client directory cd neko/client # Install the dependencies npm install # Build the project npm run build ``` -------------------------------- ### Install GStreamer Dependencies Source: https://neko.m1k1o.net/docs/v3/developer-guide Installs necessary GStreamer libraries for video processing on Debian-based systems. ```bash sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-plugins-base gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ gstreamer1.0-pulseaudio; ``` -------------------------------- ### Set Frontend and Backend ICE Servers via Environment Variables Source: https://neko.m1k1o.net/docs/v3/configuration/webrtc Configure STUN and TURN servers for both frontend and backend using NEKO_WEBRTC_ICESERVERS_FRONTEND and NEKO_WEBRTC_ICESERVERS_BACKEND environment variables. The values must be JSON encoded arrays. ```bash # STUN and TURN servers used by the frontend (array) NEKO_WEBRTC_ICESERVERS_FRONTEND= # STUN and TURN servers used by the backend (array) NEKO_WEBRTC_ICESERVERS_BACKEND= ``` -------------------------------- ### Run VLC with Local Media Playlist Source: https://neko.m1k1o.net/docs/v3/installation/docker-images Starts the Neko VLC Docker image, mounting local media files and specifying a playlist file via an environment variable. ```bash docker run \ -v /path/to/media:/media \ -e VLC_MEDIA=/media/playlist.xspf \ ghcr.io/m1k1o/neko/vlc ``` -------------------------------- ### Enable Microphone Capture with Command Line Arguments Source: https://neko.m1k1o.net/docs/v3/configuration/capture Configure microphone capture and the audio device using command-line flags. This method is useful for starting Neko with specific capture settings. ```bash --capture.microphone.enabled true --capture.microphone.device "audio_input" ``` -------------------------------- ### Batch Request Example Source: https://neko.m1k1o.net/docs/v3/api/batch Demonstrates the structure of a batch request body, including path, method, and optional body for each individual request. ```json [ { "path": "string", "method": "GET" } ] ``` -------------------------------- ### File Provider Configuration (Command Line Arguments) Source: https://neko.m1k1o.net/docs/v3/configuration/authentication Configure the file provider for authentication using command-line arguments, specifying the path to the user credentials file and hash setting. ```bash --member.provider "file" # Absolute path to the file containing the users and their passwords. (string) --member.file.path "/opt/neko/members.json" # Whether the passwords are hashed using sha256 or not. (boolean) --member.file.hash false ``` -------------------------------- ### Configuration Merging Order Example Source: https://neko.m1k1o.net/docs/v3/configuration Demonstrates the precedence order for configuration values. Command-line arguments override environment variables, which override configuration files, which override default values. ```bash # Default Value: 127.0.0.1:8080 # Config File cat config.yaml < # ordered list of video ids (strings) NEKO_CAPTURE_VIDEO_IDS= # shortcut for configuring only a single gstreamer pipeline, ignored if pipelines is set (string) NEKO_CAPTURE_VIDEO_PIPELINE= # pipelines config used for video streaming (object) NEKO_CAPTURE_VIDEO_PIPELINES= # 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 ``` -------------------------------- ### Example Gstreamer Pipeline for Audio Capture Source: https://neko.m1k1o.net/docs/v3/configuration/capture An example Gstreamer pipeline configuration for capturing and encoding audio using Opus. The `{device}` placeholder is automatically replaced. ```yaml capture: audio: codec: opus pipeline: | pulsesrc device={device} ! audioconvert ! opusenc bitrate=320000 ! appsink name=appsink ``` -------------------------------- ### Capture Configuration - Screencast Environment Variables Source: https://neko.m1k1o.net/docs/v3/configuration Configure screencasting settings via environment variables. Enable/disable, specify GStreamer pipeline, JPEG quality, and frame rate. ```bash # enable screencast (boolean) NEKO_CAPTURE_SCREENCAST_ENABLED=false # gstreamer pipeline used for screencasting (string) NEKO_CAPTURE_SCREENCAST_PIPELINE= # screencast JPEG quality (string) NEKO_CAPTURE_SCREENCAST_QUALITY="60" # screencast frame rate (string) NEKO_CAPTURE_SCREENCAST_RATE="10/1" ``` -------------------------------- ### Run VLC with Media URL Source: https://neko.m1k1o.net/docs/v3/installation/docker-images Launches the Neko VLC Docker image, specifying a media URL to play via an environment variable. ```bash docker run \ -e VLC_MEDIA=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 \ ghcr.io/m1k1o/neko/vlc ``` -------------------------------- ### Enable Screencast Capture (Command Line) Source: https://neko.m1k1o.net/docs/v3/configuration/capture Configure screencast capture settings using command-line arguments. Use `--capture.screencast.enabled false` to disable. ```bash --capture.screencast.enabled false --capture.screencast.rate "10/1" --capture.screencast.quality "60" --capture.screencast.pipeline ``` -------------------------------- ### Configure General Plugin Settings Source: https://neko.m1k1o.net/docs/v3/configuration/plugins Set general plugin configurations like enabling/disabling support, making them required, and specifying the plugin directory. Use environment variables for runtime configuration. ```bash NEKO_PLUGINS_ENABLED=false NEKO_PLUGINS_REQUIRED=false NEKO_PLUGINS_DIR="./bin/plugins" ``` -------------------------------- ### Enable ICE Trickle via Command Line Argument Source: https://neko.m1k1o.net/docs/v3/configuration/webrtc Use the --webrtc.icetrickle true command line argument to enable ICE Trickle. This feature allows for faster connection setup by sending ICE candidates as they become available. ```bash --webrtc.icetrickle true ``` -------------------------------- ### Troubleshoot DTLS Transport Not Started Error Source: https://neko.m1k1o.net/docs/v3/troubleshooting This error means the DTLS transport hasn't started, likely due to inaccessible UDP ports. Ensure your UDP ports are correctly exposed and reachable. ```bash WRN undeclaredMediaProcessor failed to open SrtcpSession: the DTLS transport has not started yet module=webrtc subsystem= ``` -------------------------------- ### Members JSON Structure (Example with Hashed Passwords) Source: https://neko.m1k1o.net/docs/v3/configuration/authentication Example structure for the members.json file with two users, 'admin' and 'user', including their profiles. Passwords are in plain text; set 'hash' to true for sha256 hashed passwords. ```json { "admin": { "password": "admin", "profile": { "name": "Administrator", "is_admin": true, "can_login": true, "can_connect": true, "can_watch": true, "can_host": true, "can_share_media": true, "can_access_clipboard": true, "sends_inactive_cursor": true, "can_see_inactive_cursors": true, "plugins": {} } }, "user": { "password": "neko", "profile": { "name": "User", "is_admin": false, "can_login": true, "can_connect": true, "can_watch": true, "can_host": true, "can_share_media": true, "can_access_clipboard": true, "sends_inactive_cursor": true, "can_see_inactive_cursors": false, "plugins": {} } } } ``` -------------------------------- ### Get Session Source: https://neko.m1k1o.net/docs/v3/api/sessions Retrieve information about a specific session. ```APIDOC ## Get Session ### Description Retrieve information about a specific session. ### Method GET ### Endpoint /sessions/{sessionId} ``` -------------------------------- ### Configure WebRTC Video Capture via Command Line Arguments Source: https://neko.m1k1o.net/docs/v3/configuration/capture Use command-line arguments to specify video capture parameters such as display, codec, and pipeline configurations. These arguments override environment variables. ```bash --capture.video.display --capture.video.codec "vp8" --capture.video.ids --capture.video.pipeline --capture.video.pipelines --capture.video.pipelines ``` -------------------------------- ### User Login Source: https://neko.m1k1o.net/docs/v3/api/current-session Authenticate a user and start a new session. ```APIDOC ## User Login ### Description Authenticate a user and start a new session. ### Method POST ### Endpoint /login ### Request Body - **username** (string) - Required - The user's username. - **password** (string) - Required - The user's password. ### Response #### Success Response (200) - **session_token** (string) - The token for the established session. - **user_id** (string) - The ID of the logged-in user. ``` -------------------------------- ### Get Screenshot Image Source: https://neko.m1k1o.net/docs/v3/api/room-screen Retrieve the current screenshot image. ```APIDOC ## GET /room/screen/screenshot ### Description Retrieve the current screenshot image. ### Method GET ### Endpoint /room/screen/screenshot ``` -------------------------------- ### Multi-User Provider Configuration - Environment Variables Source: https://neko.m1k1o.net/docs/v3/configuration Configure the multi-user provider via environment variables. Set passwords and profile templates for admin and regular users. ```bash # 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= # member multiuser provider: password for regular users (string) NEKO_MEMBER_MULTIUSER_USER_PASSWORD="neko" ``` -------------------------------- ### Get Screencast Image Source: https://neko.m1k1o.net/docs/v3/api/room-screen Retrieve the current screencast image. ```APIDOC ## GET /room/screen/screencast ### Description Retrieve the current screencast image. ### Method GET ### Endpoint /room/screen/screencast ``` -------------------------------- ### Get Room Settings Source: https://neko.m1k1o.net/docs/v3/api/room-settings Retrieve the current settings of the room. ```APIDOC ## GET /room-settings ### Description Retrieve the current settings of the room. ### Method GET ### Endpoint /room-settings ### Response #### Success Response (200) - **settings** (object) - The current room settings. ``` -------------------------------- ### File Provider Configuration (Environment Variables) Source: https://neko.m1k1o.net/docs/v3/configuration/authentication Configure the file provider for authentication using environment variables, specifying the path to the user credentials file and hash setting. ```bash NEKO_MEMBER_PROVIDER="file" # Absolute path to the file containing the users and their passwords. (string) NEKO_MEMBER_FILE_PATH="/opt/neko/members.json" # Whether the passwords are hashed using sha256 or not. (boolean) NEKO_MEMBER_FILE_HASH=false ``` -------------------------------- ### Capture Configuration - Microphone Environment Variables Source: https://neko.m1k1o.net/docs/v3/configuration Configure microphone input settings using environment variables. Specify the PulseAudio device and enable/disable the microphone stream. ```bash # pulseaudio device used for microphone (string) NEKO_CAPTURE_MICROPHONE_DEVICE="audio_input" # enable microphone stream (boolean) NEKO_CAPTURE_MICROPHONE_ENABLED=true ``` -------------------------------- ### Get Member Profile Source: https://neko.m1k1o.net/docs/v3/api/members Retrieve the profile of a specific member. ```APIDOC ## Get Member Profile ### Description Retrieve the profile of a specific member. ### Method GET ### Endpoint /members/{memberId} ``` -------------------------------- ### Get Stats Source: https://neko.m1k1o.net/docs/v3/api/general Retrieve statistics about the server and user sessions. ```APIDOC ## GET /stats ### Description Retrieve statistics about the server and user sessions. ### Method GET ### Endpoint /stats ``` -------------------------------- ### Enable Microphone Capture with Environment Variables Source: https://neko.m1k1o.net/docs/v3/configuration/capture Use these environment variables to enable microphone capture and specify the audio input device. Ensure the specified device is available in your system's audio configuration. ```bash NEKO_CAPTURE_MICROPHONE_ENABLED=true NEKO_CAPTURE_MICROPHONE_DEVICE="audio_input" ``` -------------------------------- ### Get Keyboard Modifiers Source: https://neko.m1k1o.net/docs/v3/api/room-keyboard Retrieve the current keyboard modifiers status. ```APIDOC ## GET /keyboard/modifiers ### Description Retrieve the current keyboard modifiers status. ### Method GET ### Endpoint /keyboard/modifiers ``` -------------------------------- ### VP8 Pipeline Configuration Example Source: https://neko.m1k1o.net/docs/v3/configuration/capture Configures two VP8 pipelines: 'hq' for high quality and 'lq' for low quality. Both pipelines set framerate and encoder parameters, with 'hq' targeting a higher bitrate. ```yaml capture: video: codec: vp8 # HQ is the default pipeline ids: [ hq, lq ] pipelines: hq: fps: 25 gst_encoder: vp8enc gst_params: target-bitrate: round(3072 * 650) cpu-used: 4 end-usage: cbr threads: 4 deadline: 1 undershoot: 95 buffer-size: (3072 * 4) buffer-initial-size: (3072 * 2) buffer-optimal-size: (3072 * 3) keyframe-max-dist: 25 min-quantizer: 4 max-quantizer: 20 lq: fps: 25 gst_encoder: vp8enc gst_params: target-bitrate: round(1024 * 650) cpu-used: 4 end-usage: cbr threads: 4 deadline: 1 undershoot: 95 buffer-size: (1024 * 4) buffer-initial-size: (1024 * 2) buffer-optimal-size: (1024 * 3) keyframe-max-dist: 25 min-quantizer: 4 max-quantizer: 20 ``` -------------------------------- ### Get Screen Configuration Source: https://neko.m1k1o.net/docs/v3/api/room-screen Retrieve the current screen configuration of the room. ```APIDOC ## GET /room/screen/configuration ### Description Retrieve the current screen configuration of the room. ### Method GET ### Endpoint /room/screen/configuration ```