UWSGI_PSGI(1)
โจ UWSGI_PSGI(1) โจ
hey bestie, welcome to the UWSGI_PSGI(1) manual page from the User Commands section. this is part 1 of 6, and it's giving "the origin story plus the giant options menu". no cap, every flag is here. ๐
๐ NAME ๐
uwsgi_psgi - fast (pure C), self-healing, developer-friendly WSGI server
๐ฆ SYNOPSIS ๐ฆ
uwsgi-core [options...]
๐ DESCRIPTION ๐
okay so DESCRIPTION is where the options live. it's the whole menu, bestie. let's go in order, no skipping. ๐ซถ
-s,--socketโ bind to the specified UNIX/TCP socket using default protocol ๐ธ-s,--uwsgi-socketโ bind to the specified UNIX/TCP socket using the uwsgi protocol โจ--suwsgi-socketโ bind to the specified UNIX/TCP socket using the uwsgi protocol over SSL ๐ฅ--ssl-socketโ bind to the specified UNIX/TCP socket using the uwsgi protocol over SSL ๐--http-socketโ bind to the specified UNIX/TCP socket using the HTTP protocol ๐--http-socket-modifier1โ force the specifiedmodifier1when using HTTP protocol ๐--http-socket-modifier2โ force the specifiedmodifier2when using HTTP protocol ๐--http11-socketโ bind to the specified UNIX/TCP socket using the HTTP 1.1 (Keep-Alive) protocol โญ--https-socketโ bind to the specified UNIX/TCP socket using the HTTPS protocol โจ--https-socket-modifier1โ force the specifiedmodifier1when using HTTPS protocol ๐--https-socket-modifier2โ force the specifiedmodifier2when using HTTPS protocol ๐--fastcgi-socketโ bind to the specified UNIX/TCP socket using the FastCGI protocol ๐--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using the FastCGI protocol (nph mode) ๐--fastcgi-modifier1โ force the specifiedmodifier1when using FastCGI protocol ๐--fastcgi-modifier2โ force the specifiedmodifier2when using FastCGI protocol ๐--scgi-socketโ bind to the specified UNIX/TCP socket using the SCGI protocol ๐ธ--scgi-nph-socketโ bind to the specified UNIX/TCP socket using the SCGI protocol (nph mode) ๐ธ--scgi-modifier1โ force the specifiedmodifier1when using SCGI protocol ๐--scgi-modifier2โ force the specifiedmodifier2when using SCGI protocol ๐--raw-socketโ bind to the specified UNIX/TCP socket using the RAW protocol ๐ฅ--raw-modifier1โ force the specifiedmodifier1when using RAW protocol ๐--raw-modifier2โ force the specifiedmodifier2when using RAW protocol ๐--puwsgi-socketโ bind to the specified UNIX/TCP socket using the 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) ๐ซถ-p,--processesโ spawn the specified number of workers/processes ๐-p,--workersโ spawn the specified number of workers/processes ๐--thunder-lockโ serializeaccept()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 ๐ด-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 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) ๐--forโ (opt logic) for cycle ๐--for-globโ (opt logic) for cycle (expand glob) ๐--for-timesโ (opt logic) for cycle (expand the specified num to a list starting from 1) ๐--for-readlineโ (opt logic) for cycle (expand the specified file to a list of lines) ๐--endforโ (opt logic) end for cycle ๐--end-forโ (opt logic) end for cycle ๐--if-optโ (opt logic) check for option โ--if-not-optโ (opt logic) check for option โ--if-envโ (opt logic) check for environment variable โ--if-not-envโ (opt logic) check for environment variable โ--ifenvโ (opt logic) check for environment variable โ--if-reloadโ (opt logic) check for reload ๐--if-not-reloadโ (opt logic) check for reload ๐--if-hostnameโ (opt logic) check for hostname ๐--if-not-hostnameโ (opt logic) check for hostname ๐--if-hostname-matchโ (opt logic) try to match hostname against a regular expression ๐--if-not-hostname-matchโ (opt logic) try to match hostname against a regular expression ๐--if-existsโ (opt logic) check for file/directory existence ๐--if-not-existsโ (opt logic) check for file/directory existence ๐--ifexistsโ (opt logic) check for file/directory existence ๐--if-pluginโ (opt logic) check for plugin ๐--if-not-pluginโ (opt logic) check for plugin ๐--ifpluginโ (opt logic) check for plugin ๐--if-fileโ (opt logic) check for file existence ๐--if-not-fileโ (opt logic) check for file existence ๐--if-dirโ (opt logic) check for directory existence ๐--if-not-dirโ (opt logic) check for directory existence ๐--ifdirโ (opt logic) check for directory existence ๐--if-directoryโ (opt logic) check for directory existence ๐--endifโ (opt logic) end if ๐--end-ifโ (opt logic) end if ๐--blacklistโ set options blacklist context โซ--end-blacklistโ clear options blacklist context โซ--whitelistโ set options whitelist context โช--end-whitelistโ clear options whitelist context โช--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 onwrite()/writev()๐ซ--inheritโ use the specified file as config template ๐งฌ--includeโ include the specified file as immediate configuration ๐ฅ--inject-beforeโ inject a text file before the config file (advanced templating) ๐--inject-afterโ inject a text file after the config file (advanced templating) ๐-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 internal buffer size ๐งบ-m,--memory-reportโ enable memory report ๐ง--profilerโ enable the specified profiler ๐-c,--cgi-modeโ force CGI-mode for plugins supporting it ๐-a,--abstract-socketโ force UNIX socket in abstract mode (Linux only) ๐ง-C,--chmod-socketโ chmod-socket ๐-C,--chmodโ chmod-socket ๐--chown-socketโ chown unix sockets ๐ค--umaskโ set umask ๐ญ--freebindโ put socket in freebind mode ๐๏ธ--map-socketโ map sockets to specific workers ๐บ๏ธ-T,--enable-threadsโ enable threads (stub option this is true by default) ๐งต--no-threads-waitโ do not wait for threads cancellation on quit/reload ๐งต--auto-procnameโ automatically set processes name to something meaningful ๐ท๏ธ--procname-prefixโ add a prefix to the process names ๐ท๏ธ--procname-prefix-spacedโ add a spaced prefix to the process names ๐ท๏ธ--procname-appendโ append a string to process names ๐ท๏ธ--procnameโ set process names ๐ท๏ธ--procname-masterโ set master process name ๐-i,--single-interpreterโ do not use multiple interpreters (where available) 1๏ธโฃ--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 become 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โ writes the Emperor's pid into the file u tell it ๐ซถ--emperor-tyrantโ puts the Emperor in Tyrant mode. yes it's literally called that, the drama ๐--emperor-tyrant-nofollowโ when checking for uid/gid in Tyrant mode, don't follow symlinks ๐ซ๐--emperor-statsโ runs the Emperor stats server โจ--emperor-stats-serverโ also runs the Emperor stats server (same energy, different flag name, she contains multitudes ๐ )--early-emperorโ spawns the emperor as soon as possible, no waiting around ๐โโ๏ธ๐จ--emperor-broodlordโ runs the emperor in BroodLord mode ๐ฆ--emperor-throttleโ sets the throttling level (in milliseconds) for badly-behaving vassals. default is1000โฑ๏ธ--emperor-max-throttleโ sets the max throttling level (in milliseconds) for badly-behaving vassals. default is3 minutes๐ค--emperor-magic-execโ prefixes vassals' config files withexec://if they have the executable bit ๐ช--emperor-on-demand-extensionโ searches for a text file (vassal name + extension) holding the on demand socket name ๐--emperor-on-demand-extโ same thing, short spelling, still searching for that text file (vassal name + extension) with the on demand socket name ๐--emperor-on-demand-directoryโ turns on on demand mode, binding to the unix socket in the directory u specify, named like the vassal +.socket๐งฆ--emperor-on-demand-dirโ the short-name twin: on demand mode, unix socket in the specified directory, named like the vassal +.socket๐--emperor-on-demand-execโ uses the output of the command u give as the on demand socket name (the vassal name gets passed as the only argument) ๐ซก--emperor-extra-extensionโ allows the specified extension in the Emperor (the vassal gets called with--config) ๐--emperor-extra-extโ same deal, abbreviated: allows the specified extension in the Emperor (vassal called with--config) โจ--emperor-no-blacklistโ disables the Emperor blacklisting subsystem ๐ซ๐--emperor-use-cloneโ usesclone()instead offork(), passing the unshare() flags u specify ๐ฑ--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 into vassals config (uses--includeinstead of--inherit) ๐งฌ--vassals-inherit-beforeโ adds config templates to vassals config (uses--inherit, and parses before the vassal file) โฎ๏ธ--vassals-include-beforeโ includes config templates into vassals config (uses--includeinstead of--inherit, and parses before the vassal file) โฎ๏ธ--vassals-start-hookโ runs the command u specify before each vassal starts ๐--vassals-stop-hookโ runs the command u specify after a vassal's death ๐ชฆ--vassal-sosโ asks the emperor for reinforcement when overloaded ๐--vassal-sos-backlogโ asks the emperor for sos if the backlog queue has more items than the value u specify ๐๐--vassals-setโ automatically sets the option u specify (via--set) for every vassal ๐๏ธ--vassal-setโ automatically sets the option u specify (via--set) for every vassal ๐๏ธ--heartbeatโ announces healthiness to the emperor ๐
--reload-mercyโ sets the max time (in seconds) we wait for workers and other processes to die during reload/shutdown โณ--worker-reload-mercyโ sets the max time (in seconds) a worker can take to reload/shutdown (default is60) โณ--mule-reload-mercyโ sets the max time (in seconds) a mule can take to reload/shutdown (default is60) โณ--exit-on-reloadโ forces exit even if a reload is requested ๐ช--die-on-termโ exit instead of brutal reload onSIGTERM๐--force-gatewayโ forces the spawn of the first registered gateway without a master ๐-h|--helpโ show this help ๐-h|--usageโ show this help ๐--print-symโ prints the content of the binary symbol u specify ๐--print-symbolโ prints the content of the binary symbol u specify ๐-r|--reaperโ callswaitpid(-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 themax_requestsvalue of each worker โ--min-worker-lifetimeโ number of seconds a worker must run before being reloaded (default is10) โฒ๏ธ--max-worker-lifetimeโ reloads workers after the specified amount of seconds (default is disabled) โฒ๏ธ--max-worker-lifetime-deltaโ adds(worker_id * delta)seconds to themax_worker_lifetimevalue 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โ set the ipcsem key viaftok()for avoiding duplicates ๐--persistent-ipcsemโ do not remove ipcsem's on shutdown ๐งท-A|--sharedareaโ creates a raw shared memory area of the specified pages (note: it supports keyval too) ๐ง--safe-fdโ do not close the file descriptor u specify ๐--fd-safeโ do not close the file descriptor u specify ๐
--cacheโ creates a shared cache containing the given elements ๐พ--cache-blocksizeโ sets cache blocksize ๐งฑ--cache-storeโ enables persistent cache to disk ๐ฝ--cache-store-syncโ sets the 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 (default3 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 u specify ๐ก--cache-udp-nodeโ sends cache update/deletion to the cache udp server u specify ๐ก--cache-syncโ copies the whole content of another uWSGI cache server on server startup ๐ซ--cache-use-last-modifiedโ updateslast_modified_attimestamp 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 the frequency of sync for persistent queue ๐
-Q|--spoolerโ runs a spooler on the directory u specify ๐๏ธ--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โchdir()s to the directory u specify before each spooler task ๐--spooler-processesโ sets the number of processes for spoolers ๐ฏ--spooler-quietโ do not be verbose with spooler tasks ๐คซ--spooler-max-tasksโ sets the max number of tasks to run before recycling a spooler โป๏ธ--spooler-harakiriโ sets harakiri timeout for spooler tasks ๐ก๏ธ--spooler-frequencyโ sets spooler frequency ๐ถ--spooler-freqโ sets spooler frequency ๐ถ--muleโ add a mule ๐ด--mulesโ add the specified number of mules ๐ด๐ด๐ด--farmโ add a mule farm ๐--mule-msg-sizeโ sets mule message buffer size ๐จ--signalโ send 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 file u specify before starting, and exits if it's locked ๐--flock-waitโ locks the file u specify before starting, and waits if it's locked โณ๐--flock2โ locks the file u specify after logging/daemon setup, exits if it's locked ๐--flock-wait2โ locks the file u specify after logging/daemon setup, 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 u specify ๐ฐ--pivot-rootโpivot_root()s to the directories u specify (new_rootandput_oldmust be separated with a space) ๐ณ--pivot_rootโpivot_root()s to the directories u specify (new_rootandput_oldmust be separated with a space) ๐ณ--uidโ setuid to the user/uid u specify ๐ค--gidโ setgid to the group/gid u specify ๐ฅ--add-gidโ adds the group id u specify to the process credentials โ๐ฅ--immediate-uidโ setuid to the user/uid u specify IMMEDIATELY โผ๏ธ๐ค--immediate-gidโ setgid to the group/gid u specify IMMEDIATELY โผ๏ธ๐ฅ--no-initgroupsโ disables additional groups set viainitgroups()๐ซ๐ฅ--capโ set process capability ๐--unshareโunshare()s part of the processes and puts it in a new namespace ๐--unshare2โunshare()s part of the processes and puts it in a new namespace after the rootfs change ๐--setns-socketโ exposes a unix socket returning namespace fds from/proc/self/ns๐งต--setns-socket-skipโ skips the entry u specify when sending setns file descriptors โญ๏ธ--setns-skipโ skips the entry u specify when sending setns file descriptors โญ๏ธ--setnsโ joins a namespace created by an external uWSGI instance ๐ซ--setns-preopenโ opens/proc/self/nsas soon as possible and caches fds ๐โก--jailedโ mark the instance as jailed (this forces thepost_jailhooks to actually run) ๐--reforkโfork()again after privileges drop. literally made for jailing systems ๐--re-forkโ same exact thing as--refork, just spelled differently:fork()again after privileges drop, for jailing systems. pick whichever one your fingers like โจ--refork-as-rootโfork()again before privileges drop. jailing systems stay winning ๐ซถ--re-fork-as-rootโ the hyphenated twin of--refork-as-root:fork()again before privileges drop, still for jailing systems ๐--refork-post-jailโfork()again after jailing. jail girlies, this one's for you ๐--re-fork-post-jailโ yes bestie it's the same as--refork-post-jail:fork()again after jailing ๐
โจ the hook options (aka the "run this exact thing at this exact moment" era) โจ
--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 is<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 beforeexec()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 (yep, same energy as the one above ๐ )
โจ then we have the exec twins of every single one of those โจ
--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 beforeexec()ing the vassal--exec-as-emperorโ run the specified command in the emperor after the vassal has been started
โจ mount, but make it timed โจ
--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 beforeexec()ing the vassal--mount-as-emperorโ mount filesystem in the emperor after the vassal has been started
โจ and now the unmount arc ๐ (yes it's the same list but backwards)
--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 beforeexec()ing the vassal--umount-as-emperorโ unmount filesystem in the emperor after the vassal has been started
โจ waiting era (patience is a personality trait) โจ
--wait-for-interfaceโ wait for the specified network interface to come up before running root hooks ๐--wait-for-interface-timeoutโ set the timeout forwait-for-interface--wait-interfaceโ same as--wait-for-interface: wait for the specified network interface to come up before running root hooks--wait-interface-timeoutโ set the timeout forwait-for-interface--wait-for-ifaceโ again, same deal: wait for the specified network interface to come up before running root hooks--wait-for-iface-timeoutโ set the timeout forwait-for-interface--wait-ifaceโ yep, another spelling: wait for the specified network interface to come up before running root hooks--wait-iface-timeoutโ set the timeout forwait-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 forwait-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 forwait-for-socket
โจ call options (the function-calling supremacy) โจ
--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 specifiedfunction()beforeexec()ing the vassal--call-as-vassal1โ call the specifiedfunction(char *)beforeexec()ing the vassal--call-as-vassal3โ call the specifiedfunction(char *, uid_t, gid_t)beforeexec()ing the vassal--call-as-emperorโ call the specifiedfunction()in the emperor after the vassal has been started--call-as-emperor1โ call the specifiedfunction(char *)in the emperor after the vassal has been started--call-as-emperor2โ call the specifiedfunction(char *, pid_t)in the emperor after the vassal has been started--call-as-emperor4โ call the specifiedfunction(char *, pid_t, uid_t, gid_t)in the emperor after the vassal has been started
โจ config loading + instance vibes โจ
--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--weightโ weight of the instance (used by clustering/lb/subscriptions) โ๏ธ--auto-weightโ set the weight of the instance (used by clustering/lb/subscriptions) automatically--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โ setSO_SNDTIMEO--socket-send-timeoutโ setSO_SNDTIMEO--so-write-timeoutโ setSO_SNDTIMEO--socket-write-timeoutโ setSO_SNDTIMEO--socket-sndbufโ setSO_SNDBUF--socket-rcvbufโ setSO_RCVBUF--shutdown-socketsโ force callingshutdown()in addition toclose()when sockets are destroyed ๐
โจ memory, limits and reload behaviour โจ
--limit-asโ limit processes address space/vsz--limit-nprocโ limit the number of spawnable processes--reload-on-asโ reload if address space is higher than specified megabytes--reload-on-rssโ reload if rss memory is higher than specified megabytes--evil-reload-on-asโ force the master to reload a worker if its address space is higher than specified megabytes ๐--evil-reload-on-rssโ force the master to reload a worker if its rss memory is higher than specified megabytes ๐--mem-collector-freqโ set the memory collector frequency when evil reloads are in place--reload-on-fdโ reload if the specified file descriptor is ready--brutal-reload-on-fdโ brutal reload if the specified file descriptor is ready ๐--ksmโ enable Linux KSM--pcre-jitโ enable pcre jit (if available)--never-swapโ lock all memory pages avoiding swapping ๐
โจ touch options (touch grass? no. touch files.) โจ
--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 isfile command๐ซ--touch-signalโ when the file you point at gets modified/touched, it raises a signal. syntax:file signalโจ--fs-reloadโ when the filesystem object you name gets modified, do a graceful reload. soft, gentle, tasteful ๐--fs-brutal-reloadโ same vibe check, but when the filesystem object changes it does a brutal reload. no mercy, no grace ๐--fs-signalโ raise a uwsgi signal when the filesystem object gets modified (syntax:file signal)--check-mountpointโ if a filesystem is no more reachable, it destroys the instance. yes, destroys. it's useful for reliable Fuse management ๐ซถ--mountpoint-checkโ literally the same thing as--check-mountpoint: destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--check-mountโ again bestie, same energy: destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--mount-checkโ the fourth twin ๐ญ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--propagate-touchโ the manual fr calls this an "over-engineering option for system with flaky signal management". take that however you want ๐--limit-postโ limit the request body--no-orphansโ automatically kill workers if the master dies. heads up: this can be dangerous for availability โ ๏ธ--prioโ set processes/threads priority--cpu-affinityโ set cpu affinity--post-bufferingโ set the size in bytes after which it'll buffer to disk instead of memory--post-buffering-bufsizeโ set the buffer size forread()in post buffering mode--body-read-warningโ set the amount of allowed memory allocation (in megabytes) for the request body before it starts printing a warning ๐--upload-progressโ enable creation of.jsonfiles in the specified directory during a file upload ๐--no-default-appโ do not fallback to the default app--manage-script-nameโ automatically rewriteSCRIPT_NAMEandPATH_INFO--ignore-script-nameโ ignoreSCRIPT_NAME--catch-exceptionsโ report the exception as http output. the page itself says discouraged, use only for testing ๐--reload-on-exceptionโ reload a worker whenever 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--alarm-metricโ add a metric threshold/alarm--metrics-dirโ export metrics as text files into the directory you specify--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 the last value taken from the metrics dir--metrics-no-coresโ disable generation of cores-related metrics--udpโ run the udp server on the specified address--statsโ enable the stats server on the specified address--stats-serverโ enable the stats server on the specified address--stats-httpโ prefix the stats server json output with http headers--stats-minifiedโ minify the statistics json output--stats-minโ minify the statistics json output--stats-pushโ push the stats json to the specified destination--stats-pusher-default-freqโ set the default frequency of stats pushers--stats-pushers-default-freqโ set the default frequency of stats pushers--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 (default1)--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 (default60seconds)--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 (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 legion scroll buffer--legion-scroll-list-max-sizeโ set max size of 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 ofSCM_CREDENTIALSin 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--subscribeโ subscribe to the specified subscription server--subscribe2โ subscribe to the specified subscription server using advanced keyval syntax--subscribe-freqโ send a 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 (useful with master fifo)--subscribe-with-modifier1โ force the specififed modifier1 when subscribing (yes, "specififed" โ that's the manpage's own typo, leaving it exactly as found ๐ )--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 forcert/key/client_cafile in the specified directory and create a sni/ssl context on demand โจ--sni-dir-ciphersโ set the ssl ciphers for thesni-diroption--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)--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 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 specified cores--max-fdโ set maximum number of file descriptors (requires root privileges) ๐--logtoโ set logfile/udp address--logto2โ log to the specified file or udp address after privileges drop--log-formatโ set advanced format for request logging--logformatโ set advanced format for request logging--logformat-strftimeโ apply strftime to logformat output--log-format-strftimeโ apply strftime to logformat output--logfile-chownโ chown logfiles--logfile-chmodโ chmod logfiles--log-syslogโ log to syslog--log-socketโ send logs to the specified socket--req-loggerโ set/append a request logger--logger-reqโ set/append a request logger--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 (do not show) log lines matching the specified regexp ๐ซ--log-filterโ show only 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โ callabort()on segfault/fpe, could be useful for generating a core dump--alarmโ create a new alarm, syntax:<alarm> <plugin:args>โฐ--alarm-cheapโ use the main alarm thread instead of spawning dedicated threads for curl-based alarms. thread budget? saved. ๐--alarm-freqโ tune the anti-loop alarm system. default is3seconds, periodt.--alarm-fdโ raise the specified alarm when anfdis read for read. by default it reads1byte, so set8if you're oneventfd. iykyk ๐ซถ--alarm-segfaultโ raise the specified alarm when the segmentation fault handler gets executed ๐ญ--segfault-alarmโ raise the specified alarm when the segmentation fault handler gets executed. same vibe, different name, we love an alias ๐--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. yes bestie, another one ๐--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. the alias family is literally thriving ๐--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>โ the negate version, she said no ๐--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 ๐โจ--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. heads up: bigger log messages will be truncated โ๏ธ--log-master-streamโ create the master logpipe asSOCK_STREAM๐ฆ--log-master-req-streamโ create the master requests logpipe asSOCK_STREAM๐ฆ--log-reopenโ reopen the log after a reload ๐--log-truncateโ truncate the log on startup ๐งน--log-maxsizeโ set maximum logfile size ๐--log-backupnameโ set the logfile name to use after rotation ๐--logdateโ prefix logs with a date or astrftimestring ๐--log-dateโ prefix logs with a date or astrftimestring ๐ ๐--log-prefixโ prefix logs with a string ๐ท๏ธ--log-zeroโ log responses without a body ๐ป--log-slowโ log requests slower than the specified number of milliseconds ๐--log-4xxโ log requests with a4xxresponse ๐ฌ--log-5xxโ log requests with a5xxresponse ๐--log-bigโ log requests bigger than the specified size ๐--log-sendfileโ logsendfilerequests ๐ค--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 theX-Forwarded-Forheader instead ofREMOTE_ADDR๐ต๏ธ
--master-as-rootโ leave the master process running as root ๐ (yes, root root, be careful bestie)--drop-after-initโ run privileges drop after plugin initialization. note: this is superseded bydrop-after-apps๐ฑ--drop-after-appsโ run privileges drop after apps loading. note: this is superseded bymaster-as-root๐ฑ--force-cwdโ force the initial working directory to the specified value ๐--binshโ override/bin/sh. this is used by exec hooks, and it always fallback to/bin/sh๐--chdirโchdirto the specified directory before apps loading ๐--chdir2โchdirto the specified directory after apps loading ๐--lazyโ set lazy mode: load apps in workers instead of the master ๐ด--lazy-appsโ load apps in each worker instead of the master ๐ดโจ--cheapโ set cheap mode: spawn workers only after the first request ๐ธ--cheaperโ set cheaper mode: 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 ๐๐ซ--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 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 ๐ (four spellings, one truth ๐ )--vhostโ enable virtualhosting mode, based on theSERVER_NAMEvariable ๐--vhost-hostโ enable virtualhosting mode, based on theHTTP_HOSTvariable ๐
okay routing section, this is the main character of the options list, buckle up ๐ซถ
--routeโ add a route ๐ฃ๏ธ--route-hostโ add a route based on theHostheader ๐ฃ๏ธ--route-uriโ add a route based onREQUEST_URI๐ฃ๏ธ--route-qsโ add a route based onQUERY_STRING๐ฃ๏ธ--route-remote-addrโ add a route based onREMOTE_ADDR๐ฃ๏ธ--route-user-agentโ add a route based onHTTP_USER_AGENT๐ฃ๏ธ--route-remote-userโ add a route based onREMOTE_USER๐ฃ๏ธ--route-refererโ add a route based onHTTP_REFERER๐ฃ๏ธ--route-labelโ add a routing label, for use withgoto๐ท๏ธ--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 theHostheader ๐--final-route-uriโ add a final route based onREQUEST_URI๐--final-route-qsโ add a final route based onQUERY_STRING๐--final-route-remote-addrโ add a final route based onREMOTE_ADDR๐--final-route-user-agentโ add a final route based onHTTP_USER_AGENT๐--final-route-remote-userโ add a final route based onREMOTE_USER๐--final-route-refererโ add a final route based onHTTP_REFERER๐--final-route-labelโ add a final routing label, for use withgoto๐ท๏ธ๐--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 theHostheader ๐จ--error-route-uriโ add an error route based onREQUEST_URI๐จ--error-route-qsโ add an error route based onQUERY_STRING๐จ--error-route-remote-addrโ add an error route based onREMOTE_ADDR๐จ--error-route-user-agentโ add an error route based onHTTP_USER_AGENT๐จ--error-route-remote-userโ add an error route based onREMOTE_USER๐จ--error-route-refererโ add an error route based onHTTP_REFERER๐จ--error-route-labelโ add an error routing label, for use withgoto๐ท๏ธ๐จ--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 theHostheader ๐ฌ--response-route-uriโ add a response route based onREQUEST_URI๐ฌ--response-route-qsโ add a response route based onQUERY_STRING๐ฌ--response-route-remote-addrโ add a response route based onREMOTE_ADDR๐ฌ--response-route-user-agentโ add a response route based onHTTP_USER_AGENT๐ฌ--response-route-remote-userโ add a response route based onREMOTE_USER๐ฌ--response-route-refererโ add a response route based onHTTP_REFERER๐ฌ--response-route-labelโ add a response routing label, for use withgoto๐ท๏ธ๐ฌ--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 a managed403response ๐ซ--error-page-404โ add an error page (html) for a managed404response ๐--error-page-500โ add an error page (html) for a managed500response ๐ฅ--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: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 ๐๐ฐ๏ธ
okay bestie we're back in the options list, part six, the saga continues ๐
--clocks-listโ lists all the enabled clocks โจ--add-headerโ automatically adds HTTP headers to the response ๐--rem-header,--del-headerโ automatically removes the HTTP header you name from the response ๐งน (yeah it's two names, same exact job, pick your fave)--collect-header,--response-header-collectโ stores the response header you name into a request var. syntax:header var๐--pull-headerโ same stash-it-in-a-request-var energy, BUT it also yanks that header out of the response entirely. syntax:header var๐ซณ--check-static,--static-checkโ checks for static files in the directory you specify ๐--check-static-docrootโ checks for static files inside the requestedDOCUMENT_ROOT๐๏ธ--static-mapโ maps a mountpoint to a static directory (or a file) ๐--static-map2โ like--static-mapexcept it completely appends the requested resource onto the docroot โ--static-skip-extโ skips the extension you give from static file checks ๐ซ--static-indexโ searches for the file you name whenever a directory is requested ๐--static-safeโ skips the security checks if the file lives under the path you specify ๐ก๏ธ (iykyk, be careful with this one)--static-cache-pathsโ puts the resolved paths into the uWSGI cache for however many seconds you say โฑ๏ธ--static-cache-paths-nameโ uses this cache for static paths, bestie ๐ฏ--mimefile,--mime-fileโ sets the mime types file path. default is/etc/mime.types๐--static-expires-typeโ sets theExpiresheader based on content type ๐ฐ๏ธ--static-expires-type-mtimeโ sets theExpiresheader based on content type and the file's mtime ๐ฐ๏ธโ--static-expiresโ sets theExpiresheader based on a filename regexp ๐งฌ--static-expires-mtimeโ sets theExpiresheader based on a filename regexp and the file's mtime ๐งฌโ--static-expires-uriโ sets theExpiresheader based on aREQUEST_URIregexp ๐งฌ--static-expires-uri-mtimeโ sets theExpiresheader based on aREQUEST_URIregexp and the file's mtime ๐งฌโ--static-expires-path-infoโ sets theExpiresheader based on aPATH_INFOregexp ๐งฌ--static-expires-path-info-mtimeโ sets theExpiresheader based on aPATH_INFOregexp and the file's mtime ๐งฌโ--static-gzipโ if the regexp you hand it matches the static file translation, it goes looking for a gzip version ๐๏ธ--static-gzip-allโ checks for a gzip version of literally every requested static file ๐๏ธโจ--static-gzip-dir,--static-gzip-prefixโ checks for a gzip version of all requested static files in the dir/prefix you give ๐๏ธ๐--static-gzip-ext,--static-gzip-suffixโ checks for a gzip version of all requested static files with the ext/suffix you give ๐๏ธ๐ท๏ธ--honour-rangeโ turns on support for the HTTPRangeheader ๐--offload-threads,--offload-threadโ sets how many offload threads to spawn (per-worker, default0) ๐งต--file-serve-mode,--fileserve-modeโ sets the static file serving mode ๐--disable-sendfileโ disablessendfile()and makes it rely on the boring oldread()/write()instead ๐ด--check-cacheโ checks for response data in the cache you specify (leave it empty for the default cache) ๐๏ธ--close-on-execโ sets close-on-exec on connection sockets (could be required for spawning processes in requests) ๐--close-on-exec2โ sets close-on-exec on server sockets (could be required for spawning processes in requests) ๐--modeโ sets a uWSGI custom mode ๐๏ธ--envโ sets an environment variable ๐--envdirโ loads a daemontools compatible envdir ๐ฅ--early-envdirโ loads a daemontools compatible envdir ASAP, like right now, immediately ๐โโ๏ธ--unenvโ unsets an environment variable ๐ฎ--vacuumโ tries to remove all of the generated files/sockets ๐งฝ--file-writeโ writes the content you give to the file you give (syntax:file=value) before privileges drop โ๏ธ--cgroupโ puts the processes in the cgroup you specify ๐ฆ--cgroup-optโ sets a value in the cgroup option you specify โ๏ธ--cgroup-dir-modeโ sets the permission for the cgroup directory (default is700) ๐--namespace,--nsโ runs in a new namespace under the rootfs you specify ๐--namespace-keep-mountโ keeps the mountpoint you name inside your namespace ๐--namespace-net,--ns-netโ adds a network namespace ๐--enable-proxy-protocolโ enables PROXY1 protocol support (only for http parsers, no cap) ๐ซ--reuse-portโ enables theREUSE_PORTflag on the socket (BSD only, sorry bestie) โป๏ธ--tcp-fast-open,--tcp-fastopenโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you give โก--tcp-fast-open-client,--tcp-fastopen-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported ๐--zergโ attaches to a zerg server ๐พ--zerg-fallbackโ falls back to normal sockets if the zerg server isn't available ๐ช--zerg-serverโ enables the zerg server on the UNIX socket you specify ๐--cronโ adds a cron task โฐ--cron2โ adds a cron task (key=val syntax) โฐ๐--unique-cronโ adds a unique cron task โจโฐ--cron-harakiriโ sets the max time (in seconds) we wait for a cron command to complete ๐ก๏ธ--legion-cron,--cron-legionโ adds a cron task that only runs when the instance is a lord of the legion you specify ๐--unique-legion-cron,--unique-cron-legionโ adds a unique cron task that only runs when the instance is a lord of the legion you specify ๐โจ--loopโ selects the uWSGI loop engine ๐--loop-list,--loops-listโ lists the enabled loop engines ๐--worker-execโ runs the command you give as a worker ๐ท--worker-exec2โ runs the command you give as a worker, but after thepost_forkhook ๐ทโ--attach-daemonโ attaches a command/daemon to the master process (and heads up: the command has to not go in background) ๐งท--attach-control-daemonโ attaches a command/daemon to the master process (the command has to not go in background), and when the daemon dies, the master dies too ๐--smart-attach-daemonโ attaches a command/daemon to the master process managed by a pidfile (the command has to daemonize) ๐ง--smart-attach-daemon2โ attaches a command/daemon to the master process managed by a pidfile (the command has to NOT daemonize) ๐ง ๐ซ--legion-attach-daemonโ same as--attach-daemonbut the daemon only runs on the legion lord node ๐--legion-smart-attach-daemonโ same as--smart-attach-daemonbut the daemon only runs on the legion lord node ๐--legion-smart-attach-daemon2โ same as--smart-attach-daemon2but the daemon only runs on the legion lord node ๐--daemons-honour-stdinโ does not change the stdin of external daemons to/dev/null๐ โโ๏ธ--attach-daemon2โ the attach-daemon keyval variant (supports smart modes too) ๐๏ธ--plugins,--pluginโ loads uWSGI plugins ๐งฉ--need-plugins,--need-pluginโ loads uWSGI plugins, and exits on error ๐งฉ๐--plugins-dir,--plugin-dirโ adds a directory to the uWSGI plugin search path ๐--plugins-list,--plugin-listโ lists the enabled plugins ๐--autoloadโ tries to automatically load plugins whenever unknown options pop up ๐ช--dlopenโ blindly loads a shared library ๐ (yes, blindly, that's literally what it says)--allowed-modifiersโ a comma separated list of allowed modifiers โ--remap-modifierโ remaps a request modifier from one id to another ๐--dump-optionsโ dumps the full list of every available option ๐--show-configโ shows the current config, reformatted as ini ๐ช--binary-append-dataโ returns the content of a resource to stdout so you can append it to a uwsgi binary (fordata://usage) ๐--printโ a simple print ๐จ๏ธ--iprintโ a simple print, immediate version ๐จ๏ธโก--exitโ forcesexit()of the instance ๐ช๐--cflagsโ reports the uWSGI CFLAGS (useful for building external plugins) ๐๏ธ--dot-hโ dumps theuwsgi.hused for building the core (useful for building external plugins) ๐๏ธ--config-pyโ dumps theuwsgiconfig.pyused for building the core (useful for building external plugins) ๐๏ธ--build-pluginโ builds a uWSGI plugin for the current binary ๐จ--versionโ prints the uWSGI version ๐ท๏ธ--response-headers-limitโ sets the response header maximum size (default:64k) ๐
and that's a wrap on the whole page bestie, you ATE this documentation ๐โจ this was uwsgi_psgi version 2.0.31-6build1, dated August 2026, and yeah she's long but she's iconic and now she lives rent free in your brain ๐ no cap, go read your config files responsibly ๐ซถ
๐ฆ where this page comes from
- ubuntu stonking: uwsgi-plugin-psgi 2.0.31+6build1+0.0.2build3 ยท GPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms