UWSGI_RACK(1)
โจ UWSGI_RACK(1) โจ
okay bestie, welcome to uwsgi_rack ๐
this is the manual page for it, filed under User Commands, and it's genuinely one of those pages. grab a strawberry drink ๐, we're going through it together.
๐ NAME ๐
uwsgi_rack โ fast (pure C), self-healing, developer-friendly WSGI server ๐ฆ
like. it's a server. it's in pure C. it heals itself. it's nice to devs. that's the whole vibe. no cap.
๐ธ SYNOPSIS ๐ธ
uwsgi-core [options...]
that's it. that's the whole thing. you run it and then you just. keep adding options. forever. iykyk. ๐
๐ DESCRIPTION ๐
so this whole section is basically the giant menu of socket-binding options and process-control options and honestly it's giving "all-you-can-eat buffet but make it sysadmin". every single flag is listed below, in order, no skipping, because i love you and i want you to actually understand it. ๐ซถ
๐ sockets, but make it a whole personality ๐
-s,--socketโ bind to the specified UNIX/TCP socket using the default protocol โจ-s,--uwsgi-socketโ bind to the specified UNIX/TCP socket using theuwsgiprotocol--suwsgi-socketโ bind to the specified UNIX/TCP socket using theuwsgiprotocol over SSL ๐--ssl-socketโ bind to the specified UNIX/TCP socket using theuwsgiprotocol over SSL ๐ (yes it's basically the same energy as the one above, that's just how it is bestie)--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 HTTP 1.1 (Keep-Alive) protocol ๐--https-socketโ bind to the specified UNIX/TCP socket using 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 FastCGI protocol โก--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using 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 SCGI protocol--scgi-nph-socketโ bind to the specified UNIX/TCP socket using 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 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 persistentuwsgiprotocol (puwsgi) ๐--protocolโ force the specified protocol for default sockets--socket-protocolโ force the specified protocol for default sockets (twinning with the one above, we love consistency)--shared-socketโ create a shared socket for advanced jailing or ipc ๐--undeferred-shared-socketโ create a shared socket for advanced jailing or ipc (undeferred mode)
๐ฅ workers, processes & the whole harakiri situation ๐ฅ
-p,--processesโ spawn the specified number of workers/processes ๐ง๐ณ-p,--workersโ spawn the specified number of workers/processes (same energy, different spelling, both valid)--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 (three names, one job, iconic honestly)--backtrace-depthโ set backtrace depth ๐ช--mule-harakiriโ set harakiri timeout for mule tasks ๐ด
๐ config loading & the pluggable system ๐
-x,--xmlconfigโ load config from xml file-x,--xmlโ load config from xml file (same thing, shorter name, we stan options)--configโ load configuration using the pluggable system ๐--fallback-configโ re-exec uwsgi with the specified config when exit code is 1--strictโ enable strict mode (placeholder cannot be used) โ ๏ธ--skip-zeroโ skip check of file descriptor 0--skip-atexitโ skip atexit hooks (ignored by the master)--skip-atexit-teardownโ skip atexit teardown (ignored by the master)
๐ placeholders, custom options & the opt-logic situation ๐
-S,--setโ set a placeholder or an option--set-placeholderโ set a placeholder--set-phโ set a placeholder (short king version)--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
๐ errors, and how much you want to hear about them ๐
--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()
๐ง config templating & injection ๐ง
--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) โจ
๐ daemonizing, and controlling your little instances ๐
-d,--daemonizeโ daemonize uWSGI ๐ด--daemonize2โ daemonize uWSGI after app loading--stopโ stop an instance ๐--reloadโ reload an instance ๐--pauseโ pause an instance โธ๏ธ--suspendโ suspend an instance--resumeโ resume an instance โถ๏ธ--connect-and-readโ connect to a socket and wait for data from it ๐--extractโ fetch/dump any supported address to stdout ๐ค
๐ธ tuning, buffers & memory vibes ๐ธ
-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 (same job, shorter name)--chown-socketโ chown unix sockets--umaskโ set umask--freebindโ put socket in freebind mode--map-socketโ map sockets to specific workers ๐บ๏ธ
๐ซถ threads, process names & being perceived ๐ซถ
-T,--enable-threadsโ enable threads (stub option this is true by default) ๐งต--no-threads-waitโ do not wait for threads cancellation on quit/reload--auto-procnameโ automatically set processes name to something meaningful ๐ท๏ธ--procname-prefixโ add a prefix to the process names--procname-prefix-spacedโ add a spaced prefix to the process names--procname-appendโ append a string to process names--procnameโ set process names--procname-masterโ set master process name-i,--single-interpreterโ do not use multiple interpreters (where available)--need-appโ exit if no app can be loaded โ ๏ธ-M,--masterโ enable master process ๐--honour-stdinโ do not remap stdin to/dev/null
๐ the Emperor & its vassals (yes this is real, yes it's a whole saga) ๐
--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โ writes the Emperor's pid into the file you specify, bestie ๐--emperor-tyrantโ puts the Emperor into Tyrant mode ๐--emperor-tyrant-nofollowโ in Tyrant mode, do not follow symlinks when checking for uid/gid ๐ซ๐--emperor-statsโ runs the Emperor stats server โจ--emperor-stats-serverโ runs the Emperor stats server (same vibe, same job) ๐--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 bad behaving vassals, default1000โณ--emperor-max-throttleโ sets the max throttling level (in milliseconds) for bad behaving vassals, default3 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) containing the on demand socket name ๐--emperor-on-demand-extโ searches for a text file (vassal name + extension) containing the on demand socket name ๐--emperor-on-demand-directoryโ enables on demand mode binding to the unix socket in the specified directory, named like the vassal +.socket๐งฆ--emperor-on-demand-dirโ enables on demand mode binding to the unix socket in the specified directory, named like the vassal +.socket๐งฆ--emperor-on-demand-execโ uses the output of the specified command as on demand socket name; the vassal name is passed as the only argument ๐ซก--emperor-extra-extensionโ allows the specified extension in the Emperor; vassal will be called with--config๐--emperor-extra-extโ allows the specified extension in the Emperor; vassal will be called with--config๐--emperor-no-blacklistโ disables the Emperor blacklisting subsystem ๐ซ๐--emperor-use-cloneโ usesclone()instead offork(), passing the specifiedunshare()flags ๐งฌ--emperor-graceful-shutdownโ uses vassals graceful shutdown during ragnarok ๐--emperor-capโ sets vassals capability ๐ฉ--vassals-capโ sets vassals capability ๐ฉ--vassal-capโ sets vassals capability ๐ฉ--imperial-monitor-listโ lists enabled imperial monitors ๐--imperial-monitors-listโ lists enabled imperial monitors ๐--vassals-inheritโ adds config templates to vassals config, uses--inherit๐--vassals-includeโ includes config templates to vassals config, uses--includeinstead of--inherit๐--vassals-inherit-beforeโ adds config templates to vassals config, uses--inherit, parses before the vassal file โฎ๏ธ--vassals-include-beforeโ includes config templates to vassals config, uses--includeinstead of--inherit, parses before the vassal file โฎ๏ธ--vassals-start-hookโ runs the specified command before each vassal starts ๐--vassals-stop-hookโ runs the specified command after vassal's death ๐ชฆ--vassal-sosโ asks emperor for reinforcement when overloaded ๐--vassal-sos-backlogโ asks emperor for sos if backlog queue has more items than the value specified ๐ฌ--vassals-setโ automatically sets the specified option (via--set) for every vassal ๐ ๏ธ--vassal-setโ automatically sets the specified option (via--set) for every vassal ๐ ๏ธ--heartbeatโ announces healthiness to the emperor ๐--reload-mercyโ sets the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown โฑ๏ธ--worker-reload-mercyโ sets the maximum time (in seconds) a worker can take to reload/shutdown, default is60โฑ๏ธ--mule-reload-mercyโ sets the maximum 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โ exits instead of brutal reload onSIGTERM๐--force-gatewayโ forces the spawn of the first registered gateway without a master ๐-h|--helpโ shows this help ๐-h|--usageโ shows this help ๐--print-symโ prints content of the specified binary symbol ๐ฃ--print-symbolโ prints content of the specified binary symbol ๐ฃ-r|--reaperโ 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โ sets the ipcsem key viaftok()for avoiding duplicates ๐--persistent-ipcsemโ does not remove ipcsem's on shutdown ๐งท-A|--sharedareaโ creates a raw shared memory area of specified pages; note: it supports keyval too ๐ง--safe-fdโ does not close the specified file descriptor ๐ก๏ธ--fd-safeโ does not close the specified file descriptor ๐ก๏ธ--cacheโ creates a shared cache containing given elements ๐๏ธ--cache-blocksizeโ sets cache blocksize ๐งฑ--cache-storeโ enables persistent cache to disk ๐พ--cache-store-syncโ sets frequency of sync for persistent cache ๐--cache-no-expireโ disables auto sweep of expired items ๐งน๐ซ--cache-expire-freqโ sets the frequency of cache sweeper scans, 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 specified socket ๐ก--cache-udp-nodeโ sends cache update/deletion to the specified cache udp server ๐ค--cache-syncโ copies the whole content of another uWSGI cache server on server startup ๐ฆ--cache-use-last-modifiedโ 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 frequency of sync for persistent queue ๐-Q|--spoolerโ runs a spooler on the specified directory ๐๏ธ--spooler-externalโ maps spoolers requests to a spooler directory managed by an external instance ๐--spooler-orderedโ tries to order the execution of spooler tasks ๐--spooler-chdirโchdir()to specified directory before each spooler task ๐--spooler-processesโ sets the number of processes for spoolers ๐ฏ--spooler-quietโ does not be verbose with spooler tasks ๐คซ--spooler-max-tasksโ sets the maximum number of tasks to run before recycling a spooler โป๏ธ--spooler-harakiriโ sets harakiri timeout for spooler tasks ๐ก๏ธ--spooler-frequencyโ sets spooler frequency ๐ถ--spooler-freqโ sets spooler frequency ๐ถ--muleโ add a mule ๐ซ--mulesโ adds the specified number of mules ๐ซ๐ซ--farmโ add a mule farm ๐ด--mule-msg-sizeโ sets mule message buffer size ๐จ--signalโ sends a uwsgi signal to a server ๐ถ--signal-bufsizeโ sets buffer size for signal queue ๐ฆ--signals-bufsizeโ sets buffer size for signal queue ๐ฆ--signal-timerโ adds a timer, syntax:<signal> <seconds>โฒ๏ธ--timerโ adds a timer, syntax:<signal> <seconds>โฒ๏ธ--signal-rbtimerโ adds a redblack timer, syntax:<signal> <seconds>๐ณ--rbtimerโ adds a redblack timer, syntax:<signal> <seconds>๐ณ--rpc-maxโ maximum number of rpc slots, default:64๐-L|--disable-loggingโ disables request logging ๐ซ๐--flockโ locks the specified file before starting, exits if locked ๐--flock-waitโ locks the specified file before starting, waits if locked โณ๐--flock2โ locks the specified file after logging/daemon setup, exits if locked ๐--flock-wait2โ locks the specified file after logging/daemon setup, waits if locked โณ๐--pidfileโ creates pidfile before privileges drop ๐--pidfile2โ creates pidfile after privileges drop ๐--safe-pidfileโ creates safe pidfile before privileges drop ๐ก๏ธ๐--safe-pidfile2โ creates safe pidfile after privileges drop ๐ก๏ธ๐--chrootโchroot()to the specified directory ๐ฐ--pivot-rootโpivot_root()to the specified directories;new_rootandput_oldmust be separated with a space ๐--pivot_rootโpivot_root()to the specified directories;new_rootandput_oldmust be separated with a space ๐--uidโ setuid to the specified user/uid ๐ค--gidโ setgid to the specified group/gid ๐ฅ--add-gidโ adds the specified group id to the process credentials โ๐ฅ--immediate-uidโ setuid to the specified user/uid IMMEDIATELY โก๐ค--immediate-gidโ setgid to the specified group/gid IMMEDIATELY โก๐ฅ--no-initgroupsโ disables additional groups set viainitgroups()๐ซ๐ฅ--capโ sets process capability ๐ฉ--unshareโunshare()part of the processes and puts it in a new namespace ๐งฌ--unshare2โunshare()part of the processes and puts it in a new namespace after rootfs change ๐งฌ--setns-socketโ exposes a unix socket returning namespace fds from/proc/self/ns๐--setns-socket-skipโ skips the specified entry when sending setns file descriptors โญ๏ธ--setns-skipโ skips the specified entry when sending setns file descriptors โญ๏ธ--setnsโ joins a namespace created by an external uWSGI instance ๐ค--setns-preopenโ opens/proc/self/nsas soon as possible and caches fds โก๐--jailedโ flags this instance as jailed, which forces thosepost_jailhooks to actually run ๐ซถ--reforkโ does a freshfork()after privileges drop. Jailing systems love this one โจ--re-forkโ same energy as--refork:fork()again after privileges drop. Jailing systems, this is for you ๐--refork-as-rootโfork()again before privileges drop. Yep, still for jailing systems ๐--re-fork-as-rootโ literally the same thing as--refork-as-root: anotherfork()before privileges drop. Jailing systems stay winning โจ--refork-post-jailโfork()again after jailing. Jailing systems, you already know ๐--re-fork-post-jailโ the twin of--refork-post-jail:fork()again after jailing. Jailing systems ๐ซถ
--hook-asapโ run the hook you gave it 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 inside the 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 right before the app exits and reloads ๐ช--hook-pre-appโ run the specified hook before the app loads ๐ฆ--hook-post-appโ run the specified hook after the app loads ๐--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, but 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 file you named gets 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 beforeexec()ing the vassal ๐ง--hook-as-emperorโ run the specified hook in the emperor once 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 function/symbol you specify after every request ๐--after-request-callโ run the function/symbol you specify after every request ๐
--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 inside the jail, after initialization ๐--exec-as-rootโ run the specified command before privileges drop ๐--exec-as-userโ run the specified command after privileges drop ๐--exec-as-user-atexitโ run the specified command before the app exits and reloads ๐ช--exec-pre-appโ run the specified command before the app loads ๐ฆ--exec-post-appโ run the specified command after the app loads ๐--exec-as-vassalโ run the specified command beforeexec()ing the vassal ๐ง--exec-as-emperorโ run the specified command in the emperor once the vassal has been started ๐
--mount-asapโ mount a filesystem as soon as possible โก--mount-pre-jailโ mount a filesystem before jailing ๐--mount-post-jailโ mount a filesystem after jailing ๐--mount-in-jailโ mount a filesystem inside the jail, after initialization ๐--mount-as-rootโ mount a filesystem before privileges drop ๐--mount-as-vassalโ mount a filesystem beforeexec()ing the vassal ๐ง--mount-as-emperorโ mount a filesystem in the emperor once the vassal has been started ๐--umount-asapโ unmount a filesystem as soon as possible โก--umount-pre-jailโ unmount a filesystem before jailing ๐--umount-post-jailโ unmount a filesystem after jailing ๐--umount-in-jailโ unmount a filesystem inside the jail, after initialization ๐--umount-as-rootโ unmount a filesystem before privileges drop ๐--umount-as-vassalโ unmount a filesystem beforeexec()ing the vassal ๐ง--umount-as-emperorโ unmount a filesystem in the emperor once the vassal has been started ๐
--wait-for-interfaceโ wait for the network interface you named to come up before running root hooks ๐--wait-for-interface-timeoutโ set the timeout forwait-for-interfaceโณ--wait-interfaceโ wait for the network interface you named to come up before running root hooks ๐--wait-interface-timeoutโ set the timeout forwait-for-interfaceโณ--wait-for-ifaceโ wait for the network interface you named to come up before running root hooks ๐--wait-for-iface-timeoutโ set the timeout forwait-for-interfaceโณ--wait-ifaceโ wait for the network interface you named to come up before running root hooks ๐--wait-iface-timeoutโ set the timeout forwait-for-interfaceโณ--wait-for-fsโ wait for the filesystem item you named to appear before running root hooks ๐--wait-for-fileโ wait for the file you named to appear before running root hooks ๐--wait-for-dirโ wait for the directory you named to appear before running root hooks ๐--wait-for-mountpointโ wait for the mountpoint you named to appear before running root hooks ๐๏ธ--wait-for-fs-timeoutโ set the timeout forwait-for-fs/file/dirโณ--wait-for-socketโ wait for the socket you named to be ready before loading apps ๐--wait-for-socket-timeoutโ set the timeout forwait-for-socketโณ
--call-asapโ call the specified function as soon as possible โก--call-pre-jailโ call the specified function before jailing ๐--call-post-jailโ call the specified function after jailing ๐--call-in-jailโ call the specified function inside the jail, after initialization ๐--call-as-rootโ call the specified function before privileges drop ๐--call-as-userโ call the specified function after privileges drop ๐--call-as-user-atexitโ call the specified function before the app exits and reloads ๐ช--call-pre-appโ call the specified function before the app loads ๐ฆ--call-post-appโ call the specified function after the app loads ๐--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 once the vassal has been started ๐--call-as-emperor1โ call the specifiedfunction(char *)in the emperor once the vassal has been started ๐--call-as-emperor2โ call the specifiedfunction(char *, pid_t)in the emperor once the vassal has been started ๐--call-as-emperor4โ call the specifiedfunction(char *, pid_t, uid_t, gid_t)in the emperor once the vassal has been started ๐
--iniโ load config from an ini file ๐-y/--yamlโ load config from a yaml file ๐-y/--ymlโ load config from a yaml file ๐-j/--jsonโ load config from a json file ๐งพ-j/--jsโ load config from a json file ๐งพ
--weightโ the weight of this instance (used by clustering/lb/subscriptions) โ๏ธ--auto-weightโ set this instance's weight automatically (used by clustering/lb/subscriptions) ๐ค--no-serverโ force no-server mode ๐ซ--command-modeโ force command mode ๐น๏ธ--no-defer-acceptโ turn off deferred-accept on sockets ๐--tcp-nodelayโ enable TCP NODELAY on every 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โ forceshutdown()to be called in addition toclose()when sockets get destroyed ๐
--limit-asโ limit the processes' address space / vsz ๐--limit-nprocโ limit how many processes can be spawned ๐งฎ--reload-on-asโ reload if the address space climbs higher than the megabytes you specified ๐--reload-on-rssโ reload if the rss memory climbs higher than the megabytes you specified ๐--evil-reload-on-asโ force the master to reload a worker if its address space goes higher than the megabytes you specified ๐--evil-reload-on-rssโ force the master to reload a worker if its rss memory goes higher than the megabytes you specified ๐--mem-collector-freqโ set the memory collector frequency for when evil reloads are in play ๐งน--reload-on-fdโ reload if the file descriptor you specified is ready ๐--brutal-reload-on-fdโ brutal reload if the file descriptor you specified is ready ๐--ksmโ enable Linux KSM ๐ง--pcre-jitโ enable pcre jit (if it's available) โก--never-swapโ lock all memory pages so nothing ever gets swapped ๐ซ๐ค--touch-reloadโ reload uWSGI if the file you specified is modified/touched ๐--touch-workers-reloadโ trigger a reload of (only) the workers if the file you specified is modified/touched ๐๐ท--touch-mules-reloadโ reload mules if the file you specified is modified/touched ๐๐ด--touch-spoolers-reloadโ reload spoolers if the file you specified is modified/touched ๐๐งต--touch-chain-reloadโ trigger a chain reload if the file you specified is modified/touched ๐โ๏ธ--touch-logrotateโ trigger logrotation if the file you specified is modified/touched ๐๐--touch-logreopenโ trigger log reopen if the file you specified is modified/touched ๐๐--touch-execโ run a command when the file you specified is modified/touched. Syntax:file command๐โถ๏ธ--touch-signalโ lowkey surveillance vibes ๐ when the file you named gets modified or touched, uwsgi raises a signal. Syntax isfile signal.--fs-reloadโ when the filesystem object you point at changes, you get a graceful reload. no drama, just a soft reset โจ--fs-brutal-reloadโ same energy as above but make it feral ๐ฅ when that filesystem object changes, it's a brutal reload. no gentle anything.--fs-signalโ raise a uwsgi signal when the filesystem object you specified gets modified. Syntax:file signal.--check-mountpointโ if a filesystem is no longer reachable, it straight up destroys the instance ๐ super useful when you need reliable Fuse management.--mountpoint-checkโ literally the same thing as--check-mountpoint: destroy the instance when a filesystem is no longer reachable, useful for reliable Fuse management. twins fr ๐ซถ--check-mountโ yeah, it's this one again: destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management). they're giving triplets ๐--mount-checkโ the fourth one bestie, and it does the exact same: destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management).--propagate-touchโ described in the source as an "over-engineering option for system with flaky signal management". it's giving "we made this for the messy ones" ๐--limit-postโ caps the request body. that's it, that's the tweet.--no-orphansโ automatically kills workers when the master dies ๐ชฆ > heads up: this can be dangerous for availability. know the risk before you enable it.--prioโ set the priority of processes/threads.--cpu-affinityโ set cpu affinity.--post-bufferingโ sets the size in bytes after which it buffers to disk instead of memory. memory said "not today" ๐พ--post-buffering-bufsizeโ sets the buffer size forread()while in post buffering mode.--body-read-warningโ sets the amount of allowed memory allocation (in megabytes) for the request body before it starts printing a warning. warning first, chaos later โ ๏ธ--upload-progressโ turns on creation of.jsonfiles in the directory you specify while a file upload is happening. progress girlies stay informed ๐ธ--no-default-appโ do not fallback to the default app.--manage-script-nameโ automatically rewritesSCRIPT_NAMEandPATH_INFO. let it handle the admin ๐--ignore-script-nameโ ignoreSCRIPT_NAME. iconic "i don't see it" energy.--catch-exceptionsโ reports the exception as http output. > discouraged!! use only for testing ๐--reload-on-exceptionโ reloads a worker whenever an exception is raised.--reload-on-exception-typeโ reloads a worker when a specific exception type is raised.--reload-on-exception-valueโ reloads a worker when a specific exception value is raised.--reload-on-exception-reprโ reloads a worker when a specific exception type+value (language-specific) is raised.--exception-handlerโ adds an exception handler.--enable-metricsโ turns on the metrics subsystem โจ numbers girlies rise.--metricโ adds a custom metric.--metric-thresholdโ adds a metric threshold/alarm ๐จ--metric-alarmโ adds a metric threshold/alarm (yes, another name for the same vibe).--alarm-metricโ also adds a metric threshold/alarm. three names, one job, obsessed ๐--metrics-dirโ exports metrics as text files into the directory you name.--metrics-dir-restoreโ restores the last value taken from the metrics dir.--metric-dirโ exports metrics as text files to the specified directory (the singular twin).--metric-dir-restoreโ restores the last value taken from the metrics dir (again, singular edition).--metrics-no-coresโ disables generation of cores-related metrics.--udpโ run the udp server on the address you specify.--statsโ enables the stats server on the specified address ๐--stats-serverโ enables the stats server on the specified address. same girl, different name.--stats-httpโ prefixes the stats server json output with http headers.--stats-minifiedโ minifies the statistics json output. small and cute ๐--stats-minโ minifies the statistics json output. (alias bestie!)--stats-pushโ pushes the stats json to the destination you specify.--stats-pusher-default-freqโ sets the default frequency of stats pushers.--stats-pushers-default-freqโ sets the default frequency of stats pushers. plural, same thing ๐--stats-no-coresโ disables 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โ 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โ declares itself as a dead node for the specified amount of seconds if one of the lord hooks fails ๐--legion-skew-toleranceโ set the clock skew tolerance of the legion subsystem (default 60 seconds).--legion-lordโ action to call on Lord election.--legion-unlordโ action to call on Lord dismiss.--legion-setupโ action to call on legion setup.--legion-deathโ action to call on legion death (shutdown of the instance).--legion-joinโ action to call on legion join (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 the max size of the legion scroll buffer.--legion-scroll-list-max-sizeโ set the max size of the legion scroll list buffer.--subscriptions-sign-checkโ set 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 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 subscription server you specify.--stโ subscribe to the specified subscription server. short queen โจ--subscribeโ subscribe to the specified subscription server. (three names, one subscription, we love consistency ๐ซถ)--subscribe2โ subscribe to the specified subscription server using advanced keyval syntax.--subscribe-freqโ send 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. (typo is theirs, not mine, iykyk ๐ )--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 directory you specify and create a sni/ssl context on demand. it's giving on-demand slay ๐--sni-dir-ciphersโ set ssl ciphers for thesni-diroption.--ssl-enable3โ enable SSLv3. > insecure ๐ญ--ssl-enable-sslv3โ enable SSLv3. > insecure. (same warning, longer name)--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 directory you specify.--check-intervalโ set the interval (in seconds) of master checks.--forkbomb-delayโ sleep for the specified number of seconds when a forkbomb is detected. nap time, but make it emergency ๐ด--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 specified file or udp address after privileges drop.--log-formatโ set advanced format for request logging.--logformatโ set advanced format for request logging. (the no-dash twin, we stan ๐)--logformat-strftimeโ applystrftimeto logformat output.--log-format-strftimeโ applystrftimeto logformat output. (again: twins!)--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, you know the drill ๐)--loggerโ set/append a logger.--logger-listโ list enabled loggers ๐--loggers-listโ list enabled loggers. (plural bestie!)--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 regexp you specify. bye felicia ๐--log-filterโ show only the log lines matching the regexp you specify.--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โ bestie, instead of spinning up a whole dedicated thread for every curl-based alarm, just reuse the main alarm thread. lowkey efficient ๐--alarm-freqโ tunes the anti-loop alarm system. default is3seconds, so if your alarms are going feral, this is the dial.--alarm-fdโ raise the alarm you name when an fd is read for read. by default it reads1byte โ set it to8foreventfd. yes this one is niche, but she's doing her best ๐ซถ--alarm-segfaultโ fire off the alarm you name the moment the segmentation fault handler runs. ๐ญ--segfault-alarmโ same thing, different spelling: raise the specified alarm when the segfault handler is executed.--alarm-backlogโ raise the specified alarm when the socket backlog queue is full. she's telling you before things get ugly.--backlog-alarmโ the same deal, alias edition: raise the specified alarm when the socket backlog queue is full.--lq-alarmโ raise the specified alarm when the socket backlog queue is full. (lq = listen queue, iykyk)--alarm-lqโ same energy, flipped name: alarm when the socket backlog queue is full.--alarm-listen-queueโ raise the specified alarm when the socket backlog queue is full. spelled all the way out for the girlies who like clarity โจ--listen-queue-alarmโ and again, reversed: raise the specified alarm when the socket backlog queue is full.--log-alarmโ raise the specified alarm when a log line matches the regexp you give. syntax:<alarm>[,alarm...] <regexp>โ so you can stack multiple alarms with commas, iconic.--alarm-logโ literally the same thing with the words swapped: raise the specified alarm when a log line matches the regexp. syntax:<alarm>[,alarm...] <regexp>.--not-log-alarmโ the opposite vibe: skip the specified alarm when a log line matches the regexp. syntax:<alarm>[,alarm...] <regexp>.--not-alarm-logโ same skip behavior, name flipped: skip the specified alarm when a log line matches the regexp. syntax:<alarm>[,alarm...] <regexp>.--alarm-listโ just list out all the enabled alarms. a lil inventory moment ๐--alarms-listโ same list, plural name, list enabled alarms.--alarm-msg-sizeโ sets the max size of an alarm message. default8192. no essays allowed ๐--log-masterโ delegate logging to the master process. hand it off, queen ๐--log-master-bufsizeโ sets the buffer size for the master logger. heads up: bigger log messages will be truncated. not a vibe but that's the rule.--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. fresh start energy ๐ฆ--log-truncateโ truncate the log on startup. everything before this moment? gone.--log-maxsizeโ set maximum logfile size.--log-backupnameโ set the logfile name to use after rotation. gotta name the old one something.--logdateโ prefix logs with a date, or with astrftimestring.--log-dateโ same as above: prefix logs with a date or astrftimestring.--log-prefixโ prefix logs with a string of your choosing.--log-zeroโ log responses that have no body. yes, the empty ones count too ๐ซ--log-slowโ log requests slower than the number of milliseconds you specify.--log-4xxโ log requests with a 4xx response.--log-5xxโ log requests with a 5xx response.--log-bigโ log requests bigger than the size you specify.--log-sendfileโ log sendfile requests.--log-ioerrorโ log requests that hit io errors. ๐ญ--log-microsโ report response time in microseconds instead of milliseconds. precision queen ๐ฌ--log-x-forwarded-forโ use the ip from theX-Forwarded-Forheader instead ofREMOTE_ADDR.--master-as-rootโ leave the master process running as root. do with this information what you will ๐--drop-after-initโ run the privileges drop after plugin initialization. note: this is superseded bydrop-after-apps.--drop-after-appsโ run the privileges drop after apps loading. note: this is superseded bymaster-as-root.--force-cwdโ force the initial working directory to the value you specify.--binshโ override/bin/sh(used by exec hooks โ and it always falls back to/bin/sh).--chdirโ chdir to the specified directory before apps loading.--chdir2โ chdir to the specified directory after apps loading.--lazyโ set lazy mode (load apps in 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). she's shy until someone knocks ๐--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. (same list, plural spelling)--cheaper-listโ list enabled cheapers algorithms. three names, one list, we love consistency ๐--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. the hard limit does not play ๐ค--idleโ set idle mode (put uWSGI in cheap mode after inactivity).--die-on-idleโ shutdown uWSGI when idle. dramatic exit, honestly ๐--mountโ load application under the mountpoint you specify.--worker-mountโ load application under the 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 ways to say the same thing, and every single one of them is valid โจ)--vhostโ enable virtualhosting mode (based on theSERVER_NAMEvariable).--vhost-hostโ enable virtualhosting mode (based on theHTTP_HOSTvariable).
ok bestie this is where it gets good โ the routing era ๐ฃ๏ธโจ
--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 a condition.--route-if-notโ add a route based on a condition (negate version).--route-runโ always run the specified route action.--final-routeโ add a final route.--final-route-statusโ add a final route for the specified status.--final-route-hostโ add a final route based on 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 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 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 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 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 a condition.--response-route-if-notโ add a response route based on a condition (negate version).--response-route-runโ always run the specified response route action.--router-listโ list enabled routers.--routers-listโ list enabled routers. (same list, plural, you know the drill ๐ )--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.
websocket o'clock ๐ฆ
--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. singular spelling, same job.--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, default1024).--websocket-max-sizeโ set the max allowed size of websocket messages (in Kbytes, default1024).--chunked-input-limitโ set the max size of a chunked input part (default1MB, in bytes).--chunked-input-timeoutโ set default timeout for chunked input.--clockโ set a clock source. โฐ--clock-listโ list enabled clocks.--clocks-listโ lists all the enabled clocks for you, bestie โฐโจ--add-headerโ automatically adds HTTP headers to the response, no manual labour required ๐--rem-headerโ automatically removes the specified HTTP header from the response ๐ซฅ--del-headerโ same energy as above: automatically removes the specified HTTP header from the response--collect-headerโ stores the specified response header in a request var. Syntax isheader varโ two things, one space, that's the whole vibe ๐ฅ--response-header-collectโ stores the specified response header in a request var. Syntax:header var--pull-headerโ stores the specified response header in a request var and yanks it out of the response. Syntax:header var. It's giving collect-and-delete ๐
๐๏ธ static files, my beloved
--check-staticโ checks for static files in the specified directory ๐--check-static-docrootโ checks for static files in the requestedDOCUMENT_ROOT--static-checkโ checks for static files in the specified directory (yes bestie, it's the same thing, the options are twins ๐ฏ)--static-mapโ maps a mountpoint to a static directory (or a file!)--static-map2โ likestatic-mapbut it completely appends the requested resource to the docroot--static-skip-extโ skips the specified extension from staticfile checks ๐ซ--static-indexโ searches for the specified file if a directory is requested--static-safeโ skips security checks if the file is under the specified path ๐--static-cache-pathsโ puts resolved paths in the uWSGI cache for the specified amount of seconds--static-cache-paths-nameโ uses the specified cache for static paths--mimefileโ sets the mime types file path (default/etc/mime.types)--mime-fileโ sets the mime types file path (default/etc/mime.types)--static-expires-typeโ sets theExpiresheader based on content type--static-expires-type-mtimeโ sets theExpiresheader based on content type and file mtime--static-expiresโ sets theExpiresheader based on filename regexp--static-expires-mtimeโ sets theExpiresheader based on filename regexp and file mtime--static-expires-uriโ sets theExpiresheader based onREQUEST_URIregexp--static-expires-uri-mtimeโ sets theExpiresheader based onREQUEST_URIregexp and file mtime--static-expires-path-infoโ sets theExpiresheader based onPATH_INFOregexp--static-expires-path-info-mtimeโ sets theExpiresheader based onPATH_INFOregexp and file mtime--static-gzipโ if the supplied regexp matches the static file translation, it will search for a gzip version ๐๏ธ--static-gzip-allโ checks for a gzip version of all requested static files--static-gzip-dirโ checks for a gzip version of all requested static files in the specified dir/prefix--static-gzip-prefixโ checks for a gzip version of all requested static files in the specified dir/prefix--static-gzip-extโ checks for a gzip version of all requested static files with the specified ext/suffix--static-gzip-suffixโ checks for a gzip version of all requested static files with the specified ext/suffix--honour-rangeโ enables support for the HTTPRangeheader ๐--offload-threadsโ sets the number of offload threads to spawn (per-worker, default0)--offload-threadโ sets the number of offload threads to spawn (per-worker, default0)--file-serve-modeโ sets the static file serving mode--fileserve-modeโ sets the static file serving mode--disable-sendfileโ disablessendfile()and relies on boringread()/write()instead. So plain. So humble. ๐--check-cacheโ checks for response data in the specified cache (leave it empty for the default cache)
๐ sockets, exec and friends
--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โ 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โ tries to remove all of the generated file/sockets ๐งน--file-writeโ writes the specified content to the specified file (syntax:file=value) before privileges drop--cgroupโ puts the processes in the specified cgroup--cgroup-optโ sets a value in the specified cgroup option--cgroup-dir-modeโ sets permission for the cgroup directory (default is700)--namespaceโ runs in a new namespace under the specified rootfs--namespace-keep-mountโ keeps the specified mountpoint in your namespace--nsโ runs in a new namespace under the specified rootfs--namespace-netโ adds network namespace--ns-netโ adds network namespace--enable-proxy-protocolโ enables PROXY1 protocol support (only for http parsers)--reuse-portโ enables theREUSE_PORTflag on socket (BSD only ๐ก)--tcp-fast-openโ enables theTCP_FASTOPENflag on TCP sockets with the specified qlen value--tcp-fastopenโ enables theTCP_FASTOPENflag on TCP sockets with the specified qlen value--tcp-fast-open-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported--tcp-fastopen-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported
๐ zerg, cron and legions
--zergโ attach to a zerg server--zerg-fallbackโ falls back to normal sockets if the zerg server is not available--zerg-serverโ enables the zerg server on the specified UNIX socket--cronโ adds a cron task โฐ--cron2โ adds a cron task (key=val syntax)--unique-cronโ adds a unique cron task--cron-harakiriโ sets the maximum time (in seconds) we wait for a cron command to complete--legion-cronโ adds a cron task runnable only when the instance is a lord of the specified legion ๐--cron-legionโ adds a cron task runnable only when the instance is a lord of the specified legion--unique-legion-cronโ adds a unique cron task runnable only when the instance is a lord of the specified legion--unique-cron-legionโ adds a unique cron task runnable only when the instance is a lord of the specified legion--loopโ select the uWSGI loop engine ๐--loop-listโ lists enabled loop engines--loops-listโ lists enabled loop engines--worker-execโ runs the specified command as worker--worker-exec2โ runs the specified command as worker (after the post_fork hook)--attach-daemonโ attaches a command/daemon to the master process (the command has to not go in background)--attach-control-daemonโ attaches a command/daemon to the master process (the command has to not go in background); 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 runs only on the legion lord node ๐--legion-smart-attach-daemonโ same as--smart-attach-daemonbut the daemon runs only on the legion lord node--legion-smart-attach-daemon2โ same as--smart-attach-daemon2but the daemon runs only on the legion lord node--daemons-honour-stdinโ do not change the stdin of external daemons to/dev/null--attach-daemon2โ the attach-daemon keyval variant (supports smart modes too)
๐งฉ plugins, because everything is a plugin
--pluginsโ load uWSGI plugins--pluginโ load uWSGI plugins--need-pluginsโ load uWSGI plugins (exit on error, no chill) ๐จ--need-pluginโ load uWSGI plugins (exit on error)--plugins-dirโ adds a directory to the uWSGI plugin search path--plugin-dirโ adds a directory to the uWSGI plugin search path--plugins-listโ lists enabled plugins--plugin-listโ lists enabled plugins--autoloadโ tries to automatically load plugins when unknown options are found ๐--dlopenโ blindly loads a shared library ๐--allowed-modifiersโ comma separated list of allowed modifiers--remap-modifierโ remaps a request modifier from one id to another
๐ ๏ธ introspection & dev tools
--dump-optionsโ dumps the full list of available options--show-configโ shows the current config reformatted as ini--binary-append-dataโ returns the content of a resource to stdout for appending to a uwsgi binary (fordata://usage)--printโ simple print ๐จ๏ธ--iprintโ simple print (immediate version)--exitโ forceexit()of the instance--cflagsโ reports 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 uWSGI version--response-headers-limitโ sets the response header maximum size (default:64k)
And that's the whole options buffet, bestie โ you made it to the end ๐ซถโจ This page is from uwsgi_rack 2.0.31-2, dated January 2026, and it's the UWSGI_RACK(1) manual page. Go forth and configure responsibly, no cap ๐
๐
๐ฆ where this page comes from
- ubuntu resolute: uwsgi-plugin-ruby 2.0.31+2+0.0.3 ยท GPL-3.0-or-later
- ubuntu stonking: uwsgi-plugin-ruby 2.0.31+2+0.0.3 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms