UWSGI_LUA(1)

๐Ÿ“ฆ
version 2.0.31+2+0.0.2build2 ยท 3 versions
, in ubuntu resolute, ubuntu stonking

๐Ÿ‘‘ UWSGI_LUA โ€” the manual, but make it make sense

okay bestie, welcome to UWSGI_LUA(1) ๐Ÿ’– this is the page for uwsgi_lua, and yeah it lives under User Commands like the rest of the gang. grab a strawberry ๐Ÿ“, sit down, we're doing the whole thing.


โœจ NAME โœจ

uwsgi_lua โ€” fast (pure C), self-healing, developer-friendly WSGI server

like... it's giving pure C, self-healing, developer-friendly and honestly? obsessed. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

uwsgi-core [options...]

that's it, that's the whole vibe. you throw options at it, it does the thing. ๐Ÿฆ‹


๐ŸŽ€ DESCRIPTION ๐ŸŽ€

so this section is literally just the options, and there are so many of them, so buckle up. no skipping, no summarising, we're doing every single one fr fr. ๐Ÿ˜ญ

๐Ÿ’… sockets & protocols (the networking era)

  • -s, --socket โ€” bind to the specified UNIX/TCP socket using default protocol. the classic. the main character. โœจ
  • -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, processes & harakiri (the drama section)

  • -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. yes it's named that. yes it means what you think. ๐Ÿ’€
  • --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

๐Ÿ“ config loading & option logic (the nerdy but iconic part)

  • -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, syntax: placeholder=name (immediate option)
  • --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 existence
  • --if-not-file โ€” (opt logic) check for file existence
  • --if-dir โ€” (opt logic) check for directory existence
  • --if-not-dir โ€” (opt logic) check for directory existence
  • --ifdir โ€” (opt logic) check for directory existence
  • --if-directory โ€” (opt logic) check for directory existence
  • --endif โ€” (opt logic) end if
  • --end-if โ€” (opt logic) end if
  • --blacklist โ€” set options blacklist context
  • --end-blacklist โ€” clear options blacklist context
  • --whitelist โ€” set options whitelist context
  • --end-whitelist โ€” clear options whitelist context

๐Ÿ’œ error handling & templating (soft launch of the responsible era)

  • --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()
  • --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)

๐ŸŒˆ daemon control & 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

๐Ÿฆ‹ limits, buffers & 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

