starfold

Flags

Every flag the server takes, with its default.

Flags take --name=value or --name value; true/false flags also work on their own (--read-only). starfold --help prints this list for the binary you have, with the encoders that binary includes, and starfold --version its version. CI checks this page against the Linux release binary's --help.

Server

FlagDefault
--addr, --port0.0.0.0 on Linux, 127.0.0.1 on macOS and Windows; 6901listen address and port
--listen-tcptruelisten on --addr/--port
--listen-unixnonealso serve on a unix socket in this directory (Linux only); see Auth and network
--listen-unix-mode0600the socket's permissions
--framedfalseevery WebSocket message binary with a kind byte, for hops that carry binary only; the page then needs ?framed=1
--titlestarfoldthe page's title: the browser tab, and the app's name if a viewer installs it
--faviconstarfold's iconthe tab's icon: an .ico, .png, .gif, .webp or .svg file
--allowed-hostsnonehost names to answer for besides IP addresses and localhost (.example.com covers subdomains, * any)
--allowed-originsnoneother sites whose pages may connect (* any)
--base-pathnoneserve under this path prefix (such as /desktop), for a reverse proxy that forwards it unchanged

starfold attach DIR is a command, not a flag: it relays stdin and stdout to the socket --listen-unix DIR serves (Linux only).

Login

FlagDefault
--enable-basic-authtrueask for a password; false serves without one
--basic-auth-password$STARFOLD_PASSWORD, else $SELKIES_BASIC_AUTH_PASSWORD, else made up and printed at startupthe password
--basic-auth-useranythe user name a browser's sign-in has to give

Video

FlagDefault
--framerate60max frames per second
--high-fpsfalsehardware VideoToolbox streams take 120 frames per second (or --framerate if higher); other encoders take --framerate up to 60
--crf24x264's base quality; libaom's lowest quantizer; a hardware encoder's constant QP when it runs one
--max-kbps, --min-kbps30000, 2000adaptive bitrate ceiling and floor; --video-bitrate is the same as --max-kbps
--encoderautothe base stream's encoder; see Encoders
--encoder-probetrueprobe the hardware encoders at startup (/stats lists what was found)
--experimental-hw-probesfalsealso probe VA-API, NVENC, Media Foundation and Quick Sync, each in a child process; needed to name one with --encoder
--presetlibaom: 9; x264: ultrafastthe preset or speed of the encoder --encoder names (under auto, of the software base one); --help lists what each built-in encoder takes
--encoder-threadscores/4, from 1 to 4; libaom picks its ownsliced encoder threads; see Encoders
--adaptive-threadsfalseencode on one thread, fanning out only under sustained heavy motion
--stored-screenstruelibaom keeps up to six settled screens and codes a return to one from it
--paintover-crf, --paintover-burst, --paintover-delay-ms16, 3, 150sharpening once the screen goes still
--stripes1encode the screen as N independent streams (experimental)
--convert-threads, --coalesce-us4, 0tuning

Desktop

These differ by platform; Platforms has each platform's own.

FlagDefault
--displayLinux: $DISPLAY; macOS: the main display; Windows: the primary displayLinux: the X display to stream when DISPLAY is unset; macOS and Windows: a display index (0 is the main one), or on macOS a display ID
--enable-clipboardtruetrue, in, out or false
--audio-enabledtruedesktop or system audio
--audio-device-nameLinux: output.monitor; Windows: the default output devicethe PulseAudio source (Linux) or output device (Windows) to stream; not on macOS
--audio-bitrate128000Opus bitrate
--microphone-enabledfalsethe browser's microphone into the desktop
--microphone-fifo/tmp/starfold-mic.fifoLinux: the FIFO a PulseAudio pipe source reads
--microphone-devicemacOS: the first loopback device found; Windows: the first virtual cable foundoutput device (name or prefix) to play the microphone into
--enable-resizefalsethe desktop follows the viewer's window
--resize-scaleLinux: 1.5; macOS: the capture scale; Windows: the display's scalingdesktop pixels per CSS pixel
--read-onlyfalseviewers only watch
--scroll-px-per-notch180pixels one wheel notch scrolls
--round-corners0Linux: corner radius for top-level windows
--round-windowsnoneLinux: title:radius,... rounds windows with that title
--capture-scalenative, within the budgetmacOS: streamed pixels per point
--max-capture-pixels4096000macOS: pixel budget for the automatic scale
--show-cursortrue with --read-only, else falsemacOS: include the host cursor in the video stream

On Linux, two environment variables choose how the screen is read: STARFOLD_DIRECT_FB=1 reads Xvfb's -shmem framebuffer in place instead of with GetImage, and STARFOLD_NO_DIRECT_FB never does (it wins). See Platforms.

Files and recordings

FlagDefault
--file-transfersupload,downloadupload, download, upload,download or none
--files-rootnone: no file transferfolder the Files panel can see; symlinks in it are not followed
--upload-dirDownloadsfolder under the root that uploads go to
--max-upload-mb0 (no limit)largest upload
--max-record-seconds300longest recording, at most 600 with --enable-recording
--enable-recordingfalseallow /record; at most 2 recordings at once
--recording-dir/var/tmp on Linux, else the system temporary folderwhere recordings are written; not memory (tmpfs), not inside --files-root

With --read-only, uploads stay off whatever --file-transfers says, and files are listed and downloaded only when it names download.

Help and version

Flag
-h, --helpprint the flags and exit
-V, --versionprint the version, the software encoders built in and the licence, and exit

On this page