UWSGI_PYTHON3(1)

๐Ÿ“ฆ
version 2.0.31+6+0.0.3 ยท 4 versions
, in ubuntu stonking

๐ŸŒธ UWSGI_PYTHON3 ๐ŸŒธ

okay bestie, gather round ๐Ÿ’– this is the man page for uwsgi_python3 โ€” a.k.a. the "fast (pure C), self-healing, developer-friendly WSGI server". Yes that is its whole personality. Pure C. Self-healing. Developer-friendly. It's giving main character energy and I'm obsessed ๐Ÿซถ


โœจ SYNOPSIS โœจ

uwsgi-core [options...]

That's it. That's the whole vibe. You just throw options at it and it does stuff. Slay.


๐Ÿ’… DESCRIPTION ๐Ÿ’…

okay so this is the big section and it's literally just a giant list of every option you can pass. There are SO many. buckle up, we're going through all of them, no skipping, periodt. โœจ

๐Ÿฆ‹ sockets (the "where do I listen" era)

  • -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 & harakiri (the chaos management era)

  • -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
ngl "harakiri" is a whole mood ๐Ÿ’€ it's the thing that kills a worker that's taking too long. dramatic but necessary.

๐ŸŽ€ config loading & placeholders

  • -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)
ok "sytax" ๐Ÿ’€ that is literally how it's spelled in here, I'm not making this up, I'm just the messenger bestie