โœจ socket perms & process naming

  • -c, --cgi-mode โ€” force CGI-mode for plugins supporting it
  • -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
  • -T, --enable-threads โ€” enable threads (stub option this is true by default)
  • --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
  • -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 era (vassals, wrappers, heartbeats)

  • --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 โ€” bestie, this writes the Emperor pid into the file you point at ๐Ÿ“โœจ
  • --emperor-tyrant โ€” puts the Emperor into Tyrant mode ๐Ÿ‘‘๐Ÿ˜ค
  • --emperor-tyrant-nofollow โ€” no symlink-following when checking uid/gid in Tyrant mode, okay? ๐Ÿšซ๐Ÿ”—
  • --emperor-stats โ€” runs the Emperor stats server ๐Ÿ“Šโœจ
  • --emperor-stats-server โ€” also runs the Emperor stats server, because why not ๐Ÿ’…๐Ÿ“Š
  • --early-emperor โ€” spawns the emperor ASAP, like right now bestie โฐ๐Ÿ’จ
  • --emperor-broodlord โ€” runs the emperor in BroodLord mode ๐Ÿฆ‹๐Ÿ‘‘
  • --emperor-throttle โ€” sets the throttling level in milliseconds for vassals acting up ๐Ÿ˜ค default is 1000 โณ
  • --emperor-max-throttle โ€” max throttling level in ms for misbehaving vassals, default is 3 minutes ๐Ÿ›‘โฒ๏ธ
  • --emperor-magic-exec โ€” if a vassal config file has the executable bit, it gets prefixed with exec:// like magic โœจ๐Ÿช„
  • --emperor-on-demand-extension โ€” searches for a text file named vassal name + extension that holds the on demand socket name ๐Ÿ”๐Ÿ“„
  • --emperor-on-demand-ext โ€” same vibe, searches for that text file with the on demand socket name ๐Ÿซถ๐Ÿ”
  • --emperor-on-demand-directory โ€” turns on on-demand mode, binding to a unix socket in the dir you specify, named like the vassal + .socket ๐Ÿ”Œ๐Ÿ“
  • --emperor-on-demand-dir โ€” yep, enables on-demand mode with that unix socket in your chosen dir, vassal + .socket ๐Ÿซถ๐Ÿ”Œ
  • --emperor-on-demand-exec โ€” uses the output of the command you give as the on-demand socket name; the vassal name is the only argument passed ๐Ÿ–ฅ๏ธ๐Ÿ”Œ
  • --emperor-extra-extension โ€” lets the Emperor accept the extension you specify; the vassal gets called with --config โœ…๐Ÿ“‚
  • --emperor-extra-ext โ€” same deal, allows that extra extension and calls the vassal with --config ๐Ÿ’…๐Ÿ“‚
  • --emperor-no-blacklist โ€” disables the Emperor blacklisting subsystem, no cap ๐Ÿšซ๐Ÿ“‹
  • --emperor-use-clone โ€” uses clone() instead of fork(), passing the unshare() flags you specify ๐Ÿงฌ๐Ÿ”
  • --emperor-graceful-shutdown โ€” vassals get a graceful shutdown during ragnarok ๐ŸŒ‹๐Ÿ•Š๏ธ
  • --emperor-cap โ€” sets the vassals capability ๐Ÿ”๐Ÿ‘‘
  • --vassals-cap โ€” also sets the vassals capability, bestie ๐Ÿ”๐Ÿซถ
  • --vassal-cap โ€” sets vassals capability too, periodt ๐Ÿ”๐Ÿ’…
  • --imperial-monitor-list โ€” lists all enabled imperial monitors ๐Ÿ“œ๐Ÿ‘€
  • --imperial-monitors-list โ€” lists enabled imperial monitors, yes plural โœจ๐Ÿ“œ
  • --vassals-inherit โ€” adds config templates to vassals config using --inherit ๐Ÿ“๐Ÿงฌ
  • --vassals-include โ€” includes config templates to vassals config, but uses --include instead of --inherit ๐Ÿ“๐Ÿ”€
  • --vassals-inherit-before โ€” adds config templates using --inherit, and parses them before the vassal file โฎ๏ธ๐Ÿ“
  • --vassals-include-before โ€” includes config templates with --include instead of --inherit, and parses before the vassal file โฎ๏ธ๐Ÿ“
  • --vassals-start-hook โ€” runs your command before each vassal starts ๐Ÿ๐Ÿช
  • --vassals-stop-hook โ€” runs your command after a vassal dies ๐Ÿ’€๐Ÿช
  • --vassal-sos โ€” when overloaded, the vassal asks the emperor for reinforcements ๐Ÿ†˜๐Ÿ‘‘
  • --vassal-sos-backlog โ€” asks the emperor for SOS if the backlog queue has more items than your value ๐Ÿ“ˆ๐Ÿ†˜
  • --vassals-set โ€” automatically sets the option you specify via --set for every vassal ๐Ÿค–โš™๏ธ
  • --vassal-set โ€” same auto-set via --set for every vassal, fr fr ๐Ÿค–๐Ÿ’…
  • --heartbeat โ€” announces healthiness to the emperor ๐Ÿ’“๐Ÿ‘‘
  • --reload-mercy โ€” max time in seconds we wait for workers and other processes to die during reload/shutdown โณ๐Ÿ’€
  • --worker-reload-mercy โ€” max time in seconds a worker can take to reload/shutdown; default is 60 โฒ๏ธ๐Ÿ‘ท
  • --mule-reload-mercy โ€” max time in seconds a mule can take to reload/shutdown; default is 60 โฒ๏ธ๐Ÿด
  • --exit-on-reload โ€” forces exit even if a reload is requested ๐Ÿšช๐Ÿ’ฅ
  • --die-on-term โ€” exits instead of doing a brutal reload on SIGTERM ๐Ÿ’€๐Ÿ“ก
  • --force-gateway โ€” forces the spawn of the first registered gateway without a master ๐Ÿšชโšก
  • -h|--help โ€” shows this help, bestie ๐Ÿ†˜๐Ÿ’–
  • -h|--usage โ€” also shows this help, same energy ๐Ÿ†˜โœจ
  • --print-sym โ€” prints the content of the binary symbol you specify ๐Ÿ”๐Ÿงฌ
  • --print-symbol โ€” prints that binary symbol content too, iconic ๐Ÿซถ๐Ÿ”
  • -r|--reaper โ€” calls waitpid(-1,...) after each request to yeet zombies ๐ŸงŸโ€โ™€๏ธ๐Ÿ—‘๏ธ
  • -R|--max-requests โ€” reloads workers after the specified amount of managed requests ๐Ÿ”„๐Ÿ“ˆ
  • --max-requests-delta โ€” adds (worker_id * delta) to the max_requests value of each worker โž•๐Ÿ‘ท
  • --min-worker-lifetime โ€” number of seconds a worker must run before being reloaded; default is 10 โณ๐Ÿ‘ท
  • --max-worker-lifetime โ€” reloads workers after the specified amount of seconds; default is disabled ๐Ÿšซโฒ๏ธ
  • --max-worker-lifetime-delta โ€” adds (worker_id * delta) seconds to the max_worker_lifetime value of each worker โž•โณ
  • -z|--socket-timeout โ€” sets the internal sockets timeout โฐ๐Ÿ”Œ
  • --no-fd-passing โ€” disables file descriptor passing ๐Ÿšซ๐Ÿ“
  • --locks โ€” creates the specified number of shared locks ๐Ÿ”’๐Ÿ”ข
  • --lock-engine โ€” sets the lock engine โš™๏ธ๐Ÿ”’
  • --ftok โ€” sets the ipcsem key via ftok() to avoid duplicates ๐Ÿ”‘๐Ÿงฌ
  • --persistent-ipcsem โ€” does NOT remove ipcsem's on shutdown, keep them around ๐Ÿšซ๐Ÿ—‘๏ธ
  • -A|--sharedarea โ€” creates a raw shared memory area of the specified pages; note: it supports keyval too ๐Ÿง โœจ
  • --safe-fd โ€” does not close the file descriptor you specify ๐Ÿ™…โ€โ™€๏ธ๐Ÿ“
  • --fd-safe โ€” same vibe, keeps that file descriptor open ๐Ÿซถ๐Ÿ“
  • --cache โ€” creates a shared cache containing the elements you give ๐Ÿ—ƒ๏ธโœจ
  • --cache-blocksize โ€” sets the cache blocksize ๐Ÿงฑ๐Ÿ—ƒ๏ธ
  • --cache-store โ€” enables persistent cache to disk ๐Ÿ’พ๐Ÿ—ƒ๏ธ
  • --cache-store-sync โ€” sets how often the persistent cache syncs โฑ๏ธ๐Ÿ’พ
  • --cache-no-expire โ€” disables the auto sweep of expired items ๐Ÿšซ๐Ÿงน
  • --cache-expire-freq โ€” sets the frequency of cache sweeper scans; default is 3 seconds ๐Ÿงนโฒ๏ธ
  • --cache-report-freed-items โ€” constantly reports cache items freed by the sweeper; use only for debug ๐Ÿ›๐Ÿ“ข
  • --cache-udp-server โ€” binds the cache UDP server (only for set/update/delete) to the socket you specify ๐Ÿ“ก๐Ÿ”Œ
  • --cache-udp-node โ€” sends cache update/deletion to the cache UDP server you specify ๐Ÿ“ค๐Ÿ“ก
  • --cache-sync โ€” copies the whole content of another uWSGI cache server on startup ๐Ÿ”„๐Ÿ—ƒ๏ธ
  • --cache-use-last-modified โ€” updates last_modified_at timestamp on every cache item modification; default is disabled ๐Ÿ•’๐Ÿ—ƒ๏ธ
  • --add-cache-item โ€” adds an item in the cache โž•๐Ÿ—ƒ๏ธ
  • --load-file-in-cache โ€” loads a static file in the cache ๐Ÿ“‚๐Ÿ—ƒ๏ธ
  • --load-file-in-cache-gzip โ€” loads a static file in the cache with gzip compression ๐Ÿ—œ๏ธ๐Ÿ“‚
  • --cache2 โ€” creates a new generation shared cache with keyval syntax โœจ๐Ÿ—ƒ๏ธ
  • --queue โ€” enables shared queue ๐Ÿ“‹โœจ
  • --queue-blocksize โ€” sets queue blocksize ๐Ÿงฑ๐Ÿ“‹
  • --queue-store โ€” enables persistent queue to disk ๐Ÿ’พ๐Ÿ“‹
  • --queue-store-sync โ€” sets sync frequency for persistent queue โฑ๏ธ๐Ÿ’พ
  • -Q|--spooler โ€” runs a spooler on the directory you specify ๐ŸŒ€๐Ÿ“
  • --spooler-external โ€” maps spooler requests to a spooler directory managed by an external instance ๐ŸŒ๐ŸŒ€
  • --spooler-ordered โ€” tries to order the execution of spooler tasks ๐Ÿ”ข๐ŸŒ€
  • --spooler-chdir โ€” chdir()s to the directory you specify before each spooler task ๐Ÿ“‚๐ŸŒ€
  • --spooler-processes โ€” sets the number of processes for spoolers ๐Ÿ‘ฏ๐ŸŒ€
  • --spooler-quiet โ€” no verbose spooler task chatter, shhh ๐Ÿคซ๐ŸŒ€
  • --spooler-max-tasks โ€” max number of tasks to run before recycling a spooler ๐Ÿ”„๐ŸŒ€
  • --spooler-harakiri โ€” sets harakiri timeout for spooler tasks โณ๐ŸŒ€
  • --spooler-frequency โ€” sets spooler frequency ๐Ÿ“ถ๐ŸŒ€
  • --spooler-freq โ€” same, sets spooler frequency ๐Ÿซถ๐Ÿ“ถ
  • --mule โ€” adds a mule ๐Ÿดโœจ
  • --mules โ€” adds the number of mules you specify ๐Ÿด๐Ÿด
  • --farm โ€” adds a mule farm ๐Ÿšœ๐Ÿด
  • --mule-msg-size โ€” sets mule message buffer size ๐Ÿ“จ๐Ÿด
  • --signal โ€” sends a uWSGI signal to a server ๐Ÿ“กโœจ
  • --signal-bufsize โ€” sets buffer size for the signal queue ๐Ÿ“ฆ๐Ÿ“ก
  • --signals-bufsize โ€” same, sets buffer size for signal queue ๐Ÿซถ๐Ÿ“ฆ
  • --signal-timer โ€” adds a timer, syntax: <signal> <seconds> โฒ๏ธ๐Ÿ“ก
  • --timer โ€” adds a timer too, syntax: <signal> <seconds> ๐Ÿซถโฒ๏ธ
  • --signal-rbtimer โ€” adds a redblack timer, syntax: <signal> <seconds> ๐ŸŒณโฒ๏ธ
  • --rbtimer โ€” adds a redblack timer, same syntax: <signal> <seconds> ๐Ÿซถ๐ŸŒณ
  • --rpc-max โ€” maximum number of rpc slots; default: 64 ๐Ÿ“ž๐Ÿ”ข
  • -L|--disable-logging โ€” disables request logging ๐Ÿšซ๐Ÿ“
  • --flock โ€” locks the file you specify before starting, and exits if it's already locked ๐Ÿ”’๐Ÿšช
  • --flock-wait โ€” locks the file before starting, but waits if it's already locked โณ๐Ÿ”’
  • --flock2 โ€” locks the file after logging/daemon setup, exits if locked ๐Ÿ”’๐Ÿšช
  • --flock-wait2 โ€” locks after logging/daemon setup, waits if locked โณ๐Ÿ”’
  • --pidfile โ€” creates a pidfile before privileges drop ๐Ÿ“๐Ÿ”ฝ
  • --pidfile2 โ€” creates a pidfile after privileges drop ๐Ÿ“โฌ‡๏ธ
  • --safe-pidfile โ€” creates a safe pidfile before privileges drop ๐Ÿ›ก๏ธ๐Ÿ“
  • --safe-pidfile2 โ€” creates a safe pidfile after privileges drop ๐Ÿ›ก๏ธโฌ‡๏ธ
  • --chroot โ€” chroot()s to the directory you specify ๐Ÿฐ๐Ÿ“
  • --pivot-root โ€” pivot_root()s to the specified directories; new_root and put_old must be separated with a space ๐Ÿ”„๐Ÿ“
  • --pivot_root โ€” same thing, pivot_root() to those dirs with a space between new_root and put_old ๐Ÿซถ๐Ÿ”„
  • --uid โ€” setuid to the user/uid you specify ๐Ÿ‘ค๐Ÿ†”
  • --gid โ€” setgid to the group/gid you specify ๐Ÿ‘ฅ๐Ÿ†”
  • --add-gid โ€” adds the specified group id to the process credentials โž•๐Ÿ‘ฅ
  • --immediate-uid โ€” setuid to the user/uid IMMEDIATELY ๐Ÿƒโ€โ™€๏ธ๐Ÿ‘ค
  • --immediate-gid โ€” setgid to the group/gid IMMEDIATELY ๐Ÿƒโ€โ™€๏ธ๐Ÿ‘ฅ
  • --no-initgroups โ€” disables additional groups set via initgroups() ๐Ÿšซ๐Ÿ‘ฅ
  • --cap โ€” sets process capability ๐Ÿ”โœจ
  • --unshare โ€” unshare()s part of the processes and puts them in a new namespace ๐Ÿงฌ๐ŸŒŒ
  • --unshare2 โ€” unshare()s part of the processes into a new namespace after rootfs change ๐Ÿงฌ๐Ÿ”„
  • --setns-socket โ€” exposes a unix socket returning namespace fds from /proc/self/ns ๐Ÿ”Œ๐Ÿ“‚
  • --setns-socket-skip โ€” skips the entry you specify when sending setns file descriptors ๐Ÿšซ๐Ÿ“ค
  • --setns-skip โ€” same, skips that entry when sending setns file descriptors ๐Ÿซถ๐Ÿšซ
  • --setns โ€” joins a namespace created by an external uWSGI instance ๐ŸŒ๐Ÿ”—
  • --setns-preopen โ€” opens /proc/self/ns as soon as possible and caches fds โšก๐Ÿ“‚
  • --jailed โ€” marks this instance as jailed, which forces the post_jail hooks to actually fire. like, "yes bestie, we ARE in the box, run the things" ๐Ÿ’…
  • --refork โ€” fork()s again after privileges drop. super useful for jailing systems.
  • --re-fork โ€” same exact thing as --refork: fork() again after privileges drop. useful for jailing systems. two names, one vibe ๐Ÿซถ
  • --refork-as-root โ€” fork()s again before privileges drop. again: jailing systems, you know the drill.
  • --re-fork-as-root โ€” the twin of --refork-as-root. fork() again before privileges drop, useful for jailing systems. identical, no cap.
  • --refork-post-jail โ€” fork()s again after jailing. useful for jailing systems โœจ
  • --re-fork-post-jail โ€” same as --refork-post-jail: fork() again after jailing. useful for jailing systems.

