UWSGI_MONO(1)

๐Ÿ“ฆ
version 2.0.24 ยท 3 versions
, in ubuntu noble

๐Ÿ‘‘ UWSGI_MONO ๐Ÿ‘‘

okay bestie, welcome to the manual page for uwsgi_mono โ€” she's a User Command, she lives in section 1, and she is that girl. buckle up, this page is long and we are doing it in parts. ๐Ÿ’–


โœจ NAME โœจ

uwsgi_mono โ€” fast (pure C), self-healing, developer-friendly WSGI server ๐Ÿ’…

like. she's written in pure C. she heals herself. she's developer-friendly. the trinity. no cap.


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

uwsgi-core-local [options...]

that's it. that's the whole summoning ritual. you give her options, she gives you a server. periodt. โœจ


๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so this is the big one โ€” every single option, flag, and knob she has. grab a snack, we're going section by section. ๐Ÿ“


๐Ÿ”Œ SOCKETS AND PROTOCOLS

  • -s, --socket โ€” bind to the specified UNIX/TCP socket using default protocol
  • -s, --uwsgi-socket โ€” bind to the specified UNIX/TCP socket using uwsgi protocol
  • --suwsgi-socket โ€” bind to the specified UNIX/TCP socket using uwsgi protocol over SSL ๐Ÿ”’
  • --ssl-socket โ€” bind to the specified UNIX/TCP socket using uwsgi protocol over SSL
  • --http-socket โ€” bind to the specified UNIX/TCP socket using HTTP protocol
  • --http-socket-modifier1 โ€” force the specified modifier1 when using HTTP protocol
  • --http-socket-modifier2 โ€” force the specified modifier2 when using HTTP protocol
  • --http11-socket โ€” bind to the specified UNIX/TCP socket using HTTP 1.1 (Keep-Alive) protocol
  • --https-socket โ€” bind to the specified UNIX/TCP socket using HTTPS protocol
  • --https-socket-modifier1 โ€” force the specified modifier1 when using HTTPS protocol
  • --https-socket-modifier2 โ€” force the specified modifier2 when using HTTPS protocol
  • --fastcgi-socket โ€” bind to the specified UNIX/TCP socket using FastCGI protocol
  • --fastcgi-nph-socket โ€” bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode)
  • --fastcgi-modifier1 โ€” force the specified modifier1 when using FastCGI protocol
  • --fastcgi-modifier2 โ€” force the specified modifier2 when using FastCGI protocol
  • --scgi-socket โ€” bind to the specified UNIX/TCP socket using SCGI protocol
  • --scgi-nph-socket โ€” bind to the specified UNIX/TCP socket using SCGI protocol (nph mode)
  • --scgi-modifier1 โ€” force the specified modifier1 when using SCGI protocol
  • --scgi-modifier2 โ€” force the specified modifier2 when using SCGI protocol
  • --raw-socket โ€” bind to the specified UNIX/TCP socket using RAW protocol
  • --raw-modifier1 โ€” force the specified modifier1 when using RAW protocol
  • --raw-modifier2 โ€” force the specified modifier2 when using RAW protocol
  • --puwsgi-socket โ€” bind to the specified UNIX/TCP socket using persistent uwsgi protocol (puwsgi)
  • --protocol โ€” force the specified protocol for default sockets
  • --socket-protocol โ€” force the specified protocol for default sockets
  • --shared-socket โ€” create a shared socket for advanced jailing or ipc
  • --undeferred-shared-socket โ€” create a shared socket for advanced jailing or ipc (undeferred mode)

๐Ÿง‘๐Ÿณ WORKERS AND THE HARAKIRI ZONE

  • -p, --processes โ€” spawn the specified number of workers/processes
  • -p, --workers โ€” spawn the specified number of workers/processes
  • --thunder-lock โ€” serialize accept() usage (if possible)
  • -t, --harakiri โ€” set harakiri timeout
  • --harakiri-verbose โ€” enable verbose mode for harakiri
  • --harakiri-graceful-timeout โ€” interval between graceful harakiri attempt and a sigkill
  • --harakiri-graceful-signal โ€” use this signal instead of sigterm for graceful harakiri attempts
  • --harakiri-queue-threshold โ€” only trigger harakiri if queue is greater than this threshold
  • --harakiri-no-arh โ€” do not enable harakiri during after-request-hook
  • --no-harakiri-arh โ€” do not enable harakiri during after-request-hook
  • --no-harakiri-after-req-hook โ€” do not enable harakiri during after-request-hook
  • --backtrace-depth โ€” set backtrace depth
  • --mule-harakiri โ€” set harakiri timeout for mule tasks
harakiri is literally the app-killing timeout bestie. three whole spellings for the same after-request-hook behaviour, she contains multitudes ๐Ÿ’€

๐Ÿ“œ CONFIG LOADING

  • -x, --xmlconfig โ€” load config from xml file
  • -x, --xml โ€” load config from xml file
  • --config โ€” load configuration using the pluggable system
  • --fallback-config โ€” re-exec uwsgi with the specified config when exit code is 1
  • --strict โ€” enable strict mode (placeholder cannot be used)
  • --skip-zero โ€” skip check of file descriptor 0
  • --skip-atexit โ€” skip atexit hooks (ignored by the master)
  • --skip-atexit-teardown โ€” skip atexit teardown (ignored by the master)
  • -S, --set โ€” set a placeholder or an option
  • --set-placeholder โ€” set a placeholder
  • --set-ph โ€” set a placeholder
  • --get โ€” print the specified option value and exit
  • --declare-option โ€” declare a new uWSGI custom option
  • --declare-option2 โ€” declare a new uWSGI custom option (non-immediate)
  • --resolve โ€” place the result of a dns query in the specified placeholder, sytax: placeholder=name (immediate option)
  • --inherit โ€” use the specified file as config template
  • --include โ€” include the specified file as immediate configuration
  • --inject-before โ€” inject a text file before the config file (advanced templating)
  • --inject-after โ€” inject a text file after the config file (advanced templating)

๐Ÿง  OPT LOGIC (the if/for girlies)

  • --for โ€” (opt logic) for cycle
  • --for-glob โ€” (opt logic) for cycle (expand glob)
  • --for-times โ€” (opt logic) for cycle (expand the specified num to a list starting from 1)
  • --for-readline โ€” (opt logic) for cycle (expand the specified file to a list of lines)
  • --endfor โ€” (opt logic) end for cycle
  • --end-for โ€” (opt logic) end for cycle
  • --if-opt โ€” (opt logic) check for option
  • --if-not-opt โ€” (opt logic) check for option
  • --if-env โ€” (opt logic) check for environment variable
  • --if-not-env โ€” (opt logic) check for environment variable
  • --ifenv โ€” (opt logic) check for environment variable
  • --if-reload โ€” (opt logic) check for reload
  • --if-not-reload โ€” (opt logic) check for reload
  • --if-hostname โ€” (opt logic) check for hostname
  • --if-not-hostname โ€” (opt logic) check for hostname
  • --if-hostname-match โ€” (opt logic) try to match hostname against a regular expression
  • --if-not-hostname-match โ€” (opt logic) try to match hostname against a regular expression
  • --if-exists โ€” (opt logic) check for file/directory existence
  • --if-not-exists โ€” (opt logic) check for file/directory existence
  • --ifexists โ€” (opt logic) check for file/directory existence
  • --if-plugin โ€” (opt logic) check for plugin
  • --if-not-plugin โ€” (opt logic) check for plugin
  • --ifplugin โ€” (opt logic) check for plugin
  • --if-file โ€” (opt logic) check for file existance
  • --if-not-file โ€” (opt logic) check for file existance
  • --if-dir โ€” (opt logic) check for directory existance
  • --if-not-dir โ€” (opt logic) check for directory existance
  • --ifdir โ€” (opt logic) check for directory existance
  • --if-directory โ€” (opt logic) check for directory existance
  • --endif โ€” (opt logic) end if
  • --end-if โ€” (opt logic) end if
the way she has like four aliases for every single condition?? she's giving convenience, she's giving "pick your fave spelling" ๐Ÿ’…

โœ… LISTS AND FILTERING

  • --blacklist โ€” set options blacklist context
  • --end-blacklist โ€” clear options blacklist context
  • --whitelist โ€” set options whitelist context
  • --end-whitelist โ€” clear options whitelist context

๐Ÿ˜ญ WRITE ERRORS AND SIGNALS (the annoying ones)

  • --ignore-sigpipe โ€” do not report (annoying) SIGPIPE
  • --ignore-write-errors โ€” do not report (annoying) write()/writev() errors
  • --write-errors-tolerance โ€” set the maximum number of allowed write errors (default: no tolerance)
  • --write-errors-exception-only โ€” only raise an exception on write errors giving control to the app itself
  • --disable-write-exception โ€” disable exception generation on write()/writev()
default is no tolerance bestie. zero. none. she will not be ignoring your write errors unless you literally tell her to. ๐Ÿ”ฅ

๐Ÿš€ DAEMON AND INSTANCE MANAGEMENT

  • -d, --daemonize โ€” daemonize uWSGI
  • --daemonize2 โ€” daemonize uWSGI after app loading
  • --stop โ€” stop an instance
  • --reload โ€” reload an instance
  • --pause โ€” pause an instance
  • --suspend โ€” suspend an instance
  • --resume โ€” resume an instance
  • --connect-and-read โ€” connect to a socket and wait for data from it
  • --extract โ€” fetch/dump any supported address to stdout

โš™๏ธ CORE TUNING

  • -l, --listen โ€” set the socket listen queue size
  • -v, --max-vars โ€” set the amount of internal iovec/vars structures
  • --max-apps โ€” set the maximum number of per-worker applications
  • -b, --buffer-size โ€” set internal buffer size
  • -m, --memory-report โ€” enable memory report
  • --profiler โ€” enable the specified profiler
  • -c, --cgi-mode โ€” force CGI-mode for plugins supporting it

๐Ÿ” SOCKET OWNERSHIP AND PERMISSIONS

  • -a, --abstract-socket โ€” force UNIX socket in abstract mode (Linux only) ๐Ÿง
  • -C, --chmod-socket โ€” chmod-socket
  • -C, --chmod โ€” chmod-socket
  • --chown-socket โ€” chown unix sockets
  • --umask โ€” set umask
  • --freebind โ€” put socket in freebind mode
  • --map-socket โ€” map sockets to specific workers

๐Ÿงต THREADS AND PROCESS NAMES

  • -T, --enable-threads โ€” enable threads
  • --no-threads-wait โ€” do not wait for threads cancellation on quit/reload
  • --auto-procname โ€” automatically set processes name to something meaningful
  • --procname-prefix โ€” add a prefix to the process names
  • --procname-prefix-spaced โ€” add a spaced prefix to the process names
  • --procname-append โ€” append a string to process names
  • --procname โ€” set process names
  • --procname-master โ€” set master process name

๐Ÿ‘‘ APP LOADING AND THE MASTER

  • -i, --single-interpreter โ€” do not use multiple interpreters (where available)
  • --need-app โ€” exit if no app can be loaded
  • -M, --master โ€” enable master process
  • --honour-stdin โ€” do not remap stdin to /dev/null

๐Ÿฐ THE EMPEROR (her royal era)

  • --emperor โ€” run the Emperor
  • --emperor-proxy-socket โ€” force the vassal to became an Emperor proxy
  • --emperor-wrapper โ€” set a binary wrapper for vassals
  • --emperor-wrapper-override โ€” set a binary wrapper for vassals to try before the default one
  • --emperor-wrapper-fallback โ€” set a binary wrapper for vassals to try as a last resort
  • --emperor-nofollow โ€” do not follow symlinks when checking for mtime
  • --emperor-procname โ€” set the Emperor process name
  • --emperor-freq โ€” set the Emperor scan frequency (default 3 seconds)
  • --emperor-required-heartbeat โ€” set the Emperor tolerance about heartbeats
  • --emperor-curse-tolerance โ€” set the Emperor tolerance about cursed vassals
  • --emperor-pidfile โ€” write the Emperor pid in the specified file
