UWSGI_LUA52(1)

๐Ÿ“ฆ
version 2.0.21 ยท 2 versions
, in debian bookworm

๐Ÿ’– NAME ๐Ÿ’–

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

okay so hi bestie ๐Ÿซถ this is the UWSGI_LUA52(1) page, filed under User Commands, and yeah it is long. we're doing it in six parts, so hydrate, stretch, and do not panic ๐Ÿ“


โœจ SYNOPSIS โœจ

uwsgi-core-local [options...]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the thing โ€” this whole section is basically the master list of options. every single one. we're not skipping a single flag, not even the ones that look like a typo, because they are real and they are iconic ๐Ÿ’…

  • -s, --socket โ€” bind to the UNIX/TCP socket you name, using the default protocol
  • -s, --uwsgi-socket โ€” bind to the UNIX/TCP socket you name, using the uwsgi protocol
  • --suwsgi-socket โ€” bind to the UNIX/TCP socket you name, using the uwsgi protocol over SSL ๐Ÿ”’
  • --ssl-socket โ€” bind to the UNIX/TCP socket you name, using the uwsgi protocol over SSL ๐Ÿ”’
  • --http-socket โ€” bind to the UNIX/TCP socket you name, using the HTTP protocol
  • --http-socket-modifier1 โ€” force the modifier1 you specify when using the HTTP protocol
  • --http-socket-modifier2 โ€” force the modifier2 you specify when using the HTTP protocol
  • --http11-socket โ€” bind to the UNIX/TCP socket you name, using the HTTP 1.1 (Keep-Alive) protocol
  • --https-socket โ€” bind to the UNIX/TCP socket you name, using the HTTPS protocol
  • --https-socket-modifier1 โ€” force the modifier1 you specify when using the HTTPS protocol
  • --https-socket-modifier2 โ€” force the modifier2 you specify when using the HTTPS protocol
  • --fastcgi-socket โ€” bind to the UNIX/TCP socket you name, using the FastCGI protocol
  • --fastcgi-nph-socket โ€” bind to the UNIX/TCP socket you name, using the FastCGI protocol (nph mode)
  • --fastcgi-modifier1 โ€” force the modifier1 you specify when using the FastCGI protocol
  • --fastcgi-modifier2 โ€” force the modifier2 you specify when using the FastCGI protocol
  • --scgi-socket โ€” bind to the UNIX/TCP socket you name, using the SCGI protocol
  • --scgi-nph-socket โ€” bind to the UNIX/TCP socket you name, using the SCGI protocol (nph mode)
  • --scgi-modifier1 โ€” force the modifier1 you specify when using the SCGI protocol
  • --scgi-modifier2 โ€” force the modifier2 you specify when using the SCGI protocol
  • --raw-socket โ€” bind to the UNIX/TCP socket you name, using the RAW protocol
  • --raw-modifier1 โ€” force the modifier1 you specify when using the RAW protocol
  • --raw-modifier2 โ€” force the modifier2 you specify when using the RAW protocol
  • --puwsgi-socket โ€” bind to the UNIX/TCP socket you name, using the persistent uwsgi protocol (puwsgi)
  • --protocol โ€” force the protocol you specify for default sockets
  • --socket-protocol โ€” force the protocol you specify 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)
  • -p, --processes โ€” spawn the number of workers/processes you specify
  • -p, --workers โ€” spawn the number of workers/processes you specify
  • --thunder-lock โ€” serialize accept() usage (if possible) โšก
  • -t, --harakiri โ€” set the harakiri timeout
  • --harakiri-verbose โ€” turn on verbose mode for harakiri
  • --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 the backtrace depth
  • --mule-harakiri โ€” set the harakiri timeout for mule tasks
  • -x, --xmlconfig โ€” load config from an xml file
  • -x, --xml โ€” load config from an xml file
  • --config โ€” load configuration using the pluggable system
  • --fallback-config โ€” re-exec uwsgi with the config you specify when the exit code is 1
  • --strict โ€” enable strict mode (placeholder cannot be used) ๐Ÿšซ
  • --skip-zero โ€” skip the 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 value of the option you specify 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 placeholder you specify, 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 number you specify to a list starting from 1)
  • --for-readline โ€” (opt logic) for cycle (expand the file you specify 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 the hostname against a regular expression
  • --if-not-hostname-match โ€” (opt logic) try to match the hostname against a regular expression
  • --if-exists โ€” (opt logic) check for file/directory existence
  • --if-not-exists โ€” (opt logic) check for file/directory existence
  • --ifexists โ€” (opt logic) check for file/directory existence
  • --if-plugin โ€” (opt logic) check for plugin
  • --if-not-plugin โ€” (opt logic) check for plugin
  • --ifplugin โ€” (opt logic) check for plugin
  • --if-file โ€” (opt logic) check for file existance
  • --if-not-file โ€” (opt logic) check for file existance
  • --if-dir โ€” (opt logic) check for directory existance
  • --if-not-dir โ€” (opt logic) check for directory existance
  • --ifdir โ€” (opt logic) check for directory existance
  • --if-directory โ€” (opt logic) check for directory existance
  • --endif โ€” (opt logic) end if
  • --end-if โ€” (opt logic) end if
  • --blacklist โ€” set options blacklist context
  • --end-blacklist โ€” clear options blacklist context
  • --whitelist โ€” set options whitelist context
  • --end-whitelist โ€” clear options whitelist context
  • --ignore-sigpipe โ€” do not report the (annoying) SIGPIPE
  • --ignore-write-errors โ€” do not report the (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 file you specify as a config template
  • --include โ€” include the file you specify 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)
  • -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
  • -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 the internal buffer size
  • -m, --memory-report โ€” enable memory report
  • --profiler โ€” enable the profiler you specify
  • -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 ๐Ÿงต
  • --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
  • --emperor โ€” run the Emperor ๐Ÿ‘‘
  • --emperor-proxy-socket โ€” force the vassal to became an Emperor proxy
  • --emperor-wrapper โ€” set a binary wrapper for vassals
  • --emperor-wrapper-override โ€” set a binary wrapper for vassals to try before the default one
  • --emperor-wrapper-fallback โ€” set a binary wrapper for vassals to try as a last resort
  • --emperor-nofollow โ€” do not follow symlinks when checking for mtime
  • --emperor-procname โ€” set the Emperor process name
  • --emperor-freq โ€” set the Emperor scan frequency (default 3 seconds)
  • --emperor-required-heartbeat โ€” set the Emperor tolerance about heartbeats
  • --emperor-curse-tolerance โ€” set the Emperor tolerance about cursed vassals
  • --emperor-pidfile โ€” write the Emperor pid in the file you specify
  • --emperor-tyrant โ€” put the Emperor in Tyrant mode
  • --emperor-tyrant-nofollow โ€” do not follow symlinks when checking for uid/gid in Tyrant mode
  • --emperor-stats โ€” run the Emperor stats server
  • --emperor-stats-server โ€” run the Emperor stats server

okay that's part 1 bestie, hold on, there's more coming ๐Ÿ’…

โœจ OPTIONS โœจ

okay bestie, deep breath, because this is the list. every single flag uWSGI will hand you, in order, no skips, no "and then some other stuff". grab a snack ๐Ÿ“, we're doing all of them.

  • --early-emperor โ€” spawns the emperor as soon as possibile. (yes, "possibile". that's the original's spelling and we respect it ๐Ÿ’…)
  • --emperor-broodlord โ€” runs the emperor in BroodLord mode. that's genuinely the name. no notes. ๐Ÿ‘‘
  • --emperor-throttle โ€” sets the throttling level, in milliseconds, for vassals that are behaving badly. default is 1000.
  • --emperor-max-throttle โ€” sets the max throttling level, in milliseconds, for those badly-behaving vassals. default is 3 minutes.
  • --emperor-magic-exec โ€” prefixes vassal config files with exec:// if they have the executable bit. magic, literally โœจ
  • --emperor-on-demand-extension โ€” searches for a text file (vassal name + extension) that contains the on demand socket name.
  • --emperor-on-demand-ext โ€” same thing, shorter name. twins ๐Ÿ‘ฏ
  • --emperor-on-demand-directory โ€” turns on on demand mode, binding to the unix socket in the directory you specify, named like the vassal + .socket.
  • --emperor-on-demand-dir โ€” the alias of the one above. same energy, fewer letters.
  • --emperor-on-demand-exec โ€” uses the output of the command you give it as the on demand socket name. the vassal name is passed as the only argument.
  • --emperor-extra-extension โ€” allows the extension you specify in the Emperor (the vassal will be called with --config).
  • --emperor-extra-ext โ€” alias, again. we love a short form.
  • --emperor-no-blacklist โ€” disables the Emperor blacklisting subsystem. no blacklist, no drama ๐Ÿ™ˆ
  • --emperor-use-clone โ€” uses clone() instead of fork(), passing the unshare() flags you specify.
  • --emperor-graceful-shutdown โ€” uses vassals graceful shutdown during ragnarok. yes, ragnarok. iconic naming, honestly.
  • --emperor-cap โ€” set vassals capability.
  • --vassals-cap โ€” set vassals capability.
  • --vassal-cap โ€” set vassals capability.
  • --imperial-monitor-list โ€” list enabled imperial monitors.
  • --imperial-monitors-list โ€” list enabled imperial monitors. (one little s away from its sibling, that's it)
  • --vassals-inherit โ€” adds config templates to the vassals config (uses --inherit).
  • --vassals-include โ€” includes config templates into the vassals config (uses --include instead of --inherit).
  • --vassals-inherit-before โ€” adds config templates to the vassals config (uses --inherit, and parses before the vassal file).
  • --vassals-include-before โ€” includes config templates into the vassals config (uses --include instead of --inherit, and parses before the vassal file).
  • --vassals-start-hook โ€” runs the command you specify before each vassal starts.
  • --vassals-stop-hook โ€” runs the command you specify after a vassal's death ๐Ÿ’€
  • --vassal-sos โ€” asks the emperor for reinforcement when it's overloaded. ๐Ÿ†˜
  • --vassal-sos-backlog โ€” asks the emperor for sos if the backlog queue has more items than the value you specify.
  • --vassals-set โ€” automatically sets the option you specify (via --set) for every vassal.
  • --vassal-set โ€” automatically sets the option you specify (via --set) for every vassal.
  • --heartbeat โ€” announces healthiness to the emperor ๐Ÿ’–
  • --reload-mercy โ€” sets the maximum time, in seconds, that we wait for workers and other processes to die during reload/shutdown.
  • --worker-reload-mercy โ€” sets the maximum time, in seconds, that a worker can take to reload/shutdown. default is 60.
  • --mule-reload-mercy โ€” sets the maximum time, in seconds, that a mule can take to reload/shutdown. default is 60.
  • --exit-on-reload โ€” forces an exit even if a reload was requested.
  • --die-on-term โ€” exit instead of a brutal reload on SIGTERM.
  • --force-gateway โ€” forces the spawn of the first registered gateway without a master.
  • -h|--help โ€” show this help. hi ๐Ÿซถ
  • -h|--usage โ€” show this help. same, different name.
  • --print-sym โ€” prints the content of the binary symbol you specify.
  • --print-symbol โ€” prints the content of the binary symbol you specify.
  • -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.
  • --min-worker-lifetime โ€” the number of seconds a worker must run before it gets reloaded. default is 60.
  • --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() for avoiding duplicates.
  • --persistent-ipcsem โ€” does not remove ipcsems on shutdown.
  • -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 โ€” does not close the file descriptor you specify.
  • --cache โ€” creates a shared cache containing the given elements.
  • --cache-blocksize โ€” sets the cache blocksize.
  • --cache-store โ€” enables persistent cache to disk.
  • --cache-store-sync โ€” sets the sync frequency for the persistent cache.
  • --cache-no-expire โ€” disables the auto sweep of expired items.
  • --cache-expire-freq โ€” sets how often the cache sweeper scans. default is 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 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 server startup.
  • --cache-use-last-modified โ€” updates the 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 the shared queue.
  • --queue-blocksize โ€” sets the queue blocksize.
  • --queue-store โ€” enables persistent queue to disk.
  • --queue-store-sync โ€” sets the sync frequency for the 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 โ€” does not be verbose with spooler tasks. (the original's words, not mine, and honestly? a mood)
  • --spooler-max-tasks โ€” sets the maximum number of tasks to run before recycling a spooler.
  • --spooler-harakiri โ€” sets the harakiri timeout for spooler tasks.
  • --spooler-frequency โ€” sets the spooler frequency.
  • --spooler-freq โ€” sets the spooler frequency.
  • --mule โ€” add a mule.
  • --mules โ€” adds the specified number of mules.
  • --farm โ€” add a mule farm. ๐Ÿด
  • --mule-msg-size โ€” sets the mule message buffer size.
  • --signal โ€” sends a uwsgi signal to a server.
  • --signal-bufsize โ€” sets the buffer size for the signal queue.
  • --signals-bufsize โ€” sets the buffer size for the 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 file you specify before starting, and exits if it's locked.
  • --flock-wait โ€” locks the file you specify before starting, and waits if it's locked.
  • --flock2 โ€” locks the file you specify after logging/daemon setup, and exits if it's locked.
  • --flock-wait2 โ€” locks the file you specify after logging/daemon setup, and waits if it's 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 directories you specify (new_root and put_old must be separated with a space).
  • --pivot_root โ€” pivot_root()s to the directories you specify (new_root and put_old must be separated with a space).
  • --uid โ€” setuid to the user/uid you specify.
  • --gid โ€” setgid to the group/gid you specify.
  • --add-gid โ€” adds the group id you specify to the process credentials.
  • --immediate-uid โ€” setuid to the user/uid you specify IMMEDIATELY. like, right now. no waiting. ๐Ÿ”ฅ
  • --immediate-gid โ€” setgid to the group/gid you specify IMMEDIATELY.
  • --no-initgroups โ€” disables the additional groups set via initgroups().
  • --cap โ€” sets the process capability.
  • --unshare โ€” unshare()s part of the processes and puts them in a new namespace.
  • --unshare2 โ€” unshare()s part of the processes and puts them in a new namespace, but after the 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 โ€” skips the entry you specify 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 the fds.
  • --jailed โ€” marks the instance as jailed (forces the execution of post_jail hooks).
  • --refork โ€” fork()s again after the privileges drop. useful for jailing systems.
  • --re-fork โ€” fork()s again after the privileges drop. useful for jailing systems.
  • --refork-as-root โ€” fork()s again before the privileges drop. useful for jailing systems.
  • --re-fork-as-root โ€” fork()s again before the privileges drop. useful for jailing systems.

okay bestie we're back and the option list is still going ๐Ÿ˜ญ like she's not done, she's never done, and honestly? we respect it. buckle up, keep your <rainbow>little notebook out, bc these are all the lifecycle-spot hooks and friends ๐Ÿ’…


  • --refork-post-jail โ€” fork() again after jailing. genuinely useful for jailing systems, no cap ๐Ÿฆ‹
  • --re-fork-post-jail โ€” same energy, fork() again after jailing. also useful for jailing systems โœจ

๐Ÿ’– the hook era ๐Ÿ’–

okay so these all take a hook and run it at a very specific moment in uWSGI's little life. the way that timing is everything โ€” iykyk ๐ŸŽ€

  • --hook-asap โ€” run the specified hook as soon as possible โšก
  • --hook-pre-jail โ€” run the specified hook before jailing ๐Ÿ”’
  • --hook-post-jail โ€” run the specified hook after jailing ๐Ÿ”“
  • --hook-in-jail โ€” run the specified hook in jail after initialization ๐Ÿ 
  • --hook-as-root โ€” run the specified hook before privileges drop ๐Ÿ‘‘
  • --hook-as-user โ€” run the specified hook after privileges drop ๐Ÿ™‹
  • --hook-as-user-atexit โ€” run the specified hook before app exit and reload ๐Ÿšช
  • --hook-pre-app โ€” run the specified hook before app loading ๐Ÿ“ฆ
  • --hook-post-app โ€” run the specified hook after app loading ๐ŸŽ
  • --hook-post-fork โ€” run the specified hook after each fork ๐Ÿด
  • --hook-accepting โ€” run the specified hook after each worker 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 (once per-instance) ๐Ÿ”‚
  • --hook-accepting1-once โ€” run the specified hook after the first worker enters the accepting phase (once per instance) ๐ŸŒŸ
  • --hook-master-start โ€” run the specified hook when the Master starts ๐Ÿ‘‘โœจ
  • --hook-touch โ€” run the specified hook when the specified file is touched (syntax: <file> <action>) ๐Ÿ‘†
  • --hook-emperor-start โ€” run the specified hook when the Emperor starts ๐Ÿฐ
  • --hook-emperor-stop โ€” run the specified hook when the Emperor 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 ๐Ÿซถ (yes bestie, same description, she's giving twin energy)

โšก exec era โšก

same timing drama as the hooks but it runs a command instead of a hook. main character behaviour fr ๐Ÿ’…

  • --exec-asap โ€” run the specified command as soon as possible โšก
  • --exec-pre-jail โ€” run the specified command before jailing ๐Ÿ”’
  • --exec-post-jail โ€” run the specified command after jailing ๐Ÿ”“
  • --exec-in-jail โ€” run the specified command in jail after initialization ๐Ÿ 
  • --exec-as-root โ€” run the specified command before privileges drop ๐Ÿ‘‘
  • --exec-as-user โ€” run the specified command after privileges drop ๐Ÿ™‹
  • --exec-as-user-atexit โ€” run the specified command before app exit and reload ๐Ÿšช
  • --exec-pre-app โ€” run the specified command before app loading ๐Ÿ“ฆ
  • --exec-post-app โ€” run the specified command after app loading ๐ŸŽ
  • --exec-as-vassal โ€” run the specified command before exec()ing the vassal ๐Ÿงš
  • --exec-as-emperor โ€” run the specified command in the emperor after the vassal has been started ๐Ÿ‘‘

๐ŸŒˆ mount / umount era ๐ŸŒˆ

mounting and unmounting filesystems, but make it โœจscheduledโœจ

  • --mount-asap โ€” mount filesystem as soon as possible โšก
  • --mount-pre-jail โ€” mount filesystem before jailing ๐Ÿ”’
  • --mount-post-jail โ€” mount filesystem after jailing ๐Ÿ”“
  • --mount-in-jail โ€” mount filesystem in jail after initialization ๐Ÿ 
  • --mount-as-root โ€” mount filesystem before privileges drop ๐Ÿ‘‘
  • --mount-as-vassal โ€” mount filesystem before exec()ing the vassal ๐Ÿงš
  • --mount-as-emperor โ€” mount filesystem in the emperor after the vassal has been started ๐Ÿ‘‘
  • --umount-asap โ€” unmount filesystem as soon as possible โšก
  • --umount-pre-jail โ€” unmount filesystem before jailing ๐Ÿ”’
  • --umount-post-jail โ€” unmount filesystem after jailing ๐Ÿ”“
  • --umount-in-jail โ€” unmount filesystem in jail after initialization ๐Ÿ 
  • --umount-as-root โ€” unmount filesystem before privileges drop ๐Ÿ‘‘
  • --umount-as-vassal โ€” unmount filesystem before exec()ing the vassal ๐Ÿงš
  • --umount-as-emperor โ€” unmount filesystem in the emperor after the vassal has been started ๐Ÿ‘‘

๐Ÿฆ‹ wait era ๐Ÿฆ‹

bestie just. wait. for the thing. to show up. patience is a vibe ๐Ÿ’œ

  • --wait-for-interface โ€” wait for the specified network interface to come up before running root hooks ๐Ÿ“ก
  • --wait-for-interface-timeout โ€” set the timeout for wait-for-interface โณ
  • --wait-interface โ€” wait for the specified network interface to come up before running root hooks ๐Ÿ“ก
  • --wait-interface-timeout โ€” set the timeout for wait-for-interface โณ
  • --wait-for-iface โ€” wait for the specified network interface to come up before running root hooks ๐Ÿ“ก
  • --wait-for-iface-timeout โ€” set the timeout for wait-for-interface โณ
  • --wait-iface โ€” wait for the specified network interface to come up before running root hooks ๐Ÿ“ก
  • --wait-iface-timeout โ€” set the timeout for wait-for-interface โณ
  • --wait-for-fs โ€” wait for the specified filesystem item to appear before running root hooks ๐Ÿ“
  • --wait-for-file โ€” wait for the specified file to appear before running root hooks ๐Ÿ“„
  • --wait-for-dir โ€” wait for the specified directory to appear before running root hooks ๐Ÿ“‚
  • --wait-for-mountpoint โ€” wait for the specified mountpoint to appear before running root hooks ๐Ÿ”Œ
  • --wait-for-fs-timeout โ€” set the timeout for wait-for-fs/file/dir โณ
  • --wait-for-socket โ€” wait for the specified socket to be ready before loading apps ๐Ÿ”Œ
  • --wait-for-socket-timeout โ€” set the timeout for wait-for-socket โณ

๐ŸŽ€ call era ๐ŸŽ€

like exec, but it calls a function instead of a command. and some of them pass โœจargumentsโœจ so the signature matters, don't skip those ๐Ÿซถ

  • --call-asap โ€” call the specified function as soon as possible โšก
  • --call-pre-jail โ€” call the specified function before jailing ๐Ÿ”’
  • --call-post-jail โ€” call the specified function after jailing ๐Ÿ”“
  • --call-in-jail โ€” call the specified function in jail after initialization ๐Ÿ 
  • --call-as-root โ€” call the specified function before privileges drop ๐Ÿ‘‘
  • --call-as-user โ€” call the specified function after privileges drop ๐Ÿ™‹
  • --call-as-user-atexit โ€” call the specified function before app exit and reload ๐Ÿšช
  • --call-pre-app โ€” call the specified function before app loading ๐Ÿ“ฆ
  • --call-post-app โ€” call the specified function after app loading ๐ŸŽ
  • --call-as-vassal โ€” call the specified function() before exec()ing the vassal ๐Ÿงš
  • --call-as-vassal1 โ€” call the specified function(char *) before exec()ing the vassal ๐Ÿงš
  • --call-as-vassal3 โ€” call the specified function(char *, uid_t, gid_t) before exec()ing the vassal ๐Ÿงš
  • --call-as-emperor โ€” call the specified function() in the emperor after the vassal has been started ๐Ÿ‘‘
  • --call-as-emperor1 โ€” call the specified function(char *) in the emperor after the vassal has been started ๐Ÿ‘‘
  • --call-as-emperor2 โ€” call the specified function(char *, pid_t) in the emperor after the vassal has been started ๐Ÿ‘‘
  • --call-as-emperor4 โ€” call the specified function(char *, pid_t, uid_t, gid_t) in the emperor after the vassal has been started ๐Ÿ‘‘

๐Ÿ“ config loading era ๐Ÿ“

  • --ini โ€” load config from ini file ๐Ÿ“
  • -y, --yaml โ€” load config from yaml file ๐ŸŒธ
  • -y, --yml โ€” load config from yaml file ๐ŸŒธ
  • -j, --json โ€” load config from json file ๐Ÿงพ
  • -j, --js โ€” load config from json file ๐Ÿงพ

โญ modes & weights โญ

  • --weight โ€” weight of the instance (used by clustering/lb/subscriptions) โš–๏ธ
  • --auto-weight โ€” set weight of the instance (used by clustering/lb/subscriptions) automatically ๐Ÿค–
  • --no-server โ€” force no-server mode ๐Ÿšซ
  • --command-mode โ€” force command mode ๐Ÿ’ป

๐Ÿ”ฅ socket behaviour era ๐Ÿ”ฅ

  • --no-defer-accept โ€” disable deferred-accept on sockets ๐Ÿšซ
  • --tcp-nodelay โ€” enable TCP NODELAY on each request ๐Ÿš€
  • --so-keepalive โ€” enable TCP KEEPALIVEs ๐Ÿ’“
  • --so-send-timeout โ€” set SO_SNDTIMEO โณ
  • --socket-send-timeout โ€” set SO_SNDTIMEO โณ
  • --so-write-timeout โ€” set SO_SNDTIMEO โณ
  • --socket-write-timeout โ€” set SO_SNDTIMEO โณ
  • --socket-sndbuf โ€” set SO_SNDBUF ๐Ÿ“ค
  • --socket-rcvbuf โ€” set SO_RCVBUF ๐Ÿ“ฅ
  • --shutdown-sockets โ€” force calling shutdown() in addition to close() when sockets are destroyed ๐Ÿ›‘

๐Ÿ’€ limits & reload drama ๐Ÿ’€

bestie these are the "your worker is eating too much and we must intervene" options. the evil- ones are literally called evil, that's not me being dramatic, that's the actual flag name ๐Ÿ˜ญ
  • --limit-as โ€” limit processes address space/vsz ๐Ÿงฑ
  • --limit-nproc โ€” limit the number of spawnable processes ๐Ÿงฑ
  • --reload-on-as โ€” reload if address space is higher than specified megabytes ๐Ÿ”„
  • --reload-on-rss โ€” reload if rss memory is higher than specified megabytes ๐Ÿ”„
  • --evil-reload-on-as โ€” force the master to reload a worker if its address space is higher than specified megabytes ๐Ÿ˜ˆ
  • --evil-reload-on-rss โ€” force the master to reload a worker if its rss memory is higher than specified megabytes ๐Ÿ˜ˆ
  • --mem-collector-freq โ€” set the memory collector frequency when evil reloads are in place ๐Ÿงน
  • --reload-on-fd โ€” reload if the specified file descriptor is ready ๐Ÿ”„
  • --brutal-reload-on-fd โ€” brutal reload if the specified file descriptor is ready ๐Ÿ’ฅ

๐ŸŒธ kernel & memory era ๐ŸŒธ

  • --ksm โ€” enable Linux KSM ๐Ÿง
  • --pcre-jit โ€” enable pcre jit (if available) โšก
  • --never-swap โ€” lock all memory pages avoiding swapping ๐Ÿ”’

๐Ÿ‘† touch & fs era ๐Ÿ‘†

the "poke a file and something happens" section. it's giving magic button ๐Ÿ”ฎ

  • --touch-reload โ€” reload uWSGI if the specified file is modified/touched ๐Ÿ”„
  • --touch-workers-reload โ€” trigger reload of (only) workers if the specified file is modified/touched ๐Ÿ‘ท
  • --touch-mules-reload โ€” reload mules if the specified file is modified/touched ๐Ÿด
  • --touch-spoolers-reload โ€” reload spoolers if the specified file is modified/touched ๐ŸŒ€
  • --touch-chain-reload โ€” trigger chain reload if the specified file is modified/touched โ›“๏ธ
  • --touch-logrotate โ€” trigger logrotation if the specified file is modified/touched ๐Ÿ“œ
  • --touch-logreopen โ€” trigger log reopen if the specified file is modified/touched ๐Ÿ“‚
  • --touch-exec โ€” run command when the specified file is modified/touched (syntax: file command) ๐Ÿ‘†
  • --touch-signal โ€” signal when the specified file is modified/touched (syntax: file signal) ๐Ÿ‘†
  • --fs-reload โ€” graceful reload when the specified filesystem object is modified ๐ŸŒฟ
  • --fs-brutal-reload โ€” brutal reload when the specified filesystem object is modified ๐Ÿ’ฅ
  • --fs-signal โ€” raise a uwsgi signal when the specified filesystem object is modified (syntax: file signal) ๐Ÿ“ถ

and bestieโ€ฆ we're still not done ๐Ÿ˜ญ she keeps going. next part, yeah? ๐Ÿซถ

  • --check-mountpoint โ€” if a filesystem stops being reachable, the instance gets destroyed. lowkey a lifesaver for reliable Fuse management ๐Ÿ’…
  • --mountpoint-check โ€” same exact vibe: filesystem goes unreachable โ†’ instance destroyed. yes bestie, it's a twin, not a typo, they're both here. useful for reliable Fuse management ๐Ÿฆ‹
  • --check-mount โ€” you guessed it: filesystem unreachable โ†’ instance destroyed. (reliable Fuse management agenda โœจ)
  • --mount-check โ€” and the fourth twin of the family: unreachable filesystem = destroyed instance. useful for reliable Fuse management ๐ŸŽ€
  • --propagate-touch โ€” an over-engineering option, fr fr, made for systems with flaky signal management ๐Ÿ™ˆ
  • --limit-post โ€” caps the request body. that's it, that's the whole girl โœ‹
  • --no-orphans โ€” workers get auto-killed if the master dies. > heads up bestie: this can be dangerous for availability, so don't just turn it on and forget it ๐Ÿ’€
  • --prio โ€” set processes/threads priority ๐Ÿ‘‘
  • --cpu-affinity โ€” set cpu affinity ๐ŸŒธ
  • --post-buffering โ€” set the size in bytes after which stuff gets buffered to disk instead of memory ๐Ÿ’พ
  • --post-buffering-bufsize โ€” set the buffer size for read() when you're in post buffering mode ๐Ÿ“
  • --body-read-warning โ€” set how much memory allocation (in megabytes) is allowed for a request body before it starts printing a warning at you ๐Ÿ“ข
  • --upload-progress โ€” enables creation of .json files in the directory you specify, while a file upload is happening ๐ŸŒ€
  • --no-default-app โ€” do not fallback to default app. no plan B energy ๐Ÿšซ
  • --manage-script-name โ€” automatically rewrites SCRIPT_NAME and PATH_INFO โœจ
  • --ignore-script-name โ€” ignore SCRIPT_NAME entirely ๐Ÿ™ˆ
  • --catch-exceptions โ€” report the exception as http output. > discouraged โ€” use only for testing, okay? it's giving debugging-only ๐Ÿ”ฌ
  • --reload-on-exception โ€” reload a worker whenever an exception is raised ๐Ÿ”„
  • --reload-on-exception-type โ€” reload a worker when a specific exception type gets raised ๐ŸŽฏ
  • --reload-on-exception-value โ€” reload a worker when a specific exception value gets raised ๐ŸŽฏ
  • --reload-on-exception-repr โ€” reload a worker when a specific exception type+value (language-specific, iykyk) gets 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 name, we love options) ๐Ÿšจ
  • --alarm-metric โ€” add a metric threshold/alarm (third alias, iconic behavior) ๐Ÿšจ
  • --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 (yes, the singular twin) ๐Ÿ“
  • --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 specify ๐Ÿ“ก
  • --stats โ€” enable the stats server on the specified address ๐Ÿ“ˆ
  • --stats-server โ€” enable the stats server on the specified address (same energy, different spelling) ๐Ÿ“ˆ
  • --stats-http โ€” prefix the stats server json output with http headers ๐ŸŒ
  • --stats-minified โ€” minify the statistics json output ๐Ÿ—œ๏ธ
  • --stats-min โ€” minify statistics json output (the short queen) ๐Ÿ—œ๏ธ
  • --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 bestie, same deal) โฑ๏ธ
  • --stats-no-cores โ€” disable generation of cores-related stats ๐Ÿšซ
  • --stats-no-metrics โ€” do not include metrics in the stats output ๐Ÿ™…
  • --multicast โ€” subscribe to the multicast group you specify ๐Ÿ“ป
  • --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 โ€” became a member of a legion โš”๏ธ
  • --legion-mcast โ€” became a member of a legion, but the shortcut way (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 amount of seconds you specify if one of the lord hooks fails ๐Ÿ’€
  • --legion-skew-tolerance โ€” set the clock skew tolerance of the legion subsystem (default 30 seconds) ๐Ÿ•ฐ๏ธ
  • --legion-lord โ€” action to call on Lord election ๐Ÿ‘‘
  • --legion-unlord โ€” action to call on Lord dismiss ๐Ÿ‘‹
  • --legion-setup โ€” action to call on legion setup ๐Ÿ› ๏ธ
  • --legion-death โ€” action to call on legion death (that's the shutdown of the instance, dramatic but accurate) โšฐ๏ธ
  • --legion-join โ€” action to call on legion join (first time quorum is reached) ๐Ÿค
  • --legion-node-joined โ€” action to call on a new node joining the legion ๐ŸŽ‰
  • --legion-node-left โ€” action to call on a node leaving the legion ๐Ÿšช
  • --legion-quorum โ€” set the quorum of a legion ๐Ÿ—ณ๏ธ
  • --legion-scroll โ€” set the scroll of a legion ๐Ÿ“œ
  • --legion-scroll-max-size โ€” set max size of the legion scroll buffer ๐Ÿ“ฆ
  • --legion-scroll-list-max-size โ€” set 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 signature check for the uid you specify 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 subscription server you specify ๐Ÿ“จ
  • --st โ€” subscribe to the specified subscription server (the shortest icon in the set, love that for her) ๐Ÿ“จ
  • --subscribe โ€” subscribe to the specified subscription server ๐Ÿ“จ
  • --subscribe2 โ€” subscribe to the specified subscription server, but with the advanced keyval syntax โœจ
  • --subscribe-freq โ€” send subscription announce at the interval you specify ๐Ÿ•
  • --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 don't actually send them (useful with master fifo) ๐Ÿคซ
  • --subscribe-with-modifier1 โ€” force the specififed modifier1 when subscribing (yes, that's exactly how the original spells it, and yes, we're keeping it character for character ๐Ÿ˜ญ)
  • --snmp โ€” enable the embedded snmp server ๐ŸŒฒ
  • --snmp-community โ€” set the snmp community string ๐Ÿ”ค
  • --ssl-verbose โ€” be verbose about SSL errors ๐Ÿ“ข
  • --ssl-verify-depth โ€” set maximum certificate verification depth ๐ŸŠ
  • --sni โ€” add an SNI-governed SSL context ๐Ÿชช
  • --sni-dir โ€” check for cert/key/client_ca file in the directory you specify and create a sni/ssl context on demand ๐Ÿ—‚๏ธ
  • --sni-dir-ciphers โ€” set ssl ciphers for the sni-dir option ๐Ÿ”
  • --ssl-enable3 โ€” enable SSLv3. > insecure, bestie, we said it ๐Ÿšจ
  • --ssl-enable-sslv3 โ€” enable SSLv3. > again: insecure ๐Ÿšจ
  • --ssl-enable-tlsv1 โ€” enable TLSv1. > and again: insecure ๐Ÿšจ
  • --ssl-option โ€” set a raw ssl option (numeric value) ๐Ÿ”ข
  • --sni-regexp โ€” add an SNI-governed SSL context (the key is a regexp) ๐Ÿง 
  • --ssl-tmp-dir โ€” store ssl-related temp files in the directory you specify ๐Ÿ—„๏ธ
  • --check-interval โ€” set the interval (in seconds) of master checks โฑ๏ธ
  • --forkbomb-delay โ€” sleep for the number of seconds you specify when a forkbomb is detected ๐Ÿ’ฃ๐Ÿ˜ด
  • --binary-path โ€” force binary path ๐Ÿ“
  • --privileged-binary-patch โ€” patch the uwsgi binary with a new command (before privileges drop) ๐Ÿฉน
  • --unprivileged-binary-patch โ€” patch the uwsgi binary with a new command (after privileges drop) ๐Ÿฉน
  • --privileged-binary-patch-arg โ€” patch the uwsgi binary with a new command and arguments (before privileges drop) ๐Ÿฉน
  • --unprivileged-binary-patch-arg โ€” patch the uwsgi binary with a new command and arguments (after privileges drop) ๐Ÿฉน
  • --async โ€” enable async mode with the number of cores you specify โšก
  • --max-fd โ€” set maximum number of file descriptors. > requires root privileges ๐Ÿ‘‘
  • --logto โ€” set logfile/udp address ๐Ÿ“
  • --logto2 โ€” log to the file or udp address you specify after privileges drop ๐Ÿ“
  • --log-format โ€” set advanced format for request logging ๐ŸŽจ
  • --logformat โ€” set advanced format for request logging (the no-dash twin) ๐ŸŽจ
  • --logformat-strftime โ€” apply strftime to logformat output ๐Ÿ•ฐ๏ธ
  • --log-format-strftime โ€” apply strftime to logformat output ๐Ÿ•ฐ๏ธ
  • --logfile-chown โ€” chown logfiles ๐Ÿ‘ค
  • --logfile-chmod โ€” chmod logfiles ๐Ÿ”ง
  • --log-syslog โ€” log to syslog ๐Ÿ“ฎ
  • --log-socket โ€” send logs to the socket you specify ๐Ÿ”Œ
  • --req-logger โ€” set/append a request logger ๐Ÿชต
  • --logger-req โ€” set/append a request logger (alias bestie) ๐Ÿชต
  • --logger โ€” set/append a logger ๐Ÿชต
  • --logger-list โ€” list enabled loggers ๐Ÿ“‹
  • --loggers-list โ€” list 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 (meaning: do not show) log lines matching the regexp you specify ๐Ÿšฐ
  • --log-filter โ€” show only log lines matching the regexp you specify ๐Ÿ”
  • --log-route โ€” log to the named logger you specify if the regexp applied on the logline matches ๐Ÿ›ฃ๏ธ
  • --log-req-route โ€” log requests to the named logger you specify 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> โฐ
  • --alarm-cheap โ€” use the main alarm thread rather than creating dedicated threads for curl-based alarms ๐Ÿ’ธ
  • --alarm-freq โ€” tune the anti-loop alarm system (default 3 seconds) ๐Ÿ”
  • --alarm-fd โ€” raise the alarm you specify when an fd is read for read (by default it reads 1 byte, set 8 for eventfd) ๐Ÿšจ
  • --alarm-segfault โ€” raise the alarm you specify when the segmentation fault handler is executed ๐Ÿ’ฅ
  • --segfault-alarm โ€” bestie, when the segfault handler kicks in, raise the alarm you picked. it's giving "tell me when it all goes wrong" ๐Ÿ’€
  • --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 (same vibe, different name, both valid) โœจ
  • --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, no cap ๐ŸŽ€
  • --log-alarm โ€” raise the specified alarm when a log line matches the regexp you gave. syntax is exactly this, don't freestyle it: <alarm>[,alarm...] <regexp> ๐Ÿ’–
  • --alarm-log โ€” raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp> โ€” yes it's the same as above, they're twins ๐Ÿ‘‘
  • --not-log-alarm โ€” the opposite energy: skip the specified alarm when a log line matches that 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 thing, different spelling ๐Ÿ’œ
  • --alarm-list โ€” list out all the enabled alarms, like a little roll call ๐Ÿ“‹
  • --alarms-list โ€” list enabled alarms (plural girlies, same result) โœจ
  • --alarm-msg-size โ€” set the max size of an alarm message. default is 8192, fyi ๐Ÿ“
  • --log-master โ€” delegate logging to the master process. let the main character handle it ๐Ÿ‘‘
  • --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 start, clean slate ๐Ÿงผ
  • --log-maxsize โ€” set the maximum logfile size ๐Ÿ“ฆ
  • --log-backupname โ€” set the logfile name to use after rotation ๐Ÿ”
  • --logdate โ€” prefix your logs with a date, or a strftime string ๐Ÿ—“๏ธ
  • --log-date โ€” prefix logs with date or a strftime string (same deal, dash edition) ๐Ÿ’ซ
  • --log-prefix โ€” prefix logs with a string of your choosing ๐Ÿท๏ธ
  • --log-zero โ€” log responses that have no body ๐Ÿ‘ป
  • --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 requestes bigger than the specified size (typo is theirs, keeping it, character for character bestie ๐Ÿ˜ญ) ๐Ÿ“
  • --log-sendfile โ€” log sendfile requests ๐Ÿ“ค
  • --log-ioerror โ€” log requests that hit io errors โš ๏ธ
  • --log-micros โ€” report response time in microseconds instead of milliseconds. so precise โฑ๏ธ
  • --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 ๐Ÿ˜ณ (yes, root. be careful.)
  • --drop-after-init โ€” run the privileges drop after plugin initialization. note: superseded by drop-after-apps โฌ‡๏ธ
  • --drop-after-apps โ€” run the privileges drop after apps loading. note: superseded by master-as-root โฌ‡๏ธ
  • --force-cwd โ€” force the initial working directory to whatever value you hand it ๐Ÿ“
  • --binsh โ€” override /bin/sh (it's used by exec hooks, and it always fallback 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 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 the algorithm used for adaptive process spawning ๐Ÿง 
  • --cheaper-step โ€” 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 (yes, again, they're aliases) ๐Ÿ“œ
  • --cheaper-list โ€” list enabled cheapers algorithms ๐Ÿ“œ
  • --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 ๐Ÿ›‘
  • --idle โ€” set idle mode (put uWSGI in cheap mode after inactivity) ๐Ÿ˜ด
  • --die-on-idle โ€” shutdown uWSGI when it's idle ๐Ÿ’€
  • --mount โ€” load an application under a mountpoint ๐Ÿ“Œ
  • --worker-mount โ€” load application under mountpoint in the specified worker, or after workers spawn ๐Ÿ“Œ
  • --threads โ€” run each worker in prethreaded mode with the number of threads you specify ๐Ÿงต
  • --thread-stacksize โ€” set threads stacksize ๐Ÿ“š
  • --threads-stacksize โ€” set threads stacksize ๐Ÿ“š
  • --thread-stack-size โ€” set threads stacksize ๐Ÿ“š
  • --threads-stack-size โ€” set threads stacksize ๐Ÿ“š (four ways to say the same thing, iconic honestly)
  • --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, but the 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 ๐Ÿ“‹ (plural twin, same energy)
  • --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 the websockets ping/pong subsystem ๐Ÿ“
  • --websocket-pong-tolerance โ€” set the tolerance (in seconds) of the websockets ping/pong subsystem ๐Ÿ“
  • --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) ๐Ÿ“ฆ
  • --chunked-input-limit โ€” set the max size of a chunked input part (default 1MB, in bytes) ๐Ÿงฉ
  • --chunked-input-timeout โ€” set the default timeout for chunked input โณ
  • --clock โ€” set a clock source โฐ
  • --clock-list โ€” list enabled clocks ๐Ÿ•ฐ๏ธ
  • --clocks-list โ€” list enabled clocks ๐Ÿ•ฐ๏ธ
  • --add-header โ€” automatically add HTTP headers to the response โž•
  • --rem-header โ€” automatically remove the specified HTTP header from the response โž–
  • --del-header โ€” automatically remove specified HTTP header from the response โž–
  • --collect-header โ€” store the specified response header in a request var. syntax: header var ๐Ÿ“ฅ
  • --response-header-collect โ€” store the specified response header in a request var (syntax: header var) ๐Ÿ’–
  • --pull-header โ€” store the specified response header in a request var and remove it from the response (syntax: header var) โœจ
  • --check-static โ€” check for static files in the specified directory ๐ŸŽ€
  • --check-static-docroot โ€” check for static files in the requested DOCUMENT_ROOT ๐Ÿฆ‹
  • --static-check โ€” check for static files in the specified directory ๐ŸŒธ
  • --static-map โ€” map mountpoint to static directory (or file) ๐Ÿ’…
  • --static-map2 โ€” like static-map but completely appending the requested resource to the docroot ๐Ÿ”ฅ
  • --static-skip-ext โ€” skip specified extension from staticfile checks ๐Ÿ‘‘
  • --static-index โ€” search for specified file if a directory is requested ๐ŸŒˆ
  • --static-safe โ€” skip security checks if the file is under the specified path โญ
  • --static-cache-paths โ€” put resolved paths in the uWSGI cache for the specified amount of seconds ๐Ÿ’€
  • --static-cache-paths-name โ€” use the specified cache for static paths ๐Ÿ™ˆ
  • --mimefile โ€” set mime types file path (default /etc/mime.types) ๐Ÿ“
  • --mime-file โ€” set mime types file path (default /etc/mime.types) ๐Ÿงš
  • --static-expires-type โ€” set the Expires header based on content type ๐Ÿ’œ
  • --static-expires-type-mtime โ€” set the Expires header based on content type and file mtime โœจ
  • --static-expires โ€” set the Expires header based on filename regexp ๐ŸŽ€
  • --static-expires-mtime โ€” set the Expires header based on filename regexp and file mtime ๐Ÿฆ‹
  • --static-expires-uri โ€” set the Expires header based on REQUEST_URI regexp ๐ŸŒธ
  • --static-expires-uri-mtime โ€” set the Expires header based on REQUEST_URI regexp and file mtime ๐Ÿ’…
  • --static-expires-path-info โ€” set the Expires header based on PATH_INFO regexp ๐Ÿ”ฅ
  • --static-expires-path-info-mtime โ€” set 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 โ€” check for a gzip version of all requested static files โญ
  • --static-gzip-dir โ€” check for a gzip version of all requested static files in the specified dir/prefix ๐Ÿ’€
  • --static-gzip-prefix โ€” check for a gzip version of all requested static files in the specified dir/prefix ๐Ÿ™ˆ
  • --static-gzip-ext โ€” check for a gzip version of all requested static files with the specified ext/suffix ๐Ÿ“
  • --static-gzip-suffix โ€” check for a gzip version of all requested static files with the specified ext/suffix ๐Ÿงš
  • --honour-range โ€” enable support for the HTTP Range header ๐Ÿ’œ
  • --offload-threads โ€” set the number of offload threads to spawn (per-worker, default 0) โœจ
  • --offload-thread โ€” set the number of offload threads to spawn (per-worker, default 0) ๐ŸŽ€
  • --file-serve-mode โ€” set static file serving mode ๐Ÿฆ‹
  • --fileserve-mode โ€” set static file serving mode ๐ŸŒธ
  • --disable-sendfile โ€” disable sendfile() and rely on boring read()/write() ๐Ÿ’…
  • --check-cache โ€” check for response data in the specified cache (empty for default cache) ๐Ÿ”ฅ
  • --close-on-exec โ€” set close-on-exec on connection sockets (could be required for spawning processes in requests) ๐Ÿ‘‘
  • --close-on-exec2 โ€” set close-on-exec on server sockets (could be required for spawning processes in requests) ๐ŸŒˆ
  • --mode โ€” set uWSGI custom mode โญ
  • --env โ€” set environment variable ๐Ÿ’€
  • --envdir โ€” load a daemontools compatible envdir ๐Ÿ™ˆ
  • --early-envdir โ€” load a daemontools compatible envdir ASAP ๐Ÿ“
  • --unenv โ€” unset environment variable ๐Ÿงš
  • --vacuum โ€” try to remove all of the generated file/sockets ๐Ÿ’œ
  • --file-write โ€” write the specified content to the specified file (syntax: file=value) before privileges drop โœจ
  • --cgroup โ€” put the processes in the specified cgroup ๐ŸŽ€
  • --cgroup-opt โ€” set value in specified cgroup option ๐Ÿฆ‹
  • --cgroup-dir-mode โ€” set permission for cgroup directory (default is 700) ๐ŸŒธ
  • --namespace โ€” run in a new namespace under the specified rootfs ๐Ÿ’…
  • --namespace-keep-mount โ€” keep the specified mountpoint in your namespace ๐Ÿ”ฅ
  • --ns โ€” run in a new namespace under the specified rootfs ๐Ÿ‘‘
  • --namespace-net โ€” add network namespace ๐ŸŒˆ
  • --ns-net โ€” add network namespace โญ
  • --enable-proxy-protocol โ€” enable PROXY1 protocol support (only for http parsers) ๐Ÿ’€
  • --reuse-port โ€” enable REUSE_PORT flag on socket (BSD only) ๐Ÿ™ˆ
  • --tcp-fast-open โ€” enable TCP_FASTOPEN flag on TCP sockets with the specified qlen value ๐Ÿ“
  • --tcp-fastopen โ€” enable TCP_FASTOPEN flag on TCP sockets with the specified qlen value ๐Ÿงš
  • --tcp-fast-open-client โ€” use sendto(..., MSG_FASTOPEN, ...) instead of connect() if supported ๐Ÿ’œ
  • --tcp-fastopen-client โ€” use sendto(..., MSG_FASTOPEN, ...) instead of connect() if supported โœจ
  • --zerg โ€” attach to a zerg server ๐ŸŽ€
  • --zerg-fallback โ€” fallback to normal sockets if the zerg server is not available ๐Ÿฆ‹
  • --zerg-server โ€” enable the zerg server on the specified UNIX socket ๐ŸŒธ
  • --cron โ€” add a cron task ๐Ÿ’…
  • --cron2 โ€” add a cron task (key=val syntax) ๐Ÿ”ฅ
  • --unique-cron โ€” add a unique cron task ๐Ÿ‘‘
  • --cron-harakiri โ€” set the maximum time (in seconds) we wait for cron command to complete ๐ŸŒˆ
  • --legion-cron โ€” add a cron task runnable only when the instance is a lord of the specified legion โญ
  • --cron-legion โ€” add a cron task runnable only when the instance is a lord of the specified legion ๐Ÿ’€
  • --unique-legion-cron โ€” add a unique cron task runnable only when the instance is a lord of the specified legion ๐Ÿ™ˆ
  • --unique-cron-legion โ€” add a unique cron task runnable only when the instance is a lord of the specified legion ๐Ÿ“
  • --loop โ€” select the uWSGI loop engine ๐Ÿงš
  • --loop-list โ€” list enabled loop engines ๐Ÿ’œ
  • --loops-list โ€” list enabled loop engines โœจ
  • --worker-exec โ€” run the specified command as worker ๐ŸŽ€
  • --worker-exec2 โ€” run the specified command as worker (after post_fork hook) ๐Ÿฆ‹
  • --attach-daemon โ€” attach a command/daemon to the master process (the command has to not go in background) ๐ŸŒธ
  • --attach-control-daemon โ€” attach 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 โ€” attach a command/daemon to the master process managed by a pidfile (the command has to daemonize) ๐Ÿ”ฅ
  • --smart-attach-daemon2 โ€” attach 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 daemon runs only on legion lord node ๐ŸŒˆ
  • --legion-smart-attach-daemon โ€” same as --smart-attach-daemon but daemon runs only on legion lord node โญ
  • --legion-smart-attach-daemon2 โ€” same as --smart-attach-daemon2 but daemon runs only on 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 โ€” 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 uWSGI plugin search path ๐Ÿฆ‹
  • --plugin-dir โ€” add a directory to uWSGI plugin search path ๐ŸŒธ
  • --plugins-list โ€” list enabled plugins ๐Ÿ’…
  • --plugin-list โ€” list enabled plugins ๐Ÿ”ฅ
  • --autoload โ€” try to automatically load plugins when unknown options are found ๐Ÿ‘‘
  • --dlopen โ€” blindly load a shared library ๐ŸŒˆ
  • --allowed-modifiers โ€” comma separated list of allowed modifiers โญ
  • --remap-modifier โ€” remap request modifier from one id to another ๐Ÿ’€
  • --dump-options โ€” dump the full list of available options ๐Ÿ™ˆ
  • --show-config โ€” show the current config reformatted as ini ๐Ÿ“
  • --binary-append-data โ€” return 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) ๐ŸŒˆ
  • --lua โ€” load lua wsapi app โญ
  • --lua-load โ€” load a lua file ๐Ÿ’€
  • --lua-shell โ€” run the lua interactive shell (debug.debug()) ๐Ÿ™ˆ
  • --luashell โ€” run the lua interactive shell (debug.debug()) ๐Ÿ“
  • --lua-gc-freq โ€” set the lua gc frequency (default: 0, runs after every request) ๐Ÿงš

and that's the whole manual page, bestie! no skips, no missing flags, we ate ๐Ÿ’…

This was uwsgi_lua52 version 2.0.21-debian, dated May 2023, from UWSGI_LUA52(1). Go forth and configure with main character energy ๐Ÿซถ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from