okay now the HOOKS. this is the part where uWSGI lets you inject your little scripts at exactly the right moment. it's giving main character energy for your setup scripts ๐Ÿ”ฅ

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

and now the exec family โ€” same timing slots, but it's running a whole command instead of a hook:

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

mount time ๐ŸŒธ same timing slots, now for mounting filesystems:

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

and the reverse, because what goes up must come down ๐Ÿ’…

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

waiting era ๐Ÿฆ‹ these ones make uWSGI sit patiently like a good bestie until the thing you need actually shows up:

  • --wait-for-interface โ€” waits for the specified network interface to come up before running root hooks.
  • --wait-for-interface-timeout โ€” sets the timeout for wait-for-interface.
  • --wait-interface โ€” waits for the specified network interface to come up before running root hooks. (alias, same vibe โœจ)
  • --wait-interface-timeout โ€” sets the timeout for wait-for-interface.
  • --wait-for-iface โ€” waits for the specified network interface to come up before running root hooks. (another alias, iconic)
  • --wait-for-iface-timeout โ€” sets the timeout for wait-for-interface.
  • --wait-iface โ€” waits for the specified network interface to come up before running root hooks. (fourth one, yes really ๐Ÿ™ˆ)
  • --wait-iface-timeout โ€” sets the timeout for wait-for-interface.
  • --wait-for-fs โ€” waits for the specified filesystem item to appear before running root hooks.
  • --wait-for-file โ€” waits for the specified file to appear before running root hooks.
  • --wait-for-dir โ€” waits for the specified directory to appear before running root hooks.
  • --wait-for-mountpoint โ€” waits for the specified mountpoint to appear before running root hooks.
  • --wait-for-fs-timeout โ€” sets the timeout for wait-for-fs/file/dir.
  • --wait-for-socket โ€” waits for the specified socket to be ready before loading apps.
  • --wait-for-socket-timeout โ€” sets the timeout for wait-for-socket.