the Emperor scans every 3 seconds by default and she is not following your symlinks unless you say otherwise. main character energy fr fr ๐ŸŽ€
  • --emperor-tyrant โ€” flips the Emperor into Tyrant mode ๐Ÿ‘‘ the vassals are NOT gonna like this one bestie
  • --emperor-tyrant-nofollow โ€” in Tyrant mode, don't follow symlinks when it's checking for uid/gid. no sneaky link-following ๐Ÿšซ
  • --emperor-stats โ€” run the Emperor stats server โœจ numbers go brrr
  • --emperor-stats-server โ€” same thing, same energy, run the Emperor stats server ๐Ÿ’–
  • --early-emperor โ€” spawn the emperor as soon as possibile (yes, that's the original spelling, I'm not touching it ๐Ÿ’…)
  • --emperor-broodlord โ€” run the emperor in BroodLord mode ๐Ÿฆ‹ it's giving main character boss energy fr fr
  • --emperor-throttle โ€” set the throttling level (in milliseconds) for bad behaving vassals, default 1000 โฑ๏ธ misbehave and you get slowed down, periodt
  • --emperor-max-throttle โ€” set the max throttling level (in milliseconds) for bad behaving vassals, default is 3 minutes ๐Ÿ˜ค the ceiling of the time-out zone
  • --emperor-magic-exec โ€” prefixes vassals' config files with exec:// if they have the executable bit set ๐Ÿช„
  • --emperor-on-demand-extension โ€” search for a text file (vassal name + extension) containing the on demand socket name ๐Ÿ”
  • --emperor-on-demand-ext โ€” literally the same: search for a text file (vassal name + extension) holding the on demand socket name ๐Ÿ’–
  • --emperor-on-demand-directory โ€” enables on demand mode, binding to the unix socket in the specified directory, named like the vassal + .socket ๐Ÿงš
  • --emperor-on-demand-dir โ€” same deal: enable on demand mode binding to the unix socket in the specified directory named like the vassal + .socket โœจ
  • --emperor-on-demand-exec โ€” uses the output of the specified command as the on demand socket name (the vassal name gets passed as the only argument) ๐Ÿซถ
  • --emperor-extra-extension โ€” allows the specified extension in the Emperor (the vassal will be called with --config) ๐ŸŽ€
  • --emperor-extra-ext โ€” yep, same: allows the specified extension in the Emperor (vassal called with --config) ๐Ÿ’œ
  • --emperor-no-blacklist โ€” disables the Emperor blacklisting subsystem ๐Ÿ™ˆ no more naughty list
  • --emperor-use-clone โ€” use clone() instead of fork(), passing the specified unshare() flags ๐Ÿงฌ
  • --emperor-graceful-shutdown โ€” use vassals graceful shutdown during ragnarok ๐Ÿ’€ because even the end of the world deserves manners
  • --emperor-cap โ€” set vassals capability ๐Ÿ”
  • --vassals-cap โ€” set vassals capability (same thing, different flag, iconic) ๐Ÿ”
  • --vassal-cap โ€” set vassals capability (yes bestie, a third spelling, we love options) ๐Ÿ”
  • --imperial-monitor-list โ€” list enabled imperial monitors ๐Ÿ“‹
  • --imperial-monitors-list โ€” list enabled imperial monitors (the plural sibling ๐Ÿ’…)
  • --vassals-inherit โ€” add config templates to vassals config (uses --inherit) ๐ŸŒธ
  • --vassals-include โ€” include config templates to vassals config (uses --include instead of --inherit) ๐Ÿฆ‹
  • --vassals-inherit-before โ€” add config templates to vassals config (uses --inherit, parses before the vassal file) โฎ๏ธ
  • --vassals-include-before โ€” include config templates to vassals config (uses --include instead of --inherit, parses before the vassal file) โฎ๏ธ
  • --vassals-start-hook โ€” run the specified command before each vassal starts ๐Ÿ
  • --vassals-stop-hook โ€” run the specified command after vassal's death ๐Ÿชฆ
  • --vassal-sos โ€” ask the emperor for reinforcement when overloaded ๐Ÿ†˜
  • --vassal-sos-backlog โ€” ask the emperor for sos if the backlog queue has more items than the value specified ๐Ÿ“ˆ
  • --vassals-set โ€” automatically set the specified option (via --set) for every vassal ๐Ÿซก
  • --vassal-set โ€” automatically set the specified option (via --set) for every vassal (singular twin โœจ)
  • --heartbeat โ€” announce healthiness to the emperor ๐Ÿ’“ "not dead yet bestie!"
  • --reload-mercy โ€” set the max time (in seconds) we wait for workers and other processes to die during reload/shutdown ๐Ÿ•ฐ๏ธ
  • --worker-reload-mercy โ€” set the max time (in seconds) a worker can take to reload/shutdown, default is 60 ๐Ÿ˜ฎโ€๐Ÿ’จ
  • --mule-reload-mercy โ€” set the max time (in seconds) a mule can take to reload/shutdown, default is 60 ๐Ÿด
  • --exit-on-reload โ€” force exit even if a reload is requested ๐Ÿšช bye
  • --die-on-term โ€” exit instead of brutal reload on SIGTERM โšฐ๏ธ
  • --force-gateway โ€” force the spawn of the first registered gateway without a master ๐Ÿ”ฅ
  • -h|--help โ€” show this help ๐Ÿซถ
  • -h|--usage โ€” show this help (same flag, same help, we're consistent here) ๐Ÿ’–
  • --print-sym โ€” print content of the specified binary symbol ๐Ÿ”Ž
  • --print-symbol โ€” print content of the specified binary symbol (the long-form twin ๐Ÿ’…)
  • -r|--reaper โ€” call waitpid(-1,...) after each request to get rid of zombies ๐ŸงŸ no cap, zombie apocalypse cancelled
  • -R|--max-requests โ€” reload workers after the specified amount of managed requests ๐Ÿ”„
  • --min-worker-lifetime โ€” number of seconds a worker must run before being reloaded, default is 60 โณ
  • --max-worker-lifetime โ€” reload workers after the specified amount of seconds, default is disabled โŒ›
  • --max-worker-lifetime-delta โ€” add (worker_id * delta) seconds to the max_worker_lifetime value of each worker โž•
  • -z|--socket-timeout โ€” set internal sockets timeout โฒ๏ธ
  • --no-fd-passing โ€” disable file descriptor passing ๐Ÿšซ
  • --locks โ€” create the specified number of shared locks ๐Ÿ”’
  • --lock-engine โ€” set the lock engine โš™๏ธ
  • --ftok โ€” set the ipcsem key via ftok() for avoiding duplicates ๐Ÿ”‘
  • --persistent-ipcsem โ€” do not remove ipcsem's on shutdown ๐Ÿซ™ they stay
  • -A|--sharedarea โ€” create a raw shared memory area of specified pages (note: it supports keyval too) ๐Ÿง 
  • --safe-fd โ€” do not close the specified file descriptor ๐Ÿ›Ÿ
  • --fd-safe โ€” do not close the specified file descriptor (same vibe, other order ๐ŸŽ€)
  • --cache โ€” create a shared cache containing given elements ๐Ÿ—ƒ๏ธ
  • --cache-blocksize โ€” set cache blocksize ๐Ÿงฑ
  • --cache-store โ€” enable persistent cache to disk ๐Ÿ’พ
  • --cache-store-sync โ€” set frequency of sync for persistent cache ๐Ÿ”
  • --cache-no-expire โ€” disable auto sweep of expired items ๐ŸงนโŒ
  • --cache-expire-freq โ€” set the frequency of cache sweeper scans, default is 3 seconds ๐Ÿงน
  • --cache-report-freed-items โ€” constantly report the cache item freed by the sweeper (use only for debug) ๐Ÿ›
  • --cache-udp-server โ€” bind the cache udp server (used only for set/update/delete) to the specified socket ๐Ÿ“ก
  • --cache-udp-node โ€” send cache update/deletion to the specified cache udp server ๐Ÿ“ค
  • --cache-sync โ€” copy the whole content of another uWSGI cache server on server startup ๐Ÿ“‹
  • --cache-use-last-modified โ€” update the last_modified_at timestamp on every cache item modification, default is disabled ๐Ÿ•’
  • --add-cache-item โ€” add an item in the cache โž•
  • --load-file-in-cache โ€” load a static file in the cache ๐Ÿ“‚
  • --load-file-in-cache-gzip โ€” load a static file in the cache with gzip compression ๐Ÿ—œ๏ธ
  • --cache2 โ€” create a new generation shared cache (keyval syntax) โœจ gen 2 slay
  • --queue โ€” enable shared queue ๐Ÿšถโ€โ™€๏ธ๐Ÿšถโ€โ™€๏ธ๐Ÿšถโ€โ™€๏ธ
  • --queue-blocksize โ€” set queue blocksize ๐Ÿงฑ
  • --queue-store โ€” enable persistent queue to disk ๐Ÿ’พ
  • --queue-store-sync โ€” set frequency of sync for persistent queue ๐Ÿ”
  • -Q|--spooler โ€” run a spooler on the specified directory ๐Ÿงต
  • --spooler-external โ€” map spoolers requests to a spooler directory managed by an external instance ๐ŸŒ
  • --spooler-ordered โ€” try to order the execution of spooler tasks ๐Ÿ”ข
  • --spooler-chdir โ€” chdir() to the specified directory before each spooler task ๐Ÿ“
  • --spooler-processes โ€” set the number of processes for spoolers ๐Ÿ‘ฏ
  • --spooler-quiet โ€” do not be verbose with spooler tasks ๐Ÿคซ
  • --spooler-max-tasks โ€” set the maximum number of tasks to run before recycling a spooler โ™ป๏ธ
  • --spooler-harakiri โ€” set harakiri timeout for spooler tasks โš”๏ธ
  • --spooler-frequency โ€” set spooler frequency ๐Ÿ“ถ
  • --spooler-freq โ€” set spooler frequency (short king ๐Ÿ’…)
  • --mule โ€” add a mule ๐Ÿด
  • --mules โ€” add the specified number of mules ๐Ÿด๐Ÿด๐Ÿด
  • --farm โ€” add a mule farm ๐Ÿšœ
  • --mule-msg-size โ€” set mule message buffer size ๐Ÿ“จ
  • --signal โ€” send a uwsgi signal to a server ๐Ÿ“ถ
  • --signal-bufsize โ€” set buffer size for signal queue ๐Ÿงบ
  • --signals-bufsize โ€” set buffer size for signal queue (plural twin ๐ŸŽ€)
  • --signal-timer โ€” add a timer (syntax: <signal> <seconds>) โฐ
  • --timer โ€” add a timer (syntax: <signal> <seconds>) โฐ
  • --signal-rbtimer โ€” add a redblack timer (syntax: <signal> <seconds>) ๐ŸŒณ
  • --rbtimer โ€” add a redblack timer (syntax: <signal> <seconds>) ๐ŸŒณ
  • --rpc-max โ€” maximum number of rpc slots, default: 64 ๐ŸŽฐ
  • -L|--disable-logging โ€” disable request logging ๐Ÿค
  • --flock โ€” lock the specified file before starting, exit if locked ๐Ÿ”’
  • --flock-wait โ€” lock the specified file before starting, wait if locked โณ
  • --flock2 โ€” lock the specified file after logging/daemon setup, exit if locked ๐Ÿ”’
  • --flock-wait2 โ€” lock the specified file after logging/daemon setup, wait if locked โณ
  • --pidfile โ€” create pidfile (before privileges drop) ๐Ÿ“
  • --pidfile2 โ€” create pidfile (after privileges drop) ๐Ÿ“
  • --safe-pidfile โ€” create safe pidfile (before privileges drop) ๐Ÿ›Ÿ
  • --safe-pidfile2 โ€” create safe pidfile (after privileges drop) ๐Ÿ›Ÿ
  • --chroot โ€” chroot() to the specified directory ๐Ÿ“ฆ
  • --pivot-root โ€” pivot_root() to the specified directories (new_root and put_old must be separated with a space) ๐Ÿ”„
  • --pivot_root โ€” pivot_root() to the specified directories (new_root and put_old must be separated with a space) ๐Ÿ”„ same thing, underscore edition
  • --uid โ€” setuid to the specified user/uid ๐Ÿชช
  • --gid โ€” setgid to the specified group/gid ๐Ÿชช
  • --add-gid โ€” add the specified group id to the process credentials โž•
  • --immediate-uid โ€” setuid to the specified user/uid IMMEDIATELY โšก
  • --immediate-gid โ€” setgid to the specified group/gid IMMEDIATELY โšก
  • --no-initgroups โ€” disable additional groups set via initgroups() ๐Ÿšซ
  • --cap โ€” set process capability ๐Ÿ”
  • --unshare โ€” unshare() part of the processes and put it in a new namespace ๐ŸŒŒ
  • --unshare2 โ€” unshare() part of the processes and put it in a new namespace after rootfs change ๐ŸŒŒ
  • --setns-socket โ€” expose a unix socket returning namespace fds from /proc/self/ns ๐Ÿ”Œ
  • --setns-socket-skip โ€” skip the specified entry when sending setns file descriptors โญ๏ธ
  • --setns-skip โ€” skip the specified entry when sending setns file descriptors โญ๏ธ (the short twin ๐ŸŽ€)
  • --setns โ€” join a namespace created by an external uWSGI instance ๐Ÿค
  • --setns-preopen โ€” open /proc/self/ns as soon as possible and cache fds ๐Ÿ—‚๏ธ
  • --jailed โ€” mark the instance as jailed (force the execution of post_jail hooks) โ›“๏ธ
  • --refork โ€” fork() again after privileges drop. super handy for jailing systems ๐Ÿ’–
  • --re-fork โ€” same thing as --refork, fork() again after privileges drop. useful for jailing systems.
  • --refork-as-root โ€” fork() again before privileges drop. also for jailing systems, bestie ๐Ÿซถ
  • --re-fork-as-root โ€” fork() again before privileges drop. for jailing systems.
  • --refork-post-jail โ€” fork() again after jailing. jailing systems, you know the vibe ๐Ÿ’…
  • --re-fork-post-jail โ€” fork() again after jailing. for jailing systems.

๐ŸŽ€ hooks: the "run this at exactly this moment" section ๐ŸŽ€

okay so these are all --hook-* and they're literally just when do you want your hook to fire. the timing IS the option. iconic honestly โœจ

  • --hook-asap โ€” run the specified hook as soon as possible โšก
  • --hook-pre-jail โ€” run the specified hook before jailing
  • --hook-post-jail โ€” run the specified hook after jailing
  • --hook-in-jail โ€” run the specified hook in jail after initialization
  • --hook-as-root โ€” run the specified hook before privileges drop
  • --hook-as-user โ€” run the specified hook after privileges drop
  • --hook-as-user-atexit โ€” run the specified hook before app exit and reload
  • --hook-pre-app โ€” run the specified hook before app loading
  • --hook-post-app โ€” run the specified hook after app loading
  • --hook-post-fork โ€” run the specified hook after each fork
  • --hook-accepting โ€” run the specified hook after each worker enter the accepting phase
  • --hook-accepting1 โ€” run the specified hook after the first worker enters the accepting phase
  • --hook-accepting-once โ€” run the specified hook after each worker enter the accepting phase (once per-instance)
  • --hook-accepting1-once โ€” run the specified hook after the first worker enters the accepting phase (once per instance)
  • --hook-master-start โ€” run the specified hook when the Master starts ๐Ÿ‘‘
  • --hook-touch โ€” run the specified hook when the specified file is touched (syntax: <file> <action>)
  • --hook-emperor-start โ€” run the specified hook when the Emperor starts
  • --hook-emperor-stop โ€” run the specified hook when the Emperor send a stop message
  • --hook-emperor-reload โ€” run the specified hook when the Emperor send a reload message
  • --hook-emperor-lost โ€” run the specified hook when the Emperor connection is lost ๐Ÿ˜ญ
  • --hook-as-vassal โ€” run the specified hook before exec()ing the vassal
  • --hook-as-emperor โ€” run the specified hook in the emperor after the vassal has been started
  • --hook-as-mule โ€” run the specified hook in each mule ๐Ÿด
  • --hook-as-gateway โ€” run the specified hook in each gateway
  • --after-request-hook โ€” run the specified function/symbol after each request
  • --after-request-call โ€” run the specified function/symbol after each request

๐ŸŒˆ the exec twins ๐ŸŒˆ

same timeline, but instead of a hook you're running a whole command. fr fr.

  • --exec-asap โ€” run the specified command as soon as possible
  • --exec-pre-jail โ€” run the specified command before jailing
  • --exec-post-jail โ€” run the specified command after jailing
  • --exec-in-jail โ€” run the specified command in jail after initialization
  • --exec-as-root โ€” run the specified command before privileges drop
  • --exec-as-user โ€” run the specified command after privileges drop
  • --exec-as-user-atexit โ€” run the specified command before app exit and reload
  • --exec-pre-app โ€” run the specified command before app loading
  • --exec-post-app โ€” run the specified command after app loading
  • --exec-as-vassal โ€” run the specified command before exec()ing the vassal
  • --exec-as-emperor โ€” run the specified command in the emperor after the vassal has been started

๐Ÿ’œ mount / umount: filesystem chaos, but scheduled ๐Ÿ’œ

mounting and unmounting at the exact right life stage. no cap, this is so useful.

  • --mount-asap โ€” mount filesystem as soon as possible
  • --mount-pre-jail โ€” mount filesystem before jailing
  • --mount-post-jail โ€” mount filesystem after jailing
  • --mount-in-jail โ€” mount filesystem in jail after initialization
  • --mount-as-root โ€” mount filesystem before privileges drop
  • --mount-as-vassal โ€” mount filesystem before exec()ing the vassal
  • --mount-as-emperor โ€” mount filesystem in the emperor after the vassal has been started
  • --umount-asap โ€” unmount filesystem as soon as possible
  • --umount-pre-jail โ€” unmount filesystem before jailing
  • --umount-post-jail โ€” unmount filesystem after jailing
  • --umount-in-jail โ€” unmount filesystem in jail after initialization
  • --umount-as-root โ€” unmount filesystem before privileges drop
  • --umount-as-vassal โ€” unmount filesystem before exec()ing the vassal
  • --umount-as-emperor โ€” unmount filesystem in the emperor after the vassal has been started

โญ waiting era: patience is a virtue โญ

  • --wait-for-interface โ€” wait for the specified network interface to come up before running root hooks
  • --wait-for-interface-timeout โ€” set the timeout for wait-for-interface
  • --wait-interface โ€” wait for the specified network interface to come up before running root hooks
  • --wait-interface-timeout โ€” set the timeout for wait-for-interface
  • --wait-for-iface โ€” wait for the specified network interface to come up before running root hooks
  • --wait-for-iface-timeout โ€” set the timeout for wait-for-interface
  • --wait-iface โ€” wait for the specified network interface to come up before running root hooks
  • --wait-iface-timeout โ€” set the timeout for wait-for-interface
  • --wait-for-fs โ€” wait for the specified filesystem item to appear before running root hooks
  • --wait-for-file โ€” wait for the specified file to appear before running root hooks
  • --wait-for-dir โ€” wait for the specified directory to appear before running root hooks
  • --wait-for-mountpoint โ€” wait for the specified mountpoint to appear before running root hooks
  • --wait-for-fs-timeout โ€” set the timeout for wait-for-fs/file/dir
  • --wait-for-socket โ€” wait for the specified socket to be ready before loading apps
  • --wait-for-socket-timeout โ€” set the timeout for wait-for-socket

๐Ÿฆ‹ call section (yes it's the same timeline again, but with functions) ๐Ÿฆ‹

  • --call-asap โ€” call the specified function as soon as possible
  • --call-pre-jail โ€” call the specified function before jailing
  • --call-post-jail โ€” call the specified function after jailing
  • --call-in-jail โ€” call the specified function in jail after initialization
  • --call-as-root โ€” call the specified function before privileges drop
  • --call-as-user โ€” call the specified function after privileges drop
  • --call-as-user-atexit โ€” call the specified function before app exit and reload
  • --call-pre-app โ€” call the specified function before app loading
  • --call-post-app โ€” call the specified function after app loading
  • --call-as-vassal โ€” call the specified function() before exec()ing the vassal
  • --call-as-vassal1 โ€” call the specified function(char *) before exec()ing the vassal
  • --call-as-vassal3 โ€” call the specified function(char *, uid_t, gid_t) before exec()ing the vassal
  • --call-as-emperor โ€” call the specified function() in the emperor after the vassal has been started
  • --call-as-emperor1 โ€” call the specified function(char *) in the emperor after the vassal has been started
  • --call-as-emperor2 โ€” call the specified function(char *, pid_t) in the emperor after the vassal has been started
  • --call-as-emperor4 โ€” call the specified function(char *, pid_t, uid_t, gid_t) in the emperor after the vassal has been started
bestie watch the arity ๐Ÿ’€ โ€” --call-as-vassal vs --call-as-vassal1 vs --call-as-vassal3, and --call-as-emperor vs 1 vs 2 vs 4 โ€” the number literally tells you how many args the function takes. get the signature wrong and it's giving undefined behaviour. ๐Ÿ’…

๐Ÿ“ config loading era ๐Ÿ“

  • --ini โ€” load config from ini file
  • -y, --yaml โ€” load config from yaml file
  • -y, --yml โ€” load config from yaml file
  • -j, --json โ€” load config from json file
  • -j, --js โ€” load config from json file

โœจ instance & mode vibes โœจ

  • --weight โ€” weight of the instance (used by clustering/lb/subscriptions)
  • --auto-weight โ€” set weight of the instance (used by clustering/lb/subscriptions) automatically
  • --no-server โ€” force no-server mode
  • --command-mode โ€” force command mode

๐Ÿ”ฅ socket tuning, my beloved ๐Ÿ”ฅ

  • --no-defer-accept โ€” disable deferred-accept on sockets
  • --tcp-nodelay โ€” enable TCP NODELAY on each request
  • --so-keepalive โ€” enable TCP KEEPALIVEs
  • --so-send-timeout โ€” set SO_SNDTIMEO
  • --socket-send-timeout โ€” set SO_SNDTIMEO
  • --so-write-timeout โ€” set SO_SNDTIMEO
  • --socket-write-timeout โ€” set SO_SNDTIMEO
  • --socket-sndbuf โ€” set SO_SNDBUF
  • --socket-rcvbuf โ€” set SO_RCVBUF
  • --shutdown-sockets โ€” force calling shutdown() in addition to close() when sockets are destroyed

๐Ÿ’€ memory & reload limits (the intense part) ๐Ÿ’€

  • --limit-as โ€” limit processes address space/vsz
  • --limit-nproc โ€” limit the number of spawnable processes
  • --reload-on-as โ€” reload if address space is higher than specified megabytes
  • --reload-on-rss โ€” reload if rss memory is higher than specified megabytes
  • --evil-reload-on-as โ€” force the master to reload a worker if its address space is higher than specified megabytes
  • --evil-reload-on-rss โ€” force the master to reload a worker if its rss memory is higher than specified megabytes
  • --mem-collector-freq โ€” set the memory collector frequency when evil reloads are in place
  • --reload-on-fd โ€” reload if the specified file descriptor is ready
  • --brutal-reload-on-fd โ€” brutal reload if the specified file descriptor is ready
  • --ksm โ€” enable Linux KSM
  • --pcre-jit โ€” enable pcre jit (if available)
  • --never-swap โ€” lock all memory pages avoiding swapping

๐ŸŒธ touch: the file watcher era ๐ŸŒธ

poke a file, trigger a thing. the way that works is so satisfying honestly.

  • --touch-reload โ€” reload uWSGI if the specified file is modified/touched
  • --touch-workers-reload โ€” trigger reload of (only) workers if the specified file is modified/touched
  • --touch-mules-reload โ€” reload mules if the specified file is modified/touched
  • --touch-spoolers-reload โ€” reload spoolers if the specified file is modified/touched
  • --touch-chain-reload โ€” trigger chain reload if the specified file is modified/touched
  • --touch-logrotate โ€” trigger logrotation if the specified file is modified/touched
  • --touch-logreopen โ€” trigger log reopen if the specified file is modified/touched
  • --touch-exec โ€” run command when the specified file is modified/touched (syntax: file command)
  • --touch-signal โ€” signal when the specified file is modified/touched (syntax: file signal)
  • --fs-reload โ€” the moment that filesystem object you picked gets touched? graceful reload. clocked it, did it, no drama ๐Ÿ’…
  • --fs-brutal-reload โ€” same energy but make it brutal: filesystem object changes, instance gets the hard reload. no gentle goodbyes.
  • --fs-signal โ€” raise a uwsgi signal when the filesystem object changes. syntax: file signal โ€” yes bestie, both of them.
  • --check-mountpoint โ€” if a filesystem dips and stops being reachable, this literally destroys the instance. v useful for reliable Fuse management. it's giving "if you can't find home, nobody gets home" ๐Ÿ˜ญ
  • --mountpoint-check โ€” same thing, same destruction, different spelling. destroy the instance if a filesystem is no more reachable (great for reliable Fuse management).
  • --check-mount โ€” you guessed it: destroy the instance when a filesystem is no longer reachable. Fuse stays reliable, periodt.
  • --mount-check โ€” fourth alias of the same vibe: unreachable filesystem โ†’ instance destroyed. reliable Fuse management stays winning.
  • --propagate-touch โ€” this is the over-engineering option for systems with flaky signal management. sometimes you just gotta over-engineer, iykyk ๐Ÿซถ
  • --limit-post โ€” cap that request body. limit request body, that's it, that's the whole thing.
  • --no-orphans โ€” if the master dies, workers get auto-killed too. heads up tho: this can be dangerous for availability. dramatic but true ๐Ÿ’€
  • --prio โ€” set processes/threads priority.
  • --cpu-affinity โ€” set cpu affinity. tell those processes where to live.
  • --post-buffering โ€” set size in bytes after which it'll buffer to disk instead of memory. memory is a vibe but disk is forever โœจ
  • --post-buffering-bufsize โ€” set buffer size for read() in post buffering mode.
  • --body-read-warning โ€” set the amount of allowed memory allocation (in megabytes) for request body before it starts printing a warning at you.
  • --upload-progress โ€” enable creation of .json files in the specified directory during a file upload. watch it go ๐Ÿ“ˆ
  • --no-default-app โ€” do not fallback to default app. no safety net, no backup plan, we ball.
  • --manage-script-name โ€” automatically rewrite SCRIPT_NAME and PATH_INFO. let it handle the naming, it's better at it than you.
  • --ignore-script-name โ€” ignore SCRIPT_NAME. pretend it's not even there.
  • --catch-exceptions โ€” report exception as http output. discouraged, bestie โ€” use only for testing. do NOT ship this.
  • --reload-on-exception โ€” reload a worker when an exception is raised. worker said "I'm out" and it means it.
  • --reload-on-exception-type โ€” reload a worker when a specific exception type is raised. picky reloading, we love specificity.
  • --reload-on-exception-value โ€” reload a worker when a specific exception value is raised.
  • --reload-on-exception-repr โ€” reload a worker when a specific exception type+value (language-specific) is raised.
  • --exception-handler โ€” add an exception handler. someone to catch the chaos ๐Ÿงš
  • --enable-metrics โ€” enable metrics subsystem. numbers, but make it fashion.
  • --metric โ€” add a custom metric. yours, your design.
  • --metric-threshold โ€” add a metric threshold/alarm.
  • --metric-alarm โ€” add a metric threshold/alarm.
  • --alarm-metric โ€” add a metric threshold/alarm. (three names, one job, iconic)
  • --metrics-dir โ€” export metrics as text files to the specified directory.
  • --metrics-dir-restore โ€” restore last value taken from the metrics dir. memory restored, main character energy ๐ŸŽ€
  • --metric-dir โ€” export metrics as text files to the specified directory. (same deal, shorter name)
  • --metric-dir-restore โ€” restore last value taken from the metrics dir.
  • --metrics-no-cores โ€” disable generation of cores-related metrics. no cores, no metrics, no problem.
  • --udp โ€” run the udp server on the specified address.
  • --stats โ€” enable the stats server on the specified address.
  • --stats-server โ€” enable the stats server on the specified address. same thing, alternate spelling bestie.
  • --stats-http โ€” prefix stats server json output with http headers.
  • --stats-minified โ€” minify statistics json output. smaller json, same truth โœจ
  • --stats-min โ€” minify statistics json output. (yes it's the alias, no we're not sorry)
  • --stats-push โ€” push the stats json to the specified destination. send it ๐Ÿ“ค
  • --stats-pusher-default-freq โ€” set the default frequency of stats pushers.
  • --stats-pushers-default-freq โ€” set the default frequency of stats pushers. (plural, same function)
  • --stats-no-cores โ€” disable generation of cores-related stats.
  • --stats-no-metrics โ€” do not include metrics in stats output. metrics stay home.
  • --multicast โ€” subscribe to specified multicast group.
  • --multicast-ttl โ€” set multicast ttl.
  • --multicast-loop โ€” set multicast loop (default 1).
  • --master-fifo โ€” enable the master fifo. the master gets a lil communication tube ๐Ÿ’…
  • --notify-socket โ€” enable the notification socket.
  • --subscription-notify-socket โ€” set the notification socket for subscriptions.
  • --legion โ€” became a member of a legion. we're building an army, fr fr ๐Ÿ‘‘
  • --legion-mcast โ€” became a member of a legion (shortcut for multicast).
  • --legion-node โ€” add a node to a legion.
  • --legion-freq โ€” set the frequency of legion packets.
  • --legion-tolerance โ€” set the tolerance of legion subsystem.
  • --legion-death-on-lord-error โ€” if one of the lord hooks fails, declare itself as a dead node for the specified amount of seconds. dramatic? yes. effective? also yes.
  • --legion-skew-tolerance โ€” set the clock skew tolerance of legion subsystem (default 30 seconds).
  • --legion-lord โ€” action to call on Lord election. ๐Ÿ‘‘
  • --legion-unlord โ€” action to call on Lord dismiss.
  • --legion-setup โ€” action to call on legion setup.
  • --legion-death โ€” action to call on legion death (shutdown of the instance). rip ๐Ÿ˜ญ
  • --legion-join โ€” action to call on legion join (first time quorum is reached).
  • --legion-node-joined โ€” action to call on new node joining legion.
  • --legion-node-left โ€” action to call node leaving legion.
  • --legion-quorum โ€” set the quorum of a legion.
  • --legion-scroll โ€” set the scroll of a legion.
  • --legion-scroll-max-size โ€” set max size of legion scroll buffer.
  • --legion-scroll-list-max-size โ€” set max size of legion scroll list buffer.
  • --subscriptions-sign-check โ€” set digest algorithm and certificate directory for secured subscription system. signatures verified, trust established ๐Ÿซถ
  • --subscriptions-sign-check-tolerance โ€” set the maximum tolerance (in seconds) of clock skew for secured subscription system.
  • --subscriptions-sign-skip-uid โ€” skip signature check for the specified uid when using unix sockets credentials. special permission slip, just for that uid.
  • --subscriptions-credentials-check โ€” add a directory to search for subscriptions key credentials.
  • --subscriptions-use-credentials โ€” enable management of SCM_CREDENTIALS in subscriptions UNIX sockets.
  • --subscription-algo โ€” set load balancing algorithm for the subscription system.
  • --subscription-dotsplit โ€” try to fallback to the next part (dot based) in subscription key.
  • --subscribe-to โ€” subscribe to the specified subscription server.
  • --st โ€” subscribe to the specified subscription server. (short king option name)
  • --subscribe โ€” subscribe to the specified subscription server.
  • --subscribe2 โ€” subscribe to the specified subscription server using advanced keyval syntax. glow-up version โœจ
  • --subscribe-freq โ€” send subscription announce at the specified interval.
  • --subscription-tolerance โ€” set tolerance for subscription servers.
  • --unsubscribe-on-graceful-reload โ€” force unsubscribe request even during graceful reload. no lingering subscriptions, we're clean here ๐Ÿ’…
  • --start-unsubscribed โ€” configure subscriptions but do not send them (useful with master fifo). set it up, don't press send.
  • --subscribe-with-modifier1 โ€” force the specififed modifier1 when subscribing.
  • --snmp โ€” enable the embedded snmp server.
  • --snmp-community โ€” set the snmp community string.
  • --ssl-verbose โ€” be verbose about SSL errors. spill the tea, ssl ๐Ÿ’€
  • --ssl-verify-depth โ€” set maximum certificate verification depth.
  • --sni โ€” add an SNI-governed SSL context.
  • --sni-dir โ€” check for cert/key/client_ca file in the specified directory and create a sni/ssl context on demand. on-demand context creation, so efficient.
  • --sni-dir-ciphers โ€” set ssl ciphers for sni-dir option.
  • --ssl-enable3 โ€” enable SSLv3 (insecure). bestie. no. but here's the flag anyway.
  • --ssl-enable-sslv3 โ€” enable SSLv3 (insecure). same warning, same yikes.
  • --ssl-enable-tlsv1 โ€” enable TLSv1 (insecure). the vibes are bad on this one, keep it noted.
  • --ssl-option โ€” set a raw ssl option (numeric value).
  • --sni-regexp โ€” add an SNI-governed SSL context (the key is a regexp). regexp said "I'll handle the matching" ๐Ÿงš
  • --ssl-tmp-dir โ€” store ssl-related temp files in the specified directory.
  • --check-interval โ€” set the interval (in seconds) of master checks.
  • --forkbomb-delay โ€” sleep for the specified number of seconds when a forkbomb is detected. everyone take a lil nap, please ๐Ÿ˜ญ
  • --binary-path โ€” force binary path.
  • --privileged-binary-patch โ€” patch the uwsgi binary with a new command (before privileges drop).
  • --unprivileged-binary-patch โ€” patch the uwsgi binary with a new command (after privileges drop).
  • --privileged-binary-patch-arg โ€” patch the uwsgi binary with a new command and arguments (before privileges drop).
  • --unprivileged-binary-patch-arg โ€” patch the uwsgi binary with a new command and arguments (after privileges drop).
  • --async โ€” enable async mode with specified cores.
  • --max-fd โ€” set maximum number of file descriptors (requires root privileges).
  • --logto โ€” set logfile/udp address.
  • --logto2 โ€” log to specified file or udp address after privileges drop. the sequel ๐ŸŽฌ
  • --log-format โ€” set advanced format for request logging.
  • --logformat โ€” set advanced format for request logging. (same, minus the dash)
  • --logformat-strftime โ€” apply strftime to logformat output.
  • --log-format-strftime โ€” apply strftime to logformat output.
  • --logfile-chown โ€” chown logfiles.
  • --logfile-chmod โ€” chmod logfiles.
  • --log-syslog โ€” log to syslog.
  • --log-socket โ€” send logs to the specified socket.
  • --req-logger โ€” set/append a request logger.
  • --logger-req โ€” set/append a request logger. (yes, the name got flipped, it's still the same job)
  • --logger โ€” set/append a logger.
  • --logger-list โ€” list enabled loggers. roll call ๐Ÿ“‹
  • --loggers-list โ€” list enabled loggers.
  • --threaded-logger โ€” offload log writing to a thread. delegating, as one does ๐Ÿ’…
  • --log-encoder โ€” add an item in the log encoder chain.
  • --log-req-encoder โ€” add an item in the log req encoder chain.
  • --log-drain โ€” drain (do not show) log lines matching the specified regexp. those lines? never happened ๐Ÿ™ˆ
  • --log-filter โ€” show only log lines matching the specified regexp. curated feed, only the best.
  • --log-route โ€” log to the specified named logger if regexp applied on logline matches.
  • --log-req-route โ€” log requests to the specified named logger if regexp applied on logline matches.
  • --use-abort โ€” call abort() on segfault/fpe, could be useful for generating a core dump.
  • --alarm โ€” create a new alarm, syntax: <alarm> <plugin:args>. โฐ
  • --alarm-cheap โ€” use main alarm thread rather than create dedicated threads for curl-based alarms. budget-friendly alarm, lowkey genius.

okay bestie we are still in the options, this list is literally never-ending and honestly? obsessed ๐Ÿ’… here's the next chunk, no skips, no shortcuts, every single flag accounted for ๐Ÿซถ

  • --alarm-freq โ€” tunes the anti-loop alarm system (default 3 seconds)
  • --alarm-fd โ€” raises the alarm you name whenever an fd is read for read; by default it reads 1 byte, so set 8 if you're dealing with eventfd โœจ
  • --alarm-segfault โ€” fires the alarm you specify when the segmentation fault handler runs ๐Ÿ˜ญ
  • --segfault-alarm โ€” fires the alarm you specify when the segmentation fault handler runs (yep, same words, it's giving twin energy ๐Ÿ’€)
  • --alarm-backlog โ€” fires the alarm you specify when the socket backlog queue is full ๐Ÿ”ฅ
  • --backlog-alarm โ€” fires the alarm you specify when the socket backlog queue is full ๐ŸŒธ
  • --lq-alarm โ€” fires the alarm you specify when the socket backlog queue is full ๐Ÿ’–
  • --alarm-lq โ€” fires the alarm you specify when the socket backlog queue is full โœจ
  • --alarm-listen-queue โ€” fires the alarm you specify when the socket backlog queue is full ๐Ÿ‘‘
  • --listen-queue-alarm โ€” fires the alarm you specify when the socket backlog queue is full ๐ŸŒˆ
  • --log-alarm โ€” fires the alarm you name whenever a log line matches your regexp; syntax: <alarm>[,alarm...] <regexp>
  • --alarm-log โ€” fires the alarm you name whenever a log line matches your regexp; syntax: <alarm>[,alarm...] <regexp>
  • --not-log-alarm โ€” skips the alarm you name when a log line matches your regexp; syntax: <alarm>[,alarm...] <regexp> ๐Ÿ™ˆ
  • --not-alarm-log โ€” skips the alarm you name when a log line matches your regexp; syntax: <alarm>[,alarm...] <regexp>
  • --alarm-list โ€” lists all the enabled alarms ๐Ÿ“‹
  • --alarms-list โ€” lists all the enabled alarms ๐Ÿ“‹
  • --alarm-msg-size โ€” sets the max size of an alarm message (default 8192)
  • --log-master โ€” delegates the logging to the master process ๐Ÿ‘‘
  • --log-master-bufsize โ€” sets the buffer size for the master logger; anything bigger gets truncated, so watch out โš ๏ธ
  • --log-master-stream โ€” creates the master logpipe as SOCK_STREAM
  • --log-master-req-stream โ€” creates the master requests logpipe as SOCK_STREAM
  • --log-reopen โ€” reopens the log after a reload ๐Ÿฆ‹
  • --log-truncate โ€” truncates the log on startup
  • --log-maxsize โ€” sets the maximum logfile size
  • --log-backupname โ€” sets the logfile name to use after rotation
  • --logdate โ€” prefixes logs with the date, or with a strftime string ๐ŸŽ€
  • --log-date โ€” prefixes logs with the date, or with a strftime string ๐ŸŽ€
  • --log-prefix โ€” prefixes logs with a string of your choosing
  • --log-zero โ€” logs responses that have no body
  • --log-slow โ€” logs any request slower than the number of milliseconds you give โฑ๏ธ
  • --log-4xx โ€” logs requests with a 4xx response
  • --log-5xx โ€” logs requests with a 5xx response
  • --log-big โ€” logs requests bigger than the size you specify
  • --log-sendfile โ€” logs sendfile requests ๐Ÿ“ฆ
  • --log-ioerror โ€” logs requests that hit io errors ๐Ÿ’€
  • --log-micros โ€” reports response time in microseconds instead of milliseconds
  • --log-x-forwarded-for โ€” uses the ip from the X-Forwarded-For header instead of REMOTE_ADDR
  • --master-as-root โ€” leaves the master process running as root ๐Ÿ‘‘ (big power, handle with care)
  • --drop-after-init โ€” runs the privileges drop after plugin initialization; superseded by drop-after-apps
  • --drop-after-apps โ€” runs the privileges drop after apps loading; superseded by master-as-root
  • --force-cwd โ€” forces the initial working directory to the value you specify
  • --binsh โ€” overrides /bin/sh (it's what the exec hooks use, and it always falls back to /bin/sh)
  • --chdir โ€” chdirs to the specified directory before apps loading ๐Ÿฆ‹
  • --chdir2 โ€” chdirs to the specified directory after apps loading ๐Ÿฆ‹
  • --lazy โ€” sets lazy mode (loads apps in the workers instead of the master)
  • --lazy-apps โ€” loads apps in each worker instead of the master
  • --cheap โ€” sets cheap mode (workers only get spawned after the very first request ๐Ÿ’ธ)
  • --cheaper โ€” sets cheaper mode (that's the adaptive process spawning one)
  • --cheaper-initial โ€” sets how many processes to spawn at the start in cheaper mode
  • --cheaper-algo โ€” picks which algorithm gets used for the adaptive process spawning ๐Ÿง 
  • --cheaper-step โ€” how many extra processes to spawn at each overload
  • --cheaper-overload โ€” increases workers after the overload you specify
  • --cheaper-algo-list โ€” lists the enabled cheapers algorithms ๐Ÿ“‹
  • --cheaper-algos-list โ€” lists the enabled cheapers algorithms ๐Ÿ“‹
  • --cheaper-list โ€” lists the enabled cheapers algorithms ๐Ÿ“‹
  • --cheaper-rss-limit-soft โ€” won't spawn new workers if the total resident memory usage of all workers is above this limit ๐Ÿ›‘
  • --cheaper-rss-limit-hard โ€” if the total workers resident memory usage is above this, it tries to stop workers ๐Ÿ˜ฌ
  • --idle โ€” sets idle mode (puts uWSGI back into cheap mode after some inactivity)
  • --die-on-idle โ€” shuts uWSGI down when it goes idle ๐Ÿ’€
  • --mount โ€” loads an application under a mountpoint
  • --worker-mount โ€” loads an application under a mountpoint in the worker you name, or after workers spawn
  • --threads โ€” runs each worker in prethreaded mode with the number of threads you specify ๐Ÿงต
  • --thread-stacksize โ€” sets the threads stacksize
  • --threads-stacksize โ€” sets the threads stacksize
  • --thread-stack-size โ€” sets the threads stacksize
  • --threads-stack-size โ€” sets the threads stacksize
  • --vhost โ€” enables virtualhosting mode (it keys off the SERVER_NAME variable) ๐ŸŒ
  • --vhost-host โ€” enables virtualhosting mode (it keys off the HTTP_HOST variable) ๐ŸŒ
  • --route โ€” adds a route
  • --route-host โ€” adds a route based on the Host header
  • --route-uri โ€” adds a route based on REQUEST_URI
  • --route-qs โ€” adds a route based on QUERY_STRING
  • --route-remote-addr โ€” adds a route based on REMOTE_ADDR
  • --route-user-agent โ€” adds a route based on HTTP_USER_AGENT
  • --route-remote-user โ€” adds a route based on REMOTE_USER
  • --route-referer โ€” adds a route based on HTTP_REFERER
  • --route-label โ€” adds a routing label (for use with goto) ๐Ÿท๏ธ
  • --route-if โ€” adds a route based on a condition
  • --route-if-not โ€” adds a route based on a condition, but the negate version ๐Ÿ™ƒ
  • --route-run โ€” always runs the route action you specify
  • --final-route โ€” adds a final route
  • --final-route-status โ€” adds a final route for the status you specify
  • --final-route-host โ€” adds a final route based on the Host header
  • --final-route-uri โ€” adds a final route based on REQUEST_URI
  • --final-route-qs โ€” adds a final route based on QUERY_STRING
  • --final-route-remote-addr โ€” adds a final route based on REMOTE_ADDR
  • --final-route-user-agent โ€” adds a final route based on HTTP_USER_AGENT
  • --final-route-remote-user โ€” adds a final route based on REMOTE_USER
  • --final-route-referer โ€” adds a final route based on HTTP_REFERER
  • --final-route-label โ€” adds a final routing label (for use with goto) ๐Ÿท๏ธ
  • --final-route-if โ€” adds a final route based on a condition
  • --final-route-if-not โ€” adds a final route based on a condition, negate version ๐Ÿ™ƒ
  • --final-route-run โ€” always runs the final route action you specify
  • --error-route โ€” adds an error route
  • --error-route-status โ€” adds an error route for the status you specify
  • --error-route-host โ€” adds an error route based on the Host header
  • --error-route-uri โ€” adds an error route based on REQUEST_URI
  • --error-route-qs โ€” adds an error route based on QUERY_STRING
  • --error-route-remote-addr โ€” adds an error route based on REMOTE_ADDR
  • --error-route-user-agent โ€” adds an error route based on HTTP_USER_AGENT
  • --error-route-remote-user โ€” adds an error route based on REMOTE_USER
  • --error-route-referer โ€” adds an error route based on HTTP_REFERER
  • --error-route-label โ€” adds an error routing label (for use with goto) ๐Ÿท๏ธ
  • --error-route-if โ€” adds an error route based on a condition
  • --error-route-if-not โ€” adds an error route based on a condition, negate version ๐Ÿ™ƒ
  • --error-route-run โ€” always runs the error route action you specify
  • --response-route โ€” adds a response route
  • --response-route-status โ€” adds a response route for the status you specify
  • --response-route-host โ€” adds a response route based on the Host header
  • --response-route-uri โ€” adds a response route based on REQUEST_URI
  • --response-route-qs โ€” adds a response route based on QUERY_STRING
  • --response-route-remote-addr โ€” adds a response route based on REMOTE_ADDR
  • --response-route-user-agent โ€” adds a response route based on HTTP_USER_AGENT
  • --response-route-remote-user โ€” adds a response route based on REMOTE_USER
  • --response-route-referer โ€” adds a response route based on HTTP_REFERER
  • --response-route-label โ€” adds a response routing label (for use with goto) ๐Ÿท๏ธ
  • --response-route-if โ€” adds a response route based on a condition
  • --response-route-if-not โ€” adds a response route based on a condition, negate version ๐Ÿ™ƒ
  • --response-route-run โ€” always runs the response route action you specify
  • --router-list โ€” lists the enabled routers ๐Ÿ“‹
  • --routers-list โ€” lists the enabled routers ๐Ÿ“‹
  • --error-page-403 โ€” adds an error page (html) for the managed 403 response
  • --error-page-404 โ€” adds an error page (html) for the managed 404 response
  • --error-page-500 โ€” adds an error page (html) for the managed 500 response
  • --websockets-ping-freq โ€” sets how often (in seconds) websockets automatic ping packets go out ๐Ÿ“
  • --websocket-ping-freq โ€” sets how often (in seconds) websockets automatic ping packets go out ๐Ÿ“
  • --websockets-pong-tolerance โ€” sets the tolerance (in seconds) of the websockets ping/pong subsystem
  • --websocket-pong-tolerance โ€” sets the tolerance (in seconds) of the websockets ping/pong subsystem
  • --websockets-max-size โ€” sets the max allowed size of websocket messages (in Kbytes, default 1024)
  • --websocket-max-size โ€” sets the max allowed size of websocket messages (in Kbytes, default 1024)
  • --chunked-input-limit โ€” sets the max size of a chunked input part (default 1MB, in bytes)
  • --chunked-input-timeout โ€” sets the default timeout for chunked input โฑ๏ธ
  • --clock โ€” sets a clock source
  • --clock-list โ€” lists the enabled clocks ๐Ÿ“‹
  • --clocks-list โ€” lists the enabled clocks ๐Ÿ“‹
  • --add-header โ€” automatically adds HTTP headers to your response ๐Ÿ’Œ

and bestieโ€ฆ we are STILL not done, the options keep coming, stay with me ๐Ÿงš

  • --rem-header โ€” auto-yeets a specified HTTP header off the response, no cap ๐Ÿ’…
  • --del-header โ€” same energy as --rem-header: automatically removes the specified HTTP header from the response
  • --collect-header โ€” stashes the specified response header into a request var (syntax: header var) ๐ŸŽ€
  • --response-header-collect โ€” also stashes the specified response header into a request var (syntax: header var)
  • --pull-header โ€” stashes the specified response header in a request var and rips it out of the response (syntax: header var)
  • --check-static โ€” looks for static files in the directory you give it ๐Ÿฆ‹
  • --check-static-docroot โ€” looks for static files in the requested DOCUMENT_ROOT
  • --static-check โ€” looks for static files in the specified directory (yes bestie, it's the same vibe as --check-static)
  • --static-map โ€” maps a mountpoint to a static directory (or a single file)
  • --static-map2 โ€” like --static-map except it completely appends the requested resource onto the docroot โœจ
  • --static-skip-ext โ€” skips the specified extension when it's doing staticfile checks
  • --static-index โ€” if someone asks for a directory, it goes searching for the specified file ๐Ÿ‘‘
  • --static-safe โ€” skips the security checks when the file lives under the specified path
  • --static-cache-paths โ€” drops resolved paths into the uWSGI cache for the specified amount of seconds
  • --static-cache-paths-name โ€” uses the specified cache for static paths
  • --mimefile โ€” sets the mime types file path (default /etc/mime.types) ๐ŸŒธ
  • --mime-file โ€” sets the mime types file path (default /etc/mime.types)
  • --static-expires-type โ€” sets the Expires header based on content type
  • --static-expires-type-mtime โ€” sets the Expires header based on content type and file mtime
  • --static-expires โ€” sets the Expires header based on a filename regexp
  • --static-expires-mtime โ€” sets the Expires header based on a filename regexp and file mtime
  • --static-expires-uri โ€” sets the Expires header based on a REQUEST_URI regexp
  • --static-expires-uri-mtime โ€” sets the Expires header based on a REQUEST_URI regexp and file mtime
  • --static-expires-path-info โ€” sets the Expires header based on a PATH_INFO regexp
  • --static-expires-path-info-mtime โ€” sets the Expires header based on a PATH_INFO regexp and file mtime
  • --static-gzip โ€” if the regexp you supplied matches the static file translation, it'll go hunt for a gzip version ๐Ÿ”ฅ
  • --static-gzip-all โ€” checks for a gzip version of every static file that gets requested
  • --static-gzip-dir โ€” checks for a gzip version of all requested static files in the specified dir/prefix
  • --static-gzip-prefix โ€” checks for a gzip version of all requested static files in the specified dir/prefix
  • --static-gzip-ext โ€” checks for a gzip version of all requested static files with the specified ext/suffix
  • --static-gzip-suffix โ€” checks for a gzip version of all requested static files with the specified ext/suffix
  • --honour-range โ€” turns on support for the HTTP Range header ๐Ÿซถ
  • --offload-threads โ€” sets how many offload threads to spawn (per-worker, default 0)
  • --offload-thread โ€” sets how many offload threads to spawn (per-worker, default 0)
  • --file-serve-mode โ€” sets the static file serving mode
  • --fileserve-mode โ€” sets the static file serving mode
  • --disable-sendfile โ€” disables sendfile() and makes it rely on boring old read()/write() ๐Ÿ˜ญ
  • --check-cache โ€” checks for response data in the specified cache (leave it empty for the default cache)
  • --close-on-exec โ€” sets close-on-exec on connection sockets (could be required if you're spawning processes inside requests)
  • --close-on-exec2 โ€” sets close-on-exec on server sockets (could be required if you're spawning processes inside requests)
  • --mode โ€” set uWSGI custom mode
  • --env โ€” set environment variable
  • --envdir โ€” loads a daemontools compatible envdir
  • --early-envdir โ€” loads a daemontools compatible envdir ASAP โšก
  • --unenv โ€” unset environment variable
  • --vacuum โ€” tries to remove all of the generated file/sockets ๐Ÿงน
  • --file-write โ€” writes the specified content to the specified file (syntax: file=value) before privileges drop
  • --cgroup โ€” puts the processes in the specified cgroup
  • --cgroup-opt โ€” sets a value in the specified cgroup option
  • --cgroup-dir-mode โ€” sets the permission for the cgroup directory (default is 700)
  • --namespace โ€” runs in a new namespace under the specified rootfs
  • --namespace-keep-mount โ€” keeps the specified mountpoint in your namespace
  • --ns โ€” run in a new namespace under the specified rootfs
  • --namespace-net โ€” adds a network namespace
  • --ns-net โ€” adds a network namespace
  • --enable-proxy-protocol โ€” enables PROXY1 protocol support (only for http parsers)
  • --reuse-port โ€” enables the REUSE_PORT flag on the socket (BSD only, bestie, don't come for me)
  • --tcp-fast-open โ€” enables the TCP_FASTOPEN flag on TCP sockets with the specified qlen value
  • --tcp-fastopen โ€” enables the TCP_FASTOPEN flag on TCP sockets with the specified qlen value
  • --tcp-fast-open-client โ€” uses sendto(..., MSG_FASTOPEN, ...) instead of connect() if it's supported
  • --tcp-fastopen-client โ€” uses sendto(..., MSG_FASTOPEN, ...) instead of connect() if it's supported
  • --zerg โ€” attach to a zerg server ๐Ÿ‘พ
  • --zerg-fallback โ€” falls back to normal sockets if the zerg server isn't available
  • --zerg-server โ€” enables the zerg server on the specified UNIX socket
  • --cron โ€” add a cron task โฐ
  • --cron2 โ€” add a cron task (key=val syntax)
  • --unique-cron โ€” add a unique cron task
  • --cron-harakiri โ€” sets the maximum time (in seconds) we wait for a cron command to complete
  • --legion-cron โ€” add a cron task that's only runnable when the instance is a lord of the specified legion ๐Ÿ‘‘
  • --cron-legion โ€” add a cron task that's only runnable when the instance is a lord of the specified legion
  • --unique-legion-cron โ€” add a unique cron task that's only runnable when the instance is a lord of the specified legion
  • --unique-cron-legion โ€” add a unique cron task that's only runnable when the instance is a lord of the specified legion
  • --loop โ€” select the uWSGI loop engine ๐Ÿ”„
  • --loop-list โ€” list enabled loop engines
  • --loops-list โ€” list enabled loop engines
  • --worker-exec โ€” run the specified command as worker
  • --worker-exec2 โ€” run the specified command as worker (after the post_fork hook)
  • --attach-daemon โ€” attaches a command/daemon to the master process (the command has to not go in background) ๐Ÿซก
  • --attach-control-daemon โ€” attaches a command/daemon to the master process (the command has to not go in background), and when the daemon dies, the master dies too ๐Ÿ’€
  • --smart-attach-daemon โ€” attaches a command/daemon to the master process managed by a pidfile (the command has to daemonize)
  • --smart-attach-daemon2 โ€” attaches a command/daemon to the master process managed by a pidfile (the command has to NOT daemonize)
  • --legion-attach-daemon โ€” same as --attach-daemon but the daemon only runs on the legion lord node
  • --legion-smart-attach-daemon โ€” same as --smart-attach-daemon but the daemon only runs on the legion lord node
  • --legion-smart-attach-daemon2 โ€” same as --smart-attach-daemon2 but the daemon only runs on the legion lord node
  • --daemons-honour-stdin โ€” does not change the stdin of external daemons to /dev/null
  • --attach-daemon2 โ€” the attach-daemon keyval variant (supports smart modes too)
  • --plugins โ€” load uWSGI plugins ๐Ÿงฉ
  • --plugin โ€” load uWSGI plugins
  • --need-plugins โ€” load uWSGI plugins (exit on error)
  • --need-plugin โ€” load uWSGI plugins (exit on error)
  • --plugins-dir โ€” add a directory to the uWSGI plugin search path
  • --plugin-dir โ€” add a directory to the uWSGI plugin search path
  • --plugins-list โ€” list enabled plugins
  • --plugin-list โ€” list enabled plugins
  • --autoload โ€” tries to automatically load plugins when unknown options are found ๐Ÿ”
  • --dlopen โ€” blindly loads a shared library (no thoughts, head empty)
  • --allowed-modifiers โ€” comma separated list of allowed modifiers
  • --remap-modifier โ€” remaps a request modifier from one id to another
  • --dump-options โ€” dumps the full list of available options
  • --show-config โ€” shows the current config reformatted as ini
  • --binary-append-data โ€” returns the content of a resource to stdout for appending to a uwsgi binary (for data:// usage)
  • --print โ€” simple print
  • --iprint โ€” simple print (immediate version)
  • --exit โ€” force exit() of the instance ๐Ÿšช
  • --cflags โ€” report uWSGI CFLAGS (useful for building external plugins)
  • --dot-h โ€” dump the uwsgi.h used for building the core (useful for building external plugins)
  • --config-py โ€” dump the uwsgiconfig.py used for building the core (useful for building external plugins)
  • --build-plugin โ€” build a uWSGI plugin for the current binary
  • --version โ€” print uWSGI version โญ
  • --response-headers-limit โ€” sets the response header maximum size (default: 64k)

๐Ÿ’œ the mono era ๐Ÿ’œ

okay so this whole lil cluster is the Mono plugin's moment to shine, asp.net besties rise up ๐ŸŽ€

  • --mono-app โ€” load a Mono asp.net app from the specified directory
  • --mono-gc-freq โ€” run the Mono GC every <n> requests (default: run after every request)
  • --mono-key โ€” select the ApplicationHost based on the specified CGI var
  • --mono-version โ€” set the Mono jit version
  • --mono-config โ€” set the Mono config file
  • --mono-assembly โ€” load the specified main assembly (default: uwsgi.dll)
  • --mono-exec โ€” exec the specified assembly just before app loading
  • --mono-index โ€” add an asp.net index file ๐ŸŒˆ

and that's a wrap on UWSGI_MONO(1) bestie, we did it, we read the entire thing ๐Ÿซถ this page came from uWSGI version 2.0.24-debian, dated April 2024, and it's filed under UWSGI_MONO(1). go forth and serve those asp.net apps, you absolute icon ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from