๐Ÿงš opt logic (yes, there's a whole mini language in here)

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

periodt. that's a full if/for language living inside your config file. iconic behavior honestly ๐Ÿ’œ

๐Ÿ’œ blacklist / whitelist

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

๐Ÿ”ฅ errors & signals (the "please stop yelling at me" 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()
bestie note: the word "annoying" is their word, not mine, they're literally in the source. relatable tho ๐Ÿ™ˆ

๐Ÿฉท config templates & includes

  • --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 / 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

๐Ÿ“ tuning & sizing

  • -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 modes & permissions

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

๐Ÿซถ threads & process names

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

โญ app loading & 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 (yes it's called that, and it's not beating the allegations)

  • --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
"cursed vassals" ๐Ÿ˜ญ that's a real option. I have no notes. absolute cinema.

ok that's part 1 bestie, and there is so much more coming โ€” don't go anywhere ๐Ÿ’–โœจ

okay so continuing the options, bestie โ€” there's a LOT, but we're slaying through it ๐Ÿ’…

  • --emperor-pidfile โ€” writes the Emperor pid into the file u specify ๐Ÿ“
  • --emperor-tyrant โ€” puts the Emperor in Tyrant mode ๐Ÿ‘‘
  • --emperor-tyrant-nofollow โ€” does not follow symlinks when checking for uid/gid in Tyrant mode ๐Ÿšซ๐Ÿ”—
  • --emperor-stats โ€” runs the Emperor stats server ๐Ÿ“Š
  • --emperor-stats-server โ€” runs the Emperor stats server โœจ
  • --early-emperor โ€” spawns the emperor as soon as possible ๐Ÿฃ
  • --emperor-broodlord โ€” runs the emperor in BroodLord mode ๐Ÿ
  • --emperor-throttle โ€” sets the throttling level (in milliseconds) for bad behaving vassals (default 1000) โณ
  • --emperor-max-throttle โ€” sets the max throttling level (in milliseconds) for bad behaving vassals (default 3 minutes) ๐Ÿ˜ค
  • --emperor-magic-exec โ€” prefixes vassals config files with exec:// if they have the executable bit โœจ
  • --emperor-on-demand-extension โ€” searches for a text file (vassal name + extension) containing the on demand socket name ๐Ÿ”
  • --emperor-on-demand-ext โ€” searches for a text file (vassal name + extension) containing 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 โ€” enables 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 on demand socket name (the vassal name is passed as the only argument) ๐Ÿƒโ™€๏ธ
  • --emperor-extra-extension โ€” allows the specified extension in the Emperor (vassal will be called with --config) ๐Ÿ“‚
  • --emperor-extra-ext โ€” allows the specified extension in the Emperor (vassal will be called with --config) ๐Ÿ’ซ
  • --emperor-no-blacklist โ€” disables Emperor blacklisting subsystem ๐Ÿšซ
  • --emperor-use-clone โ€” uses clone() instead of fork() passing the specified unshare() flags ๐Ÿงฌ
  • --emperor-graceful-shutdown โ€” uses vassals graceful shutdown during ragnarok ๐ŸŒ…
  • --emperor-cap โ€” sets vassals capability ๐ŸŽฉ
  • --vassals-cap โ€” sets vassals capability ๐Ÿงข
  • --vassal-cap โ€” sets vassals capability ๐Ÿ‘‘
  • --imperial-monitor-list โ€” lists enabled imperial monitors ๐Ÿ“‹
  • --imperial-monitors-list โ€” lists enabled imperial monitors ๐Ÿ—‚๏ธ
  • --vassals-inherit โ€” adds config templates to vassals config (uses --inherit) ๐Ÿ“Ž
  • --vassals-include โ€” includes config templates to vassals config (uses --include instead of --inherit) ๐Ÿ“ฅ
  • --vassals-inherit-before โ€” adds config templates to vassals config (uses --inherit, parses before the vassal file) ๐Ÿ“„
  • --vassals-include-before โ€” includes config templates to vassals config (uses --include instead of --inherit, parses before the vassal file) ๐Ÿ“‘
  • --vassals-start-hook โ€” runs the specified command before each vassal starts ๐ŸŽฌ
  • --vassals-stop-hook โ€” runs the specified command after vassal's death ๐Ÿชฆ
  • --vassal-sos โ€” asks emperor for reinforcement when overloaded ๐Ÿ†˜
  • --vassal-sos-backlog โ€” asks emperor for sos if backlog queue has more items than the value specified ๐Ÿ“ฌ
  • --vassals-set โ€” automatically sets the specified option (via --set) for every vassal ๐ŸŽฏ
  • --vassal-set โ€” automatically sets the specified option (via --set) for every vassal ๐Ÿ’…
  • --heartbeat โ€” announces healthiness to the emperor ๐Ÿ’“
  • --reload-mercy โ€” sets the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown ๐Ÿ•Š๏ธ
  • --worker-reload-mercy โ€” sets the maximum time (in seconds) a worker can take to reload/shutdown (default is 60) โฑ๏ธ
  • --mule-reload-mercy โ€” sets the maximum 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 brutal reload on SIGTERM ๐Ÿ’€
  • --force-gateway โ€” forces the spawn of the first registered gateway without a master ๐Ÿšช
  • -h, --help โ€” shows this help ๐Ÿซถ
  • -h, --usage โ€” shows this help ๐Ÿ“–
  • --print-sym โ€” prints content of the specified binary symbol ๐Ÿ”Ž
  • --print-symbol โ€” prints content of the specified binary symbol ๐Ÿ“‡
  • -r, --reaper โ€” calls waitpid(-1,...) after each request to get rid of 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 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 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() for avoiding duplicates ๐Ÿ—๏ธ
  • --persistent-ipcsem โ€” does not remove ipcsem's on shutdown ๐Ÿงฒ
  • -A, --sharedarea โ€” creates a raw shared memory area of specified pages (note: it supports keyval too) ๐Ÿ“ฆ
  • --safe-fd โ€” does not close the specified file descriptor ๐Ÿ›ก๏ธ
  • --fd-safe โ€” does not close the specified file descriptor ๐Ÿ”
  • --cache โ€” creates a shared cache containing given elements ๐Ÿ—ƒ๏ธ
  • --cache-blocksize โ€” sets cache blocksize ๐Ÿงฑ
  • --cache-store โ€” enables persistent cache to disk ๐Ÿ’พ
  • --cache-store-sync โ€” sets frequency of sync for persistent cache ๐Ÿ”„
  • --cache-no-expire โ€” disables auto sweep of expired items ๐Ÿ‘ป
  • --cache-expire-freq โ€” sets the frequency of cache sweeper scans (default 3 seconds) ๐Ÿงน
  • --cache-report-freed-items โ€” constantly reports the cache item freed by the sweeper (use only for debug) โš ๏ธ
  • --cache-udp-server โ€” binds the cache udp server (used only for set/update/delete) to the specified socket ๐Ÿ“ก
  • --cache-udp-node โ€” sends cache update/deletion to the specified cache udp server ๐Ÿ“ค
  • --cache-sync โ€” copies the whole content of another uWSGI cache server on server 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 (keyval syntax) ๐Ÿ†•
  • --queue โ€” enables shared queue ๐Ÿ“‹
  • --queue-blocksize โ€” sets queue blocksize ๐Ÿงฑ
  • --queue-store โ€” enables persistent queue to disk ๐Ÿ’พ
  • --queue-store-sync โ€” sets frequency of sync for persistent queue ๐Ÿ”„
  • -Q, --spooler โ€” runs a spooler on the specified directory ๐Ÿงต
  • --spooler-external โ€” maps spoolers requests to a spooler directory managed by an external instance ๐ŸŒ
  • --spooler-ordered โ€” tries to order the execution of spooler tasks ๐Ÿ“‹
  • --spooler-chdir โ€” does chdir() to specified directory before each spooler task ๐Ÿ“‚
  • --spooler-processes โ€” sets the number of processes for spoolers ๐Ÿงฎ
  • --spooler-quiet โ€” does not be verbose with spooler tasks ๐Ÿคซ
  • --spooler-max-tasks โ€” sets the maximum number of tasks to run before recycling a spooler ๐Ÿ”
  • --spooler-harakiri โ€” sets harakiri timeout for spooler tasks ๐Ÿ—ก๏ธ
  • --spooler-frequency โ€” sets spooler frequency ๐Ÿ“ถ
  • --spooler-freq โ€” sets spooler frequency ๐Ÿ”‚
  • --mule โ€” adds a mule ๐Ÿด
  • --mules โ€” adds the specified number of mules ๐Ÿด๐Ÿด
  • --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 signal queue ๐Ÿ“ฆ
  • --signals-bufsize โ€” sets buffer size for signal queue ๐Ÿ—ƒ๏ธ
  • --signal-timer โ€” adds a timer (syntax: <signal> <seconds>) โฒ๏ธ
  • --timer โ€” adds a timer (syntax: <signal> <seconds>) โฑ๏ธ
  • --signal-rbtimer โ€” adds a redblack timer (syntax: <signal> <seconds>) ๐Ÿ”ดโšซ
  • --rbtimer โ€” adds a redblack timer (syntax: <signal> <seconds>) ๐ŸŒณ
  • --rpc-max โ€” maximum number of rpc slots (default: 64) ๐Ÿ“ž
  • -L, --disable-logging โ€” disables request logging ๐Ÿšซ๐Ÿ“
  • --flock โ€” locks the specified file before starting, exits if locked ๐Ÿ”’
  • --flock-wait โ€” locks the specified file before starting, waits if locked โณ
  • --flock2 โ€” locks the specified file after logging/daemon setup, exits if locked ๐Ÿ”
  • --flock-wait2 โ€” locks the specified file after logging/daemon setup, waits if locked ๐Ÿ•ฐ๏ธ
  • --pidfile โ€” creates pidfile (before privileges drop) ๐Ÿ“
  • --pidfile2 โ€” creates pidfile (after privileges drop) ๐Ÿ“„
  • --safe-pidfile โ€” creates safe pidfile (before privileges drop) ๐Ÿ›ก๏ธ
  • --safe-pidfile2 โ€” creates safe pidfile (after privileges drop) ๐Ÿ›ก๏ธ๐Ÿ“„
  • --chroot โ€” does chroot() to the specified directory ๐Ÿ“ฆ
  • --pivot-root โ€” does pivot_root() to the specified directories (new_root and put_old must be separated with a space) ๐Ÿ”„
  • --pivot_root โ€” does pivot_root() to the specified directories (new_root and put_old must be separated with a space) ๐ŸŒ€
  • --uid โ€” does setuid to the specified user/uid ๐Ÿ‘ค
  • --gid โ€” does setgid to the specified group/gid ๐Ÿ‘ฅ
  • --add-gid โ€” adds the specified group id to the process credentials โž•๐Ÿ‘ฅ
  • --immediate-uid โ€” does setuid to the specified user/uid IMMEDIATELY โšก
  • --immediate-gid โ€” does setgid to the specified group/gid IMMEDIATELY โšก๐Ÿ‘ฅ
  • --no-initgroups โ€” disables additional groups set via initgroups() ๐Ÿšซ
  • --cap โ€” sets process capability ๐ŸŽฉ
  • --unshare โ€” does unshare() part of the processes and puts it in a new namespace ๐ŸŒŒ
  • --unshare2 โ€” does unshare() part of the processes and puts it in a new namespace after rootfs change ๐ŸŒ
  • --setns-socket โ€” exposes a unix socket returning namespace fds from /proc/self/ns ๐Ÿ”Œ
  • --setns-socket-skip โ€” skips the specified entry when sending setns file descriptors ๐Ÿšซ
  • --setns-skip โ€” skips the specified 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 whole instance as jailed โœจ (which means the post_jail hooks get forced to actually run, no skipping).
  • --refork โ€” does a fork() all over again after privileges drop. Super handy for jailing systems.
  • --re-fork โ€” bestie this is literally the same thing as --refork: fork() again after privileges drop, for jailing systems. ๐Ÿ’…
  • --refork-as-root โ€” fork() again, but this time before privileges drop. Jailing systems love this one.
  • --re-fork-as-root โ€” same vibe as --refork-as-root, spelled different: fork() again before privileges drop, for jailing systems.
  • --refork-post-jail โ€” fork() again after jailing. Yes, again for jailing systems. It's giving fork-obsessed. ๐Ÿด
  • --re-fork-post-jail โ€” the twin of --refork-post-jail: fork() again after jailing, for jailing systems.
  • --hook-asap โ€” runs whatever hook you specified as soon as possible. No waiting. Girlies with no chill. โšก
  • --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 inside the jail, after initialization.
  • --hook-as-root โ€” run the specified hook before privileges drop (so, as root ๐Ÿ‘‘).
  • --hook-as-user โ€” run the specified hook after privileges drop (hi, unprivileged era).
  • --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 every single fork. ๐Ÿดโœจ
  • --hook-accepting โ€” run the specified hook after each worker enters 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 enters the accepting phase, but only once per-instance.
  • --hook-accepting1-once โ€” run the specified hook after the first worker enters the accepting phase, once per instance. One and done, periodt.
  • --hook-master-start โ€” run the specified hook when the Master starts. ๐Ÿซก
  • --hook-touch โ€” run the specified hook when the specified file is touched. Syntax is literally: <file> <action>
  • --hook-emperor-start โ€” run the specified hook when the Emperor starts. ๐Ÿ‘‘โœจ
  • --hook-emperor-stop โ€” run the specified hook when the Emperor sends a stop message.
  • --hook-emperor-reload โ€” run the specified hook when the Emperor sends 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. (Same energy, different flag name.)

  • --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 the 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-asap โ€” mount the filesystem as soon as possible. โšก
  • --mount-pre-jail โ€” mount the filesystem before jailing.
  • --mount-post-jail โ€” mount the filesystem after jailing.
  • --mount-in-jail โ€” mount the filesystem in the jail, after initialization.
  • --mount-as-root โ€” mount the filesystem before privileges drop.
  • --mount-as-vassal โ€” mount the filesystem before exec()ing the vassal.
  • --mount-as-emperor โ€” mount the filesystem in the emperor after the vassal has been started.
  • --umount-asap โ€” unmount the filesystem as soon as possible. ๐Ÿซถ
  • --umount-pre-jail โ€” unmount the filesystem before jailing.
  • --umount-post-jail โ€” unmount the filesystem after jailing.
  • --umount-in-jail โ€” unmount the filesystem in the jail, after initialization.
  • --umount-as-root โ€” unmount the filesystem before privileges drop.
  • --umount-as-vassal โ€” unmount the filesystem before exec()ing the vassal.
  • --umount-as-emperor โ€” unmount the filesystem in the emperor after the vassal has been started.

  • --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. (Same thing, shorter name.)
  • --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. (Yes, another alias. They're multiplying.)
  • --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-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 the 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.
See the pattern? The number in the name is how many args your function takes. 1 = one arg, 3 = three, 4 = four, and no number = no args. iykyk ๐Ÿงš

  • --ini โ€” load config from an ini file. (The classic.)
  • -y, --yaml โ€” load config from a yaml file. ๐ŸŒธ
  • -y, --yml โ€” load config from a yaml file. (Same short flag -y, same vibe.)
  • -j, --json โ€” load config from a json file.
  • -j, --js โ€” load config from a json file. (Yeah, --js is just --json wearing a different fit.)
  • --weight โ€” weight of the instance (used by clustering/lb/subscriptions).
  • --auto-weight โ€” set the weight of the instance automatically (used by clustering/lb/subscriptions). ๐Ÿค–
  • --no-server โ€” force no-server mode.
  • --command-mode โ€” force command mode.
  • --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. (Four flags, one syscall option. It's giving "we couldn't pick a name". ๐Ÿ’€)
  • --socket-sndbuf โ€” set SO_SNDBUF.
  • --socket-rcvbuf โ€” set SO_RCVBUF.
  • --shutdown-sockets โ€” force calling shutdown() in addition to close() when sockets are destroyed.
  • --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 the specified megabytes.
  • --reload-on-rss โ€” reload if rss memory is higher than the specified megabytes.
  • --evil-reload-on-as โ€” force the master to reload a worker if its address space is higher than the specified megabytes. ๐Ÿ˜ˆ
  • --evil-reload-on-rss โ€” force the master to reload a worker if its rss memory is higher than the 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-reload โ€” reload uWSGI if the specified file is modified/touched.
  • --touch-workers-reload โ€” trigger reload of (only) the 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 a command when the specified file is modified/touched. Syntax: file command
Not me noticing that the whole touch-* crew is just "poke a file, get a behaviour". Chef's kiss. ๐Ÿ‘‘
  • --touch-signal โ€” watcher vibes โœจ when the file you named gets modified/touched, it fires a signal (syntax: file signal)
  • --fs-reload โ€” when that filesystem object gets modified, we do a graceful reload ๐Ÿ’…
  • --fs-brutal-reload โ€” same energy but brutal reload when the filesystem object changes ๐Ÿ˜ค
  • --fs-signal โ€” raise a uwsgi signal when the filesystem object is modified (syntax: file signal)
  • --check-mountpoint โ€” if a filesystem is no longer reachable, the instance gets destroyed. Lowkey perfect for reliable Fuse management ๐Ÿซถ
  • --mountpoint-check โ€” same thing, different name: destroy the instance if a filesystem is no more reachable (handy for reliable Fuse management)
  • --check-mount โ€” yep, also the same: destroy the instance if a filesystem is no more reachable (great for reliable Fuse management)
  • --mount-check โ€” one more alias, bestie: destroy the instance if a filesystem is no more reachable (for reliable Fuse management) ๐Ÿฆ‹
  • --propagate-touch โ€” the over-engineering option, periodt. For systems with flaky signal management ๐Ÿ™ˆ
  • --limit-post โ€” cap the request body, no exceptions
  • --no-orphans โ€” automatically kill workers if the master dies (ngl this can be dangerous for availability โš ๏ธ)
  • --prio โ€” set processes/threads priority
  • --cpu-affinity โ€” set cpu affinity, pin those babies down ๐Ÿ“Œ
  • --post-buffering โ€” set the size in bytes after which it will buffer to disk instead of memory ๐Ÿ’พ
  • --post-buffering-bufsize โ€” set the buffer size for read() in post buffering mode
  • --body-read-warning โ€” set the amount of allowed memory allocation (in megabytes) for a request body before it starts printing a warning ๐Ÿ‘€
  • --upload-progress โ€” turns on creation of .json files in the directory you specify, during a file upload
  • --no-default-app โ€” do not fallback to the default app
  • --manage-script-name โ€” automatically rewrite SCRIPT_NAME and PATH_INFO
  • --ignore-script-name โ€” ignore SCRIPT_NAME
  • --catch-exceptions โ€” report the exception as http output (discouraged, use only for testing ๐Ÿงช)
  • --reload-on-exception โ€” reload a worker when an exception is raised
  • --reload-on-exception-type โ€” reload a worker when a specific exception type is raised
  • --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 ๐Ÿซถ
  • --enable-metrics โ€” turn on the metrics subsystem
  • --metric โ€” add a custom metric โœจ
  • --metric-threshold โ€” add a metric threshold/alarm ๐Ÿšจ
  • --metric-alarm โ€” add a metric threshold/alarm (same thing, different outfit)
  • --alarm-metric โ€” add a metric threshold/alarm (third alias, iconic)
  • --metrics-dir โ€” export metrics as text files into the directory you name
  • --metrics-dir-restore โ€” restore the last value taken from the metrics dir
  • --metric-dir โ€” export metrics as text files to the specified directory
  • --metric-dir-restore โ€” restore last value taken from the metrics dir
  • --metrics-no-cores โ€” disable generation of 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 (twin flame behavior ๐Ÿ’œ)
  • --stats-http โ€” prefix stats server json output with http headers
  • --stats-minified โ€” minify the statistics json output
  • --stats-min โ€” minify statistics json output (same, shorter, cuter)
  • --stats-push โ€” push the stats json to the destination you specify
  • --stats-pusher-default-freq โ€” set the default frequency of stats pushers
  • --stats-pushers-default-freq โ€” set the default frequency of stats pushers (plural edition ๐ŸŽ€)
  • --stats-no-cores โ€” disable generation of cores-related stats
  • --stats-no-metrics โ€” do not include metrics in the stats output
  • --multicast โ€” subscribe to the specified multicast group
  • --multicast-ttl โ€” set multicast ttl
  • --multicast-loop โ€” set multicast loop (default 1)
  • --master-fifo โ€” enable the master fifo ๐ŸŽ€
  • --notify-socket โ€” enable the notification socket
  • --subscription-notify-socket โ€” set the notification socket for subscriptions
  • --legion โ€” become a member of a legion ๐Ÿ‘‘
  • --legion-mcast โ€” become 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 the legion subsystem
  • --legion-death-on-lord-error โ€” declare itself as a dead node for the specified amount of seconds if one of the lord hooks fails ๐Ÿ’€
  • --legion-skew-tolerance โ€” set the clock skew tolerance of the legion subsystem (default 60 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)
  • --legion-join โ€” action to call on legion join (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 โ€” set the max size of the legion scroll buffer
  • --legion-scroll-list-max-size โ€” set the 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 โ€” set the maximum tolerance (in seconds) of clock skew for the secured subscription system
  • --subscriptions-sign-skip-uid โ€” skip the signature check for the specified uid when using unix sockets credentials ๐Ÿ™ˆ
  • --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 โ€” try to fallback to the next part (dot based) in the subscription key
  • --subscribe-to โ€” subscribe to the specified subscription server
  • --st โ€” subscribe to the specified subscription server (shortest king ๐Ÿ‘‘)
  • --subscribe โ€” subscribe to the specified subscription server
  • --subscribe2 โ€” subscribe to the specified subscription server using advanced keyval syntax โœจ
  • --subscribe-freq โ€” send the subscription announce at the specified interval
  • --subscription-tolerance โ€” set tolerance for subscription servers
  • --unsubscribe-on-graceful-reload โ€” force the unsubscribe request even during a graceful reload
  • --start-unsubscribed โ€” configure subscriptions but do not send them (so useful with master fifo)
  • --subscribe-with-modifier1 โ€” force the specified modifier1 when subscribing
  • --snmp โ€” enable the embedded snmp server
  • --snmp-community โ€” set the snmp community string
  • --ssl-verbose โ€” be verbose about SSL errors ๐Ÿ“ข
  • --ssl-verify-depth โ€” set the maximum certificate verification depth
  • --sni โ€” add an SNI-governed SSL context
  • --sni-dir โ€” check for the cert/key/client_ca file in the specified directory and create a sni/ssl context on demand
  • --sni-dir-ciphers โ€” set the ssl ciphers for the sni-dir option
  • --ssl-enable3 โ€” enable SSLv3 (insecure โš ๏ธ)
  • --ssl-enable-sslv3 โ€” enable SSLv3 (insecure โš ๏ธ)
  • --ssl-enable-tlsv1 โ€” enable TLSv1 (insecure โš ๏ธ)
  • --ssl-option โ€” set a raw ssl option (numeric value, bestie ๐Ÿ”ข)
  • --sni-regexp โ€” add an SNI-governed SSL context (the key is a regexp)
  • --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 ๐Ÿ’ฅ
  • --binary-path โ€” force the 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 the number of 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 specified file or udp address after privileges drop
  • --log-format โ€” set the advanced format for request logging
  • --logformat โ€” set the advanced format for request logging (alias bestie)
  • --logformat-strftime โ€” apply strftime to logformat output
  • --log-format-strftime โ€” apply strftime to logformat output (same thing, different spelling ๐Ÿ’…)
  • --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
  • --logger โ€” set/append a logger
  • --logger-list โ€” list the enabled loggers ๐Ÿ—’๏ธ
  • --loggers-list โ€” list the enabled loggers
  • --threaded-logger โ€” offload log writing to a thread
  • --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 (i.e. do not show) log lines matching the regexp you give
  • --log-filter โ€” show only the log lines matching the specified regexp
  • --log-route โ€” log to the specified named logger if the regexp applied on the logline matches
  • --log-req-route โ€” log requests to the specified named logger if the regexp applied on the logline matches
  • --use-abort โ€” call abort() on segfault/fpe, which could be useful for generating a core dump ๐Ÿ’€
  • --alarm โ€” create a new alarm, syntax: <alarm> <plugin:args> ๐Ÿšจ

okay so the options keep coming and now we're deep in alarm + logging + routing territory, so grab a snack bestie, we're going through every single one ๐Ÿ’–

  • --alarm-cheap โ€” use the main alarm thread instead of spinning up dedicated threads for curl-based alarms (no extra thread babies, the main one handles it) ๐Ÿงต
  • --alarm-freq โ€” tune the anti-loop alarm system (default 3 seconds). yes it's literally watching out for loops, iconic behaviour tbh
  • --alarm-fd โ€” raise the specified alarm when an fd is read for read. by default it reads 1 byte, so set 8 for eventfd ๐Ÿ’…
  • --alarm-segfault โ€” raise the specified alarm when the segmentation fault handler is executed ๐Ÿ˜ญ
  • --segfault-alarm โ€” raise the specified alarm when the segmentation fault handler is executed (same vibe, different spelling, she contains multitudes)
  • --alarm-backlog โ€” raise the specified alarm when the socket backlog queue is full ๐Ÿซ 
  • --backlog-alarm โ€” raise the specified alarm when the socket backlog queue is full
  • --lq-alarm โ€” raise the specified alarm when the socket backlog queue is full
  • --alarm-lq โ€” raise the specified alarm when the socket backlog queue is full
  • --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 (six names, one job, that's range โœจ)
  • --log-alarm โ€” raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
  • --alarm-log โ€” raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
  • --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>
  • --alarm-list โ€” list enabled alarms ๐Ÿ””
  • --alarms-list โ€” list enabled alarms (plural bestie, we love options)
  • --alarm-msg-size โ€” set the max size of an alarm message (default 8192)

  • --log-master โ€” delegate logging to the master process ๐Ÿ‘‘
  • --log-master-bufsize โ€” set the buffer size for the master logger. 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 log after reload ๐Ÿฆ‹
  • --log-truncate โ€” truncate log on startup
  • --log-maxsize โ€” set maximum logfile size
  • --log-backupname โ€” set logfile name after rotation
  • --logdate โ€” prefix logs with date or a strftime string ๐Ÿ“…
  • --log-date โ€” prefix logs with date or a strftime string
  • --log-prefix โ€” prefix logs with a string
  • --log-zero โ€” log responses without body
  • --log-slow โ€” log requests slower than the specified number of milliseconds ๐ŸŒ
  • --log-4xx โ€” log requests with a 4xx response
  • --log-5xx โ€” log requests with a 5xx response
  • --log-big โ€” log requests bigger than the specified size
  • --log-sendfile โ€” log sendfile requests
  • --log-ioerror โ€” log requests with io errors
  • --log-micros โ€” report response time in microseconds instead of milliseconds โฑ๏ธ
  • --log-x-forwarded-for โ€” use the ip from X-Forwarded-For header instead of REMOTE_ADDR

  • --master-as-root โ€” leave master process running as root. (yes, everyone's fave thing to do, proceed accordingly) ๐Ÿ”ฅ
  • --drop-after-init โ€” run privileges drop after plugin initialization, superseded by drop-after-apps
  • --drop-after-apps โ€” run privileges drop after apps loading, superseded by master-as-root
  • --force-cwd โ€” force the initial working directory to the specified value
  • --binsh โ€” override /bin/sh (used by exec hooks, it always fallback to /bin/sh, so don't stress)
  • --chdir โ€” chdir to specified directory before apps loading
  • --chdir2 โ€” chdir to specified directory after apps loading
  • --lazy โ€” set lazy mode (load apps in workers instead of 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 (adaptive process spawning)
  • --cheaper-initial โ€” set the initial number of processes to spawn in cheaper mode
  • --cheaper-algo โ€” choose to algorithm used for adaptive process spawning
  • --cheaper-step โ€” number of additional processes to spawn at each overload
  • --cheaper-overload โ€” increase workers after specified overload
  • --cheaper-algo-list โ€” list enabled cheapers algorithms
  • --cheaper-algos-list โ€” list enabled cheapers algorithms
  • --cheaper-list โ€” list enabled cheapers algorithms
  • --cheaper-rss-limit-soft โ€” don't spawn new workers if 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
  • --idle โ€” set idle mode (put uWSGI in cheap mode after inactivity) ๐Ÿ›‹๏ธ
  • --die-on-idle โ€” shutdown uWSGI when idle ๐Ÿ’€
  • --mount โ€” load application under mountpoint
  • --worker-mount โ€” load application under 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
  • --thread-stack-size โ€” set threads stacksize
  • --threads-stack-size โ€” set threads stacksize
  • --vhost โ€” enable virtualhosting mode (based on SERVER_NAME variable) ๐Ÿ 
  • --vhost-host โ€” enable virtualhosting mode (based on HTTP_HOST variable)

okay now the routing section, and bestie there are so many of these. every single one is here, we are not skipping a crumb ๐Ÿ“

  • --route โ€” add a route ๐Ÿ›ค๏ธ
  • --route-host โ€” add a route based on 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 condition
  • --route-if-not โ€” add a route based on 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 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 condition
  • --final-route-if-not โ€” add a final route based on 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 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 condition
  • --error-route-if-not โ€” add an error route based on 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 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 condition
  • --response-route-if-not โ€” add a response route based on condition (negate version)
  • --response-route-run โ€” always run the specified response route action
  • --router-list โ€” list enabled routers ๐Ÿ“‹
  • --routers-list โ€” list enabled routers

  • --error-page-403 โ€” add an error page (html) for managed 403 response
  • --error-page-404 โ€” add an error page (html) for managed 404 response
  • --error-page-500 โ€” add an error page (html) for 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
  • --websockets-pong-tolerance โ€” set the tolerance (in seconds) of websockets ping/pong subsystem
  • --websocket-pong-tolerance โ€” set the tolerance (in seconds) of websockets ping/pong subsystem
  • --websockets-max-size โ€” set the max allowed size of websocket messages (in Kbytes, default 1024) ๐Ÿ“ฆ
  • --websocket-max-size โ€” set the max allowed size of websocket messages (in Kbytes, default 1024)
  • --chunked-input-limit โ€” set the max size of a chunked input part (default 1MB, in bytes)
  • --chunked-input-timeout โ€” set default timeout for chunked input โณ
  • --clock โ€” set a clock source ๐Ÿ•ฐ๏ธ
  • --clock-list โ€” list enabled clocks

and we are still going, don't go anywhere bestie, there's more coming ๐Ÿ’œ

  • --clocks-list โ€” lists all the enabled clocks, fr fr โฐ
  • --add-header โ€” auto-magically adds HTTP headers to the response โœจ
  • --rem-header, --del-header โ€” both remove a specified HTTP header from the response, no cap ๐Ÿšซ
  • --collect-header, --response-header-collect โ€” stashes the specified response header in a request var (syntax: header var) ๐Ÿ“ฅ
  • --pull-header โ€” stashes the specified response header in a request var AND removes it from the response (syntax: header var) ๐Ÿ’…
  • --check-static, --static-check โ€” checks for static files in the specified directory ๐Ÿ”
  • --check-static-docroot โ€” checks for static files in the requested DOCUMENT_ROOT ๐Ÿ“‚
  • --static-map โ€” maps a mountpoint to a static directory (or file) ๐Ÿ—บ๏ธ
  • --static-map2 โ€” like --static-map but completely appends the requested resource to the docroot, periodt ๐Ÿ—‚๏ธ
  • --static-skip-ext โ€” skips the specified extension from static file checks ๐Ÿ™ˆ
  • --static-index โ€” searches for the specified file if a directory is requested ๐Ÿ”Ž
  • --static-safe โ€” skips security checks if the file is under the specified path ๐Ÿ›ก๏ธ
  • --static-cache-paths โ€” puts resolved paths in the uWSGI cache for the specified amount of seconds โณ
  • --static-cache-paths-name โ€” uses the specified cache for static paths ๐Ÿท๏ธ
  • --mimefile, --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 โฑ๏ธ
  • --static-gzip โ€” if the supplied regexp 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, all of them ๐Ÿ’ฏ
  • --static-gzip-dir, --static-gzip-prefix โ€” checks for a gzip version of all requested static files in the specified dir/prefix ๐Ÿ“
  • --static-gzip-ext, --static-gzip-suffix โ€” checks for a gzip version of all requested static files with the specified ext/suffix ๐Ÿ“Ž
  • --honour-range โ€” enables support for the HTTP Range header ๐Ÿ“
  • --offload-threads, --offload-thread โ€” sets the number of offload threads to spawn (per-worker, default 0) ๐Ÿงต
  • --file-serve-mode, --fileserve-mode โ€” sets the static file serving mode ๐Ÿ–ฅ๏ธ
  • --disable-sendfile โ€” disables sendfile() and relies on boring read()/write() ๐Ÿ˜ด
  • --check-cache โ€” checks for response data in the specified cache (empty for 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) ๐Ÿ”
  • --mode โ€” sets uWSGI custom mode ๐ŸŽ›๏ธ
  • --env โ€” sets an environment variable ๐ŸŒ
  • --envdir โ€” loads a daemontools compatible envdir ๐Ÿ“‚
  • --early-envdir โ€” loads a daemontools compatible envdir ASAP โšก
  • --unenv โ€” unsets an 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 permission for cgroup directory (default is 700) ๐Ÿ”‘
  • --namespace, --ns โ€” runs in a new namespace under the specified rootfs ๐Ÿช
  • --namespace-keep-mount โ€” keeps the specified mountpoint in your namespace ๐Ÿ“Œ
  • --namespace-net, --ns-net โ€” adds a network namespace ๐ŸŒ
  • --enable-proxy-protocol โ€” enables PROXY1 protocol support (only for http parsers) ๐Ÿ”€
  • --reuse-port โ€” enables REUSE_PORT flag on the socket (BSD only) ๐Ÿ”„
  • --tcp-fast-open, --tcp-fastopen โ€” enables TCP_FASTOPEN flag on TCP sockets with the specified qlen value ๐Ÿš€
  • --tcp-fast-open-client, --tcp-fastopen-client โ€” uses sendto(..., MSG_FASTOPEN, ...) instead of connect() if supported ๐Ÿ“ก
  • --zerg โ€” attaches to a zerg server ๐Ÿ‘พ
  • --zerg-fallback โ€” falls back to normal sockets if the zerg server is not available ๐Ÿณ๏ธ
  • --zerg-server โ€” enables the zerg server on the specified UNIX socket ๐Ÿ›
  • --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, --cron-legion โ€” adds a cron task runnable only when the instance is a lord of the specified legion ๐Ÿ‘‘
  • --unique-legion-cron, --unique-cron-legion โ€” adds a unique cron task runnable only when the instance is a lord of the specified legion ๐Ÿฆ„๐Ÿ‘‘
  • --loop โ€” selects the uWSGI loop engine ๐Ÿ”
  • --loop-list, --loops-list โ€” lists enabled loop engines ๐Ÿ“‹
  • --worker-exec โ€” runs the specified command as a worker ๐Ÿƒ
  • --worker-exec2 โ€” runs the specified command as a worker (after 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), 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 runs only on legion lord node ๐Ÿ‘‘
  • --legion-smart-attach-daemon โ€” same as --smart-attach-daemon but the daemon runs only on legion lord node ๐Ÿ‘‘๐Ÿง 
  • --legion-smart-attach-daemon2 โ€” same as --smart-attach-daemon2 but the daemon runs only on legion lord node ๐Ÿ‘‘๐Ÿง ๐Ÿšซ
  • --daemons-honour-stdin โ€” does not change the stdin of external daemons to /dev/null ๐ŸŽค
  • --attach-daemon2 โ€” attach-daemon keyval variant (supports smart modes too) ๐Ÿ—๏ธ
  • --plugins, --plugin โ€” loads uWSGI plugins ๐Ÿ”Œ
  • --need-plugins, --need-plugin โ€” loads uWSGI plugins (exit on error) ๐Ÿ”Œ๐Ÿ’ฅ
  • --plugins-dir, --plugin-dir โ€” adds a directory to the uWSGI plugin search path ๐Ÿ“
  • --plugins-list, --plugin-list โ€” lists enabled plugins ๐Ÿ“ƒ
  • --autoload โ€” tries to automatically load plugins when unknown options are found ๐Ÿค–
  • --dlopen โ€” blindly loads a shared library ๐ŸŽฒ
  • --allowed-modifiers โ€” comma separated list of allowed modifiers โœ…
  • --remap-modifier โ€” remaps 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 โ€” forces exit() of the instance ๐Ÿšช
  • --cflags โ€” reports uWSGI CFLAGS (useful for building external plugins) ๐Ÿ› ๏ธ
  • --dot-h โ€” dumps the uwsgi.h used for building the core (useful for building external plugins) ๐Ÿ“„
  • --config-py โ€” dumps the uwsgiconfig.py used for building the core (useful for building external plugins) ๐Ÿ
  • --build-plugin โ€” builds a uWSGI plugin for the current binary ๐Ÿ—๏ธ
  • --version โ€” prints uWSGI version ๐Ÿท๏ธ
  • --response-headers-limit โ€” sets response header maximum size (default: 64k) ๐Ÿ“

and that's a wrap, bestie! this was uwsgi_python3 2.0.31-6 from July 2026 โ€” go slay some uWSGI configs, mwah ๐Ÿ’‹โœจ

๐Ÿ“ฆ where this page comes from