call family ๐ŸŽ€ same slots as exec/hook, except it's calling a function:

  • --call-asap โ€” calls the specified function as soon as possible.
  • --call-pre-jail โ€” calls the specified function before jailing.
  • --call-post-jail โ€” calls the specified function after jailing.
  • --call-in-jail โ€” calls the specified function in jail after initialization.
  • --call-as-root โ€” calls the specified function before privileges drop.
  • --call-as-user โ€” calls the specified function after privileges drop.
  • --call-as-user-atexit โ€” calls the specified function before app exit and reload.
  • --call-pre-app โ€” calls the specified function before app loading.
  • --call-post-app โ€” calls the specified function after app loading.
  • --call-as-vassal โ€” calls the specified function() before exec()ing the vassal.
  • --call-as-vassal1 โ€” calls the specified function(char *) before exec()ing the vassal.
  • --call-as-vassal3 โ€” calls the specified function(char *, uid_t, gid_t) before exec()ing the vassal.
  • --call-as-emperor โ€” calls the specified function() in the emperor after the vassal has been started.
  • --call-as-emperor1 โ€” calls the specified function(char *) in the emperor after the vassal has been started.
  • --call-as-emperor2 โ€” calls the specified function(char *, pid_t) in the emperor after the vassal has been started.
  • --call-as-emperor4 โ€” calls the specified function(char *, pid_t, uid_t, gid_t) in the emperor after the vassal has been started.

  • --ini โ€” load config from an ini file.
  • -y|--yaml โ€” load config from a yaml file.
  • -y|--yml โ€” load config from a yaml file. (same flag, same file, different spelling bestie)
  • -j|--json โ€” load config from a json file.
  • -j|--js โ€” load config from a json file. (also the same, don't panic)
  • --weight โ€” weight of the instance, used by clustering/lb/subscriptions.
  • --auto-weight โ€” sets the weight of the instance automatically, used by clustering/lb/subscriptions.
  • --no-server โ€” forces no-server mode.
  • --command-mode โ€” forces command mode.
  • --no-defer-accept โ€” disables deferred-accept on sockets.
  • --tcp-nodelay โ€” enables TCP NODELAY on each request.
  • --so-keepalive โ€” enables TCP KEEPALIVEs.
  • --so-send-timeout โ€” sets SO_SNDTIMEO.
  • --socket-send-timeout โ€” sets SO_SNDTIMEO.
  • --so-write-timeout โ€” sets SO_SNDTIMEO.
  • --socket-write-timeout โ€” sets SO_SNDTIMEO.
  • --socket-sndbuf โ€” sets SO_SNDBUF.
  • --socket-rcvbuf โ€” sets SO_RCVBUF.
  • --shutdown-sockets โ€” forces calling shutdown() in addition to close() when sockets are destroyed.
  • --limit-as โ€” limits processes address space/vsz.
  • --limit-nproc โ€” limits the number of spawnable processes.
  • --reload-on-as โ€” reloads if address space is higher than the specified megabytes.
  • --reload-on-rss โ€” reloads if rss memory is higher than the specified megabytes.
  • --evil-reload-on-as โ€” forces the master to reload a worker if its address space is higher than the specified megabytes ๐Ÿ˜ˆ
  • --evil-reload-on-rss โ€” forces the master to reload a worker if its rss memory is higher than the specified megabytes.
  • --mem-collector-freq โ€” sets the memory collector frequency when evil reloads are in place.
  • --reload-on-fd โ€” reloads if the specified file descriptor is ready.
  • --brutal-reload-on-fd โ€” brutal reload if the specified file descriptor is ready ๐Ÿ’€
  • --ksm โ€” enables Linux KSM.
  • --pcre-jit โ€” enables pcre jit, if available.
  • --never-swap โ€” locks all memory pages, avoiding swapping.
  • --touch-reload โ€” reloads uWSGI if the specified file is modified/touched.
  • --touch-workers-reload โ€” triggers a reload of (only) workers if the specified file is modified/touched.
  • --touch-mules-reload โ€” reloads mules if the specified file is modified/touched.
  • --touch-spoolers-reload โ€” reloads spoolers if the specified file is modified/touched.
  • --touch-chain-reload โ€” triggers a chain reload if the specified file is modified/touched.
  • --touch-logrotate โ€” triggers logrotation if the specified file is modified/touched.
  • --touch-logreopen โ€” triggers log reopen if the specified file is modified/touched.
  • --touch-exec โ€” runs a command when the specified file is modified/touched. syntax: file command

okay bestie we're still deep in the option list, hydrate ๐Ÿ’ง and keep scrolling, because the filesystem-watcher girlies are up first โœจ

  • --touch-signal โ€” clock a file getting modified or touched and fire off a signal when it happens. Syntax: file signal
  • --fs-reload โ€” the specified filesystem object gets modified โ†’ graceful reload, no drama, no dropped vibes
  • --fs-brutal-reload โ€” same energy, but the reload is brutal ๐Ÿ˜ค
  • --fs-signal โ€” the filesystem object changes and uwsgi raises a signal, like a little poke. Syntax: file signal
  • --check-mountpoint โ€” if a filesystem stops being reachable, the instance just dies. Rude but reliable, and honestly iconic for solid Fuse management
  • --mountpoint-check โ€” literally the same thing as --check-mountpoint ๐Ÿ’…
  • --check-mount โ€” yep, also the same. destroy the instance when a filesystem goes unreachable
  • --mount-check โ€” the fourth alias, same behaviour, same Fuse reliability agenda ๐Ÿซถ
  • --propagate-touch โ€” the original literally calls this an "over-engineering option for system with flaky signal management" and we respect the honesty
  • --limit-post โ€” cap the request body. set that ceiling, protect the vibe
  • --no-orphans โ€” when the master dies, the workers get taken out too, automatically. heads up though โ€” this can be dangerous for availability ๐Ÿ˜ญ
  • --prio โ€” set the priority of processes/threads
  • --cpu-affinity โ€” set cpu affinity, let your processes pick their favourite core ๐ŸŽ€
  • --post-buffering โ€” the size in bytes at which stuff gets buffered to disk instead of memory
  • --post-buffering-bufsize โ€” sets the buffer size for read() when you're in post buffering mode
  • --body-read-warning โ€” how much memory (in megabytes) a request body is allowed to allocate before uwsgi starts printing a warning at you ๐Ÿ“ข
  • --upload-progress โ€” turns on creation of .json files in the directory you name, so you can watch a file upload happening in real time ๐ŸŒธ
  • --no-default-app โ€” no falling back to the default app. we're not doing that today
  • --manage-script-name โ€” automatically rewrites SCRIPT_NAME and PATH_INFO for you
  • --ignore-script-name โ€” just straight up ignores SCRIPT_NAME
  • --catch-exceptions โ€” reports the exception as http output. discouraged โ€” use only for testing, it's giving debug-mode energy, not production ๐Ÿ’€
  • --reload-on-exception โ€” a worker raises an exception โ†’ that worker gets reloaded
  • --reload-on-exception-type โ€” reload the worker when one specific exception type gets raised
  • --reload-on-exception-value โ€” reload the worker when a specific exception value shows up
  • --reload-on-exception-repr โ€” reload when a specific exception type+value combo is raised (language-specific, iykyk)
  • --exception-handler โ€” add an exception handler
  • --enable-metrics โ€” turn on the whole metrics subsystem ๐Ÿ“Š
  • --metric โ€” add a custom metric of your very own, main character metric
  • --metric-threshold โ€” add a metric threshold/alarm
  • --metric-alarm โ€” add a metric threshold/alarm (same thing, different spelling of the same dream)
  • --alarm-metric โ€” add a metric threshold/alarm, third alias edition ๐Ÿ’…
  • --metrics-dir โ€” export metrics as text files into the directory you specify
  • --metrics-dir-restore โ€” restores the last value taken from the metrics dir
  • --metric-dir โ€” export metrics as text files to the specified directory (the singular-flavoured alias)
  • --metric-dir-restore โ€” restore last value taken from the metrics dir
  • --metrics-no-cores โ€” stop generating the cores-related metrics
  • --udp โ€” run the udp server on the address you give it
  • --stats โ€” enable the stats server on the specified address ๐Ÿ“ˆ
  • --stats-server โ€” enable the stats server on the specified address (same vibe, second name)
  • --stats-http โ€” prefixes the stats server json output with http headers
  • --stats-minified โ€” minify the statistics json output, compact queen
  • --stats-min โ€” minify the statistics json output, yes again โœจ
  • --stats-push โ€” push the stats json to whatever destination you name
  • --stats-pusher-default-freq โ€” set the default frequency of stats pushers
  • --stats-pushers-default-freq โ€” set the default frequency of stats pushers (plural version, same deal)
  • --stats-no-cores โ€” disable generation of cores-related stats
  • --stats-no-metrics โ€” keeps metrics out of the stats output entirely
  • --multicast โ€” subscribe to the multicast group you specify
  • --multicast-ttl โ€” set multicast ttl
  • --multicast-loop โ€” set multicast loop, and the default is 1
  • --master-fifo โ€” enable the master fifo ๐ŸŽ€
  • --notify-socket โ€” enable the notification socket
  • --subscription-notify-socket โ€” set the notification socket for subscriptions

legion time ๐Ÿซก this is the swarm/cluster arc and it goes hard

  • --legion โ€” you become a member of a legion
  • --legion-mcast โ€” also become a member of a legion, this is the 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 the legion subsystem
  • --legion-death-on-lord-error โ€” if one of the lord hooks fails, declare itself a dead node for however many seconds you specify
  • --legion-skew-tolerance โ€” clock skew tolerance for the legion subsystem, default 60 seconds โฐ
  • --legion-lord โ€” the action to call on Lord election ๐Ÿ‘‘
  • --legion-unlord โ€” the action to call on Lord dismiss
  • --legion-setup โ€” action to call on legion setup
  • --legion-death โ€” action to call on legion death, aka the shutdown of the instance ๐Ÿ’€
  • --legion-join โ€” action to call on legion join, i.e. the first time quorum is reached
  • --legion-node-joined โ€” action to call when a new node joins the legion
  • --legion-node-left โ€” action to call when a node leaves the legion
  • --legion-quorum โ€” set the quorum of a legion
  • --legion-scroll โ€” set the scroll of a legion
  • --legion-scroll-max-size โ€” max size of the legion scroll buffer
  • --legion-scroll-list-max-size โ€” max size of the legion scroll list buffer
  • --subscriptions-sign-check โ€” set the digest algorithm and certificate directory for the secured subscription system ๐Ÿ”
  • --subscriptions-sign-check-tolerance โ€” max tolerance (in seconds) of clock skew for the secured subscription system
  • --subscriptions-sign-skip-uid โ€” skip the signature check for the uid you name, when unix sockets credentials are in play
  • --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 the load balancing algorithm for the subscription system
  • --subscription-dotsplit โ€” tries to fall back to the next part (dot based) in the subscription key
  • --subscribe-to โ€” subscribe to the subscription server you specify
  • --st โ€” subscribe to the specified subscription server (tiny name, big job)
  • --subscribe โ€” subscribe to the specified subscription server
  • --subscribe2 โ€” subscribe to the specified subscription server, but using the advanced keyval syntax
  • --subscribe-freq โ€” send the subscription announce at the interval you set
  • --subscription-tolerance โ€” set tolerance for subscription servers
  • --unsubscribe-on-graceful-reload โ€” forces the unsubscribe request through even during a graceful reload
  • --start-unsubscribed โ€” configure the subscriptions but don't actually send them. genuinely useful with master fifo
  • --subscribe-with-modifier1 โ€” force the specified modifier1 when subscribing

snmp + ssl arc, aka the "lock it down" chapter ๐Ÿ”’

  • --snmp โ€” enable the embedded snmp server
  • --snmp-community โ€” set the snmp community string
  • --ssl-verbose โ€” be loud and verbose about SSL errors ๐Ÿ“ข
  • --ssl-verify-depth โ€” set the maximum certificate verification depth
  • --sni โ€” add an SNI-governed SSL context
  • --sni-dir โ€” checks for cert/key/client_ca files in the directory you name and creates a sni/ssl context on demand, whenever it's needed โœจ
  • --sni-dir-ciphers โ€” set ssl ciphers for the sni-dir option
  • --ssl-enable3 โ€” enable SSLv3. insecure, bestie, we're saying it out loud ๐Ÿ˜ญ
  • --ssl-enable-sslv3 โ€” enable SSLv3, also insecure
  • --ssl-enable-tlsv1 โ€” enable TLSv1, also insecure
  • --ssl-option โ€” set a raw ssl option, and it takes a numeric value
  • --sni-regexp โ€” add an SNI-governed SSL context, but here the key is a regexp ๐Ÿงš
  • --ssl-tmp-dir โ€” store ssl-related temp files in the directory you specify
  • --check-interval โ€” the interval, in seconds, between master checks
  • --forkbomb-delay โ€” when a forkbomb is detected, sleep for the number of seconds you specify ๐Ÿ˜ด
  • --binary-path โ€” force the binary path
  • --privileged-binary-patch โ€” patch the uwsgi binary with a new command, done before the privileges drop
  • --unprivileged-binary-patch โ€” patch the uwsgi binary with a new command, done after the 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 however many cores you specify
  • --max-fd โ€” set the maximum number of file descriptors. requires root privileges ๐Ÿ‘‘
  • --logto โ€” set the logfile/udp address
  • --logto2 โ€” log to the file or udp address you name, but after the privileges drop
  • --log-format โ€” set an advanced format for request logging
  • --logformat โ€” set an advanced format for request logging (short version, same glow)
  • --logformat-strftime โ€” apply strftime to the logformat output
  • --log-format-strftime โ€” apply strftime to the logformat output
  • --logfile-chown โ€” chown the logfiles
  • --logfile-chmod โ€” chmod the logfiles
  • --log-syslog โ€” log to syslog
  • --log-socket โ€” send logs to the socket you specify
  • --req-logger โ€” set/append a request logger
  • --logger-req โ€” set/append a request logger (flipped name, same energy)
  • --logger โ€” set/append a logger
  • --logger-list โ€” list the enabled loggers
  • --loggers-list โ€” list the enabled loggers, plural girlies rise ๐Ÿซถ
  • --threaded-logger โ€” offload the log writing to a thread, so it doesn't block your whole life
  • --log-encoder โ€” add an item into the log encoder chain
  • --log-req-encoder โ€” add an item into the log req encoder chain
  • --log-drain โ€” drain (aka do not show) log lines matching the regexp you give it
  • --log-filter โ€” show only the log lines matching the specified regexp
  • --log-route โ€” if the regexp applied on the logline matches, log to the named logger you specified
  • --log-req-route โ€” if the regexp applied on the logline matches, log the requests to the named logger you specified
  • --use-abort โ€” calls abort() on segfault/fpe, which could genuinely be useful for generating a core dump ๐Ÿ’€
  • --alarm โ€” create a new alarm. Syntax: <alarm> <plugin:args> โฐ

and that's part 4, no cap โ€” more incoming, don't go anywhere ๐Ÿ’–

  • --alarm-cheap โ€” okay so instead of birthing a whole dedicated thread for each curl-based alarm, just run them on the main alarm thread. cheap in the best way. ๐Ÿ’ธ
  • --alarm-freq โ€” tune the anti-loop alarm system. the default is 3 seconds, and yes you can change it. ๐Ÿ”
  • --alarm-fd โ€” raise the specified alarm when an fd is read for read. by default it reads 1 byte โ€” set it to 8 if you're doing eventfd. ๐ŸŽ€
  • --alarm-segfault โ€” raise the specified alarm the moment the segmentation fault handler runs. ๐Ÿ˜ญ
  • --segfault-alarm โ€” same thing as --alarm-segfault, fr: raise the specified alarm when the segmentation fault handler is executed.
  • --alarm-backlog โ€” raise the specified alarm when the socket backlog queue is full. ๐Ÿ’€
  • --backlog-alarm โ€” identical energy to --alarm-backlog: raise the specified alarm when the socket backlog queue is full.
  • --lq-alarm โ€” raise the specified alarm when the socket backlog queue is full. (yes, this is the same alarm again, the backlog queue is that girl.) ๐Ÿฆ‹
  • --alarm-lq โ€” raise the specified alarm when the socket backlog queue is full. same as --lq-alarm, just spelled the other way around.
  • --alarm-listen-queue โ€” raise the specified alarm when the socket backlog queue is full. ๐ŸŽง
  • --listen-queue-alarm โ€” raise the specified alarm when the socket backlog queue is full. no cap, same behaviour, different name order.
  • --log-alarm โ€” raise the specified alarm whenever a log line matches the regexp you give it. syntax is exactly: <alarm>[,alarm...] <regexp> โœจ
  • --alarm-log โ€” raise the specified alarm when a log line matches the specified regexp. syntax: <alarm>[,alarm...] <regexp>. same as --log-alarm, different outfit. ๐Ÿ’…
  • --not-log-alarm โ€” skip the specified alarm when a log line matches the specified regexp. syntax: <alarm>[,alarm...] <regexp>. ๐Ÿšซ
  • --not-alarm-log โ€” skip the specified alarm when a log line matches the specified regexp. syntax: <alarm>[,alarm...] <regexp>. same as --not-log-alarm.
  • --alarm-list โ€” list enabled alarms. go off, show me the roster. ๐Ÿ“‹
  • --alarms-list โ€” list enabled alarms. (plural edition, same tea.) ๐Ÿต
  • --alarm-msg-size โ€” set the max size of an alarm message. default is 8192. ๐Ÿ“
  • --log-master โ€” delegate logging to the master process. hand it over, queen. ๐Ÿ‘‘
  • --log-master-bufsize โ€” set the buffer size for the master logger. heads up bestie: bigger log messages will be truncated. โœ‚๏ธ
  • --log-master-stream โ€” create the master logpipe as SOCK_STREAM. ๐ŸŒŠ
  • --log-master-req-stream โ€” create the master requests logpipe as SOCK_STREAM. ๐ŸŒŠ
  • --log-reopen โ€” reopen the log after a reload. ๐Ÿ”„
  • --log-truncate โ€” truncate the log on startup. fresh page, clean slate. ๐Ÿงผ
  • --log-maxsize โ€” set the maximum logfile size. ๐Ÿ“ฆ
  • --log-backupname โ€” set the logfile name used after rotation. ๐ŸŒ€
  • --logdate โ€” prefix logs with a date, or with a strftime string. ๐Ÿ—“๏ธ
  • --log-date โ€” prefix logs with a date or a strftime string. same as --logdate.
  • --log-prefix โ€” prefix logs with a string of your choosing. ๐ŸŽ€
  • --log-zero โ€” log responses that have no body. zero body, still logged. ๐Ÿ‘ป
  • --log-slow โ€” log requests slower than the number of milliseconds you specify. ๐ŸŒ
  • --log-4xx โ€” log requests with a 4xx response. ๐Ÿ™ˆ
  • --log-5xx โ€” log requests with a 5xx response. ๐Ÿ”ฅ
  • --log-big โ€” log requests bigger than the size you specify. ๐Ÿ˜
  • --log-sendfile โ€” log sendfile requests. ๐Ÿ“ค
  • --log-ioerror โ€” log requests that hit io errors. ๐Ÿ˜ต
  • --log-micros โ€” report response time in microseconds instead of milliseconds. precision era. โฑ๏ธ
  • --log-x-forwarded-for โ€” use the ip from the X-Forwarded-For header instead of REMOTE_ADDR. ๐Ÿ•ต๏ธ
  • --master-as-root โ€” leave the master process running as root. periodt. ๐Ÿซ…
  • --drop-after-init โ€” run privileges drop after plugin initialization. heads up: this one is superseded by drop-after-apps. โš ๏ธ
  • --drop-after-apps โ€” run privileges drop after apps loading. heads up again: this one is superseded by master-as-root. โš ๏ธ
  • --force-cwd โ€” force the initial working directory to the value you specify. ๐Ÿ“Œ
  • --binsh โ€” override /bin/sh. this is what the exec hooks use, and it always falls back to /bin/sh. ๐Ÿš
  • --chdir โ€” chdir to the specified directory before apps loading. ๐Ÿ“
  • --chdir2 โ€” chdir to the specified directory after apps loading. ๐Ÿ“‚
  • --lazy โ€” set lazy mode: load apps in the workers instead of the master. ๐Ÿฆฅ
  • --lazy-apps โ€” load apps in each worker instead of the master. ๐Ÿฃ
  • --cheap โ€” set cheap mode: spawn workers only after the first request. ๐Ÿ’ธ
  • --cheaper โ€” set cheaper mode, aka adaptive process spawning. ๐Ÿ“ˆ
  • --cheaper-initial โ€” set the initial number of processes to spawn in cheaper mode. ๐ŸŒฑ
  • --cheaper-algo โ€” choose the algorithm used for adaptive process spawning. ๐Ÿง 
  • --cheaper-step โ€” the number of additional processes to spawn at each overload. โž•
  • --cheaper-overload โ€” increase workers after the specified overload. ๐Ÿš€
  • --cheaper-algo-list โ€” list enabled cheapers algorithms. ๐Ÿ“œ
  • --cheaper-algos-list โ€” list enabled cheapers algorithms. (plural algo edition.) ๐Ÿ“œ
  • --cheaper-list โ€” list enabled cheapers algorithms. same roster, shorter name. ๐Ÿ“œ
  • --cheaper-rss-limit-soft โ€” don't spawn new workers if the total resident memory usage of all workers is higher than this limit. ๐Ÿงฏ
  • --cheaper-rss-limit-hard โ€” if total workers resident memory usage is higher, try to stop workers. yikes, dramatic but correct. ๐Ÿ’€
  • --idle โ€” set idle mode: put uWSGI into cheap mode after inactivity. ๐Ÿ˜ด
  • --die-on-idle โ€” shutdown uWSGI when idle. rip bestie. โšฐ๏ธ
  • --mount โ€” load application under a mountpoint. โ›ฐ๏ธ
  • --worker-mount โ€” load application under a mountpoint in the specified worker, or after workers spawn. ๐Ÿง‘โ€๐Ÿญ
  • --threads โ€” run each worker in prethreaded mode with the specified number of threads. ๐Ÿงต
  • --thread-stacksize โ€” set threads stacksize. ๐Ÿ“š
  • --threads-stacksize โ€” set threads stacksize. same as --thread-stacksize. ๐Ÿ“š
  • --thread-stack-size โ€” set threads stacksize. same thing, extra dash, still iconic. ๐Ÿ“š
  • --threads-stack-size โ€” set threads stacksize. yes, all four spellings exist. ๐Ÿ’…
  • --vhost โ€” enable virtualhosting mode, based on the SERVER_NAME variable. ๐Ÿ 
  • --vhost-host โ€” enable virtualhosting mode, based on the HTTP_HOST variable. ๐Ÿก

  • --route โ€” add a route. ๐Ÿ›ฃ๏ธ
  • --route-host โ€” add a route based on the Host header. ๐Ÿท๏ธ
  • --route-uri โ€” add a route based on REQUEST_URI. ๐Ÿ”—
  • --route-qs โ€” add a route based on QUERY_STRING. โ“
  • --route-remote-addr โ€” add a route based on REMOTE_ADDR. ๐ŸŒ
  • --route-user-agent โ€” add a route based on HTTP_USER_AGENT. ๐Ÿ•ถ๏ธ
  • --route-remote-user โ€” add a route based on REMOTE_USER. ๐Ÿ™‹
  • --route-referer โ€” add a route based on HTTP_REFERER. โ†ฉ๏ธ
  • --route-label โ€” add a routing label, for use with goto. ๐Ÿ
  • --route-if โ€” add a route based on a condition. ๐Ÿค”
  • --route-if-not โ€” add a route based on a condition, negate version. ๐Ÿ™ƒ
  • --route-run โ€” always run the specified route action. โ–ถ๏ธ
  • --final-route โ€” add a final route. ๐Ÿ
  • --final-route-status โ€” add a final route for the specified status. ๐Ÿ”ข
  • --final-route-host โ€” add a final route based on the Host header. ๐Ÿท๏ธ
  • --final-route-uri โ€” add a final route based on REQUEST_URI. ๐Ÿ”—
  • --final-route-qs โ€” add a final route based on QUERY_STRING. โ“
  • --final-route-remote-addr โ€” add a final route based on REMOTE_ADDR. ๐ŸŒ
  • --final-route-user-agent โ€” add a final route based on HTTP_USER_AGENT. ๐Ÿ•ถ๏ธ
  • --final-route-remote-user โ€” add a final route based on REMOTE_USER. ๐Ÿ™‹
  • --final-route-referer โ€” add a final route based on HTTP_REFERER. โ†ฉ๏ธ
  • --final-route-label โ€” add a final routing label, for use with goto. ๐Ÿ
  • --final-route-if โ€” add a final route based on a condition. ๐Ÿค”
  • --final-route-if-not โ€” add a final route based on a condition, negate version. ๐Ÿ™ƒ
  • --final-route-run โ€” always run the specified final route action. โ–ถ๏ธ
  • --error-route โ€” add an error route. ๐Ÿšจ
  • --error-route-status โ€” add an error route for the specified status. ๐Ÿ”ข
  • --error-route-host โ€” add an error route based on the Host header. ๐Ÿท๏ธ
  • --error-route-uri โ€” add an error route based on REQUEST_URI. ๐Ÿ”—
  • --error-route-qs โ€” add an error route based on QUERY_STRING. โ“
  • --error-route-remote-addr โ€” add an error route based on REMOTE_ADDR. ๐ŸŒ
  • --error-route-user-agent โ€” add an error route based on HTTP_USER_AGENT. ๐Ÿ•ถ๏ธ
  • --error-route-remote-user โ€” add an error route based on REMOTE_USER. ๐Ÿ™‹
  • --error-route-referer โ€” add an error route based on HTTP_REFERER. โ†ฉ๏ธ
  • --error-route-label โ€” add an error routing label, for use with goto. ๐Ÿ
  • --error-route-if โ€” add an error route based on a condition. ๐Ÿค”
  • --error-route-if-not โ€” add an error route based on a condition, negate version. ๐Ÿ™ƒ
  • --error-route-run โ€” always run the specified error route action. โ–ถ๏ธ
  • --response-route โ€” add a response route. ๐Ÿ“จ
  • --response-route-status โ€” add a response route for the specified status. ๐Ÿ”ข
  • --response-route-host โ€” add a response route based on the Host header. ๐Ÿท๏ธ
  • --response-route-uri โ€” add a response route based on REQUEST_URI. ๐Ÿ”—
  • --response-route-qs โ€” add a response route based on QUERY_STRING. โ“
  • --response-route-remote-addr โ€” add a response route based on REMOTE_ADDR. ๐ŸŒ
  • --response-route-user-agent โ€” add a response route based on HTTP_USER_AGENT. ๐Ÿ•ถ๏ธ
  • --response-route-remote-user โ€” add a response route based on REMOTE_USER. ๐Ÿ™‹
  • --response-route-referer โ€” add a response route based on HTTP_REFERER. โ†ฉ๏ธ
  • --response-route-label โ€” add a response routing label, for use with goto. ๐Ÿ
  • --response-route-if โ€” add a response route based on a condition. ๐Ÿค”
  • --response-route-if-not โ€” add a response route based on a condition, negate version. ๐Ÿ™ƒ
  • --response-route-run โ€” always run the specified response route action. โ–ถ๏ธ
  • --router-list โ€” list enabled routers. ๐Ÿ“ก
  • --routers-list โ€” list enabled routers. same list, plural spelling. ๐Ÿ“ก
  • --error-page-403 โ€” add an error page (html) for the managed 403 response. ๐Ÿšซ
  • --error-page-404 โ€” add an error page (html) for the managed 404 response. ๐Ÿซฅ
  • --error-page-500 โ€” add an error page (html) for the managed 500 response. ๐Ÿ’ฅ
  • --websockets-ping-freq โ€” set the frequency (in seconds) of websockets automatic ping packets. ๐Ÿ“
  • --websocket-ping-freq โ€” set the frequency (in seconds) of websockets automatic ping packets. same vibe, singular websocket. ๐Ÿ“
  • --websockets-pong-tolerance โ€” set the tolerance (in seconds) of the websockets ping/pong subsystem. ๐ŸŽพ
  • --websocket-pong-tolerance โ€” set the tolerance (in seconds) of the websockets ping/pong subsystem. same, singular edition. ๐ŸŽพ
  • --websockets-max-size โ€” set the max allowed size of websocket messages, in Kbytes. default is 1024. ๐Ÿ“ฆ
  • --websocket-max-size โ€” set the max allowed size of websocket messages, in Kbytes. default 1024. same thing, one fewer s. ๐Ÿ“ฆ
  • --chunked-input-limit โ€” set the max size of a chunked input part. default is 1MB, and it's in bytes. ๐Ÿงฉ
  • --chunked-input-timeout โ€” set the default timeout for chunked input. โณ
  • --clock โ€” set a clock source. ๐Ÿ•ฐ๏ธ
  • --clock-list โ€” list enabled clocks. ๐Ÿ•ฐ๏ธโœจ

okay bestie, we're in the final stretch of the options list and honestly? it's giving "static files, daemons and cursed kernel flags" and I'm obsessed ๐Ÿ’– stay with me, every single flag is still here, no cap.

  • --clocks-list โ€” lists all the clocks that are enabled โฐ
  • --add-header โ€” automatically adds HTTP headers to the response
  • --rem-header โ€” automatically removes the HTTP header you specify from the response
  • --del-header โ€” automatically removes the HTTP header you specify from the response (yes bestie, it's the same job as --rem-header, they're twins ๐Ÿซถ)
  • --collect-header โ€” stores the response header you specify in a request var (syntax: header var)
  • --response-header-collect โ€” stores the response header you specify in a request var (syntax: header var) โ€” same vibe, different name
  • --pull-header โ€” stores the response header you specify in a request var and removes it from the response (syntax: header var)

๐ŸŒธ static files era ๐ŸŒธ

  • --check-static โ€” checks for static files in the directory you specify
  • --check-static-docroot โ€” checks for static files in the requested DOCUMENT_ROOT
  • --static-check โ€” checks for static files in the directory you specify
  • --static-map โ€” maps a mountpoint to a static directory (or file)
  • --static-map2 โ€” like --static-map but it completely appends the requested resource to the docroot
  • --static-skip-ext โ€” skips the extension you specify from staticfile checks
  • --static-index โ€” searches for the file you specify if a directory is requested
  • --static-safe โ€” skips security checks if the file is under the path you specify
  • --static-cache-paths โ€” puts resolved paths in the uWSGI cache for the amount of seconds you specify
  • --static-cache-paths-name โ€” uses the cache you specify 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 filename regexp
  • --static-expires-mtime โ€” sets the Expires header based on filename regexp and file mtime
  • --static-expires-uri โ€” sets the Expires header based on REQUEST_URI regexp
  • --static-expires-uri-mtime โ€” sets the Expires header based on REQUEST_URI regexp and file mtime
  • --static-expires-path-info โ€” sets the Expires header based on PATH_INFO regexp
  • --static-expires-path-info-mtime โ€” sets the Expires header based on PATH_INFO regexp and file mtime

๐ŸŽ€ the gzip girlies ๐ŸŽ€

  • --static-gzip โ€” if the regexp you supply matches the static file translation, it will search for a gzip version
  • --static-gzip-all โ€” checks for a gzip version of all requested static files
  • --static-gzip-dir โ€” checks for a gzip version of all requested static files in the dir/prefix you specify
  • --static-gzip-prefix โ€” checks for a gzip version of all requested static files in the dir/prefix you specify
  • --static-gzip-ext โ€” checks for a gzip version of all requested static files with the ext/suffix you specify
  • --static-gzip-suffix โ€” checks for a gzip version of all requested static files with the ext/suffix you specify

  • --honour-range โ€” enables support for the HTTP Range header
  • --offload-threads โ€” sets the number of offload threads to spawn (per-worker, default 0)
  • --offload-thread โ€” sets the number of 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 relies on boring read()/write() (ngl the "boring" is the manpage's own words, I'm just the messenger ๐Ÿ’€)
  • --check-cache โ€” checks for response data in the cache you specify (empty means the default cache)
  • --close-on-exec โ€” sets close-on-exec on connection sockets (could be required for spawning processes in requests)
  • --close-on-exec2 โ€” sets close-on-exec on server sockets (could be required for spawning processes in requests)

โœจ env, modes and tidying up โœจ

  • --mode โ€” set uWSGI custom mode
  • --env โ€” set environment variable
  • --envdir โ€” loads a daemontools compatible envdir
  • --early-envdir โ€” loads a daemontools compatible envdir ASAP
  • --unenv โ€” unsets environment variable
  • --vacuum โ€” tries to remove all of the generated file/sockets ๐Ÿงน
  • --file-write โ€” writes the content you specify to the file you specify (syntax: file=value) before privileges drop
  • --cgroup โ€” puts the processes in the cgroup you specify
  • --cgroup-opt โ€” sets a value in the cgroup option you specify
  • --cgroup-dir-mode โ€” sets permission for the cgroup directory (default is 700)
  • --namespace โ€” runs in a new namespace under the rootfs you specify
  • --namespace-keep-mount โ€” keeps the mountpoint you specify in your namespace
  • --ns โ€” runs in a new namespace under the rootfs you specify
  • --namespace-net โ€” adds a network namespace
  • --ns-net โ€” adds a network namespace

๐Ÿ”ฅ socket behaviour, enter the zerg ๐Ÿ”ฅ

  • --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 qlen value you specify
  • --tcp-fastopen โ€” enables the TCP_FASTOPEN flag on TCP sockets with the qlen value you specify
  • --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 UNIX socket you specify

โฐ cron o'clock โฐ

  • --cron โ€” adds a cron task
  • --cron2 โ€” adds a cron task (key=val syntax)
  • --unique-cron โ€” adds a unique cron task
  • --cron-harakiri โ€” sets the maximum time (in seconds) we wait for a cron command to complete
  • --legion-cron โ€” adds a cron task runnable only when the instance is a lord of the legion you specify
  • --cron-legion โ€” adds a cron task runnable only when the instance is a lord of the legion you specify
  • --unique-legion-cron โ€” adds a unique cron task runnable only when the instance is a lord of the legion you specify
  • --unique-cron-legion โ€” adds a unique cron task runnable only when the instance is a lord of the legion you specify

  • --loop โ€” select the uWSGI loop engine
  • --loop-list โ€” lists enabled loop engines
  • --loops-list โ€” lists enabled loop engines
  • --worker-exec โ€” runs the command you specify as worker
  • --worker-exec2 โ€” runs the command you specify as worker (after the post_fork hook)

๐Ÿซถ daemon attachment hours ๐Ÿซถ

  • --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); 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 โ€” opposite energy, same flag family)
  • --legion-attach-daemon โ€” same as --attach-daemon but the daemon runs only on the legion lord node
  • --legion-smart-attach-daemon โ€” same as --smart-attach-daemon but the daemon runs only on the legion lord node
  • --legion-smart-attach-daemon2 โ€” same as --smart-attach-daemon2 but the daemon runs only on the legion lord node
  • --daemons-honour-stdin โ€” do not change the stdin of external daemons to /dev/null
  • --attach-daemon2 โ€” attach-daemon keyval variant (supports smart modes too)

๐Ÿงš plugins, bestie ๐Ÿงš

  • --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 โ€” lists enabled plugins
  • --plugin-list โ€” lists enabled plugins
  • --autoload โ€” tries to automatically load plugins when unknown options are found
  • --dlopen โ€” blindly loads a shared library (yes. blindly. ๐Ÿ™ˆ)
  • --allowed-modifiers โ€” comma separated list of allowed modifiers
  • --remap-modifier โ€” remap request modifier from one id to another

๐Ÿ’… the meta / dev-tools section ๐Ÿ’…

  • --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 โ€” set response header maximum size (default: 64k)

and that's the whole options list, bestie โ€” every last flag, no skips, no summaries, we ate ๐Ÿ“

and with that we're at the very end of the page, so here's the cute sign-off: this manual is for uwsgi_lua, version 2.0.31-2, dated February 2026, and it goes by UWSGI_LUA(1) when it's out in these streets ๐Ÿ‘‘ thanks for reading all the way to the bottom, you're a real one ๐Ÿ’œ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from