UWSGI_LUA(1)
๐ UWSGI_LUA โ the manual, but make it make sense
okay bestie, welcome to UWSGI_LUA(1) ๐ this is the page for uwsgi_lua, and yeah it lives under User Commands like the rest of the gang. grab a strawberry ๐, sit down, we're doing the whole thing.
โจ NAME โจ
uwsgi_lua โ fast (pure C), self-healing, developer-friendly WSGI server
like... it's giving pure C, self-healing, developer-friendly and honestly? obsessed. ๐
๐ธ SYNOPSIS ๐ธ
uwsgi-core [options...]
that's it, that's the whole vibe. you throw options at it, it does the thing. ๐ฆ
๐ DESCRIPTION ๐
so this section is literally just the options, and there are so many of them, so buckle up. no skipping, no summarising, we're doing every single one fr fr. ๐ญ
๐ sockets & protocols (the networking era)
-s,--socketโ bind to the specified UNIX/TCP socket using default protocol. the classic. the main character. โจ-s,--uwsgi-socketโ bind to the specified UNIX/TCP socket using uwsgi protocol--suwsgi-socketโ bind to the specified UNIX/TCP socket using uwsgi protocol over SSL ๐--ssl-socketโ bind to the specified UNIX/TCP socket using uwsgi protocol over SSL--http-socketโ bind to the specified UNIX/TCP socket using HTTP protocol ๐--http-socket-modifier1โ force the specified modifier1 when using HTTP protocol--http-socket-modifier2โ force the specified modifier2 when using HTTP protocol--http11-socketโ bind to the specified UNIX/TCP socket using HTTP 1.1 (Keep-Alive) protocol ๐--https-socketโ bind to the specified UNIX/TCP socket using HTTPS protocol ๐--https-socket-modifier1โ force the specified modifier1 when using HTTPS protocol--https-socket-modifier2โ force the specified modifier2 when using HTTPS protocol--fastcgi-socketโ bind to the specified UNIX/TCP socket using FastCGI protocol--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode)--fastcgi-modifier1โ force the specified modifier1 when using FastCGI protocol--fastcgi-modifier2โ force the specified modifier2 when using FastCGI protocol--scgi-socketโ bind to the specified UNIX/TCP socket using SCGI protocol--scgi-nph-socketโ bind to the specified UNIX/TCP socket using SCGI protocol (nph mode)--scgi-modifier1โ force the specified modifier1 when using SCGI protocol--scgi-modifier2โ force the specified modifier2 when using SCGI protocol--raw-socketโ bind to the specified UNIX/TCP socket using RAW protocol--raw-modifier1โ force the specified modifier1 when using RAW protocol--raw-modifier2โ force the specified modifier2 when using RAW protocol--puwsgi-socketโ bind to the specified UNIX/TCP socket using persistent uwsgi protocol (puwsgi)--protocolโ force the specified protocol for default sockets--socket-protocolโ force the specified protocol for default sockets--shared-socketโ create a shared socket for advanced jailing or ipc ๐ซถ--undeferred-shared-socketโ create a shared socket for advanced jailing or ipc (undeferred mode)
๐ง workers, processes & harakiri (the drama section)
-p,--processesโ spawn the specified number of workers/processes-p,--workersโ spawn the specified number of workers/processes--thunder-lockโ serializeaccept()usage (if possible) โก-t,--harakiriโ set harakiri timeout. yes it's named that. yes it means what you think. ๐--harakiri-verboseโ enable verbose mode for harakiri--harakiri-graceful-timeoutโ interval between graceful harakiri attempt and a sigkill--harakiri-graceful-signalโ use this signal instead of sigterm for graceful harakiri attempts--harakiri-queue-thresholdโ only trigger harakiri if queue is greater than this threshold--harakiri-no-arhโ do not enable harakiri during after-request-hook--no-harakiri-arhโ do not enable harakiri during after-request-hook--no-harakiri-after-req-hookโ do not enable harakiri during after-request-hook--backtrace-depthโ set backtrace depth--mule-harakiriโ set harakiri timeout for mule tasks
๐ config loading & option logic (the nerdy but iconic part)
-x,--xmlconfigโ load config from xml file-x,--xmlโ load config from xml file--configโ load configuration using the pluggable system--fallback-configโ re-exec uwsgi with the specified config when exit code is 1--strictโ enable strict mode (placeholder cannot be used)--skip-zeroโ skip check of file descriptor 0--skip-atexitโ skip atexit hooks (ignored by the master)--skip-atexit-teardownโ skip atexit teardown (ignored by the master)-S,--setโ set a placeholder or an option--set-placeholderโ set a placeholder--set-phโ set a placeholder--getโ print the specified option value and exit--declare-optionโ declare a new uWSGI custom option--declare-option2โ declare a new uWSGI custom option (non-immediate)--resolveโ place the result of a dns query in the specified placeholder, syntax:placeholder=name(immediate option)--forโ (opt logic) for cycle--for-globโ (opt logic) for cycle (expand glob)--for-timesโ (opt logic) for cycle (expand the specified num to a list starting from 1)--for-readlineโ (opt logic) for cycle (expand the specified file to a list of lines)--endforโ (opt logic) end for cycle--end-forโ (opt logic) end for cycle--if-optโ (opt logic) check for option--if-not-optโ (opt logic) check for option--if-envโ (opt logic) check for environment variable--if-not-envโ (opt logic) check for environment variable--ifenvโ (opt logic) check for environment variable--if-reloadโ (opt logic) check for reload--if-not-reloadโ (opt logic) check for reload--if-hostnameโ (opt logic) check for hostname--if-not-hostnameโ (opt logic) check for hostname--if-hostname-matchโ (opt logic) try to match hostname against a regular expression--if-not-hostname-matchโ (opt logic) try to match hostname against a regular expression--if-existsโ (opt logic) check for file/directory existence--if-not-existsโ (opt logic) check for file/directory existence--ifexistsโ (opt logic) check for file/directory existence--if-pluginโ (opt logic) check for plugin--if-not-pluginโ (opt logic) check for plugin--ifpluginโ (opt logic) check for plugin--if-fileโ (opt logic) check for file existence--if-not-fileโ (opt logic) check for file existence--if-dirโ (opt logic) check for directory existence--if-not-dirโ (opt logic) check for directory existence--ifdirโ (opt logic) check for directory existence--if-directoryโ (opt logic) check for directory existence--endifโ (opt logic) end if--end-ifโ (opt logic) end if--blacklistโ set options blacklist context--end-blacklistโ clear options blacklist context--whitelistโ set options whitelist context--end-whitelistโ clear options whitelist context
๐ error handling & templating (soft launch of the responsible era)
--ignore-sigpipeโ do not report (annoying)SIGPIPE๐--ignore-write-errorsโ do not report (annoying)write()/writev()errors--write-errors-toleranceโ set the maximum number of allowed write errors (default: no tolerance)--write-errors-exception-onlyโ only raise an exception on write errors giving control to the app itself--disable-write-exceptionโ disable exception generation 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)
๐ daemon control & instance management
-d,--daemonizeโ daemonize uWSGI--daemonize2โ daemonize uWSGI after app loading--stopโ stop an instance--reloadโ reload an instance--pauseโ pause an instance--suspendโ suspend an instance--resumeโ resume an instance--connect-and-readโ connect to a socket and wait for data from it--extractโ fetch/dump any supported address to stdout
๐ฆ limits, buffers & tuning
-l,--listenโ set the socket listen queue size-v,--max-varsโ set the amount of internal iovec/vars structures--max-appsโ set the maximum number of per-worker applications-b,--buffer-sizeโ set internal buffer size-m,--memory-reportโ enable memory report--profilerโ enable the specified profiler
โจ socket perms & process naming
-c,--cgi-modeโ force CGI-mode for plugins supporting it-a,--abstract-socketโ force UNIX socket in abstract mode (Linux only) ๐ง-C,--chmod-socketโ chmod-socket-C,--chmodโ chmod-socket--chown-socketโ chown unix sockets--umaskโ set umask--freebindโ put socket in freebind mode--map-socketโ map sockets to specific workers-T,--enable-threadsโ enable threads (stub option this is true by default)--no-threads-waitโ do not wait for threads cancellation on quit/reload--auto-procnameโ automatically set processes name to something meaningful--procname-prefixโ add a prefix to the process names--procname-prefix-spacedโ add a spaced prefix to the process names--procname-appendโ append a string to process names--procnameโ set process names--procname-masterโ set master process name-i,--single-interpreterโ do not use multiple interpreters (where available)--need-appโ exit if no app can be loaded-M,--masterโ enable master process ๐--honour-stdinโ do not remap stdin to/dev/null
๐ the Emperor era (vassals, wrappers, heartbeats)
--emperorโ run the Emperor--emperor-proxy-socketโ force the vassal to became an Emperor proxy--emperor-wrapperโ set a binary wrapper for vassals--emperor-wrapper-overrideโ set a binary wrapper for vassals to try before the default one--emperor-wrapper-fallbackโ set a binary wrapper for vassals to try as a last resort--emperor-nofollowโ do not follow symlinks when checking for mtime--emperor-procnameโ set the Emperor process name--emperor-freqโ set the Emperor scan frequency (default 3 seconds)--emperor-required-heartbeatโ set the Emperor tolerance about heartbeats--emperor-curse-toleranceโ set the Emperor tolerance about cursed vassals ๐--emperor-pidfileโ bestie, this writes the Emperor pid into the file you point at ๐โจ--emperor-tyrantโ puts the Emperor into Tyrant mode ๐๐ค--emperor-tyrant-nofollowโ no symlink-following when checking uid/gid in Tyrant mode, okay? ๐ซ๐--emperor-statsโ runs the Emperor stats server ๐โจ--emperor-stats-serverโ also runs the Emperor stats server, because why not ๐ ๐--early-emperorโ spawns the emperor ASAP, like right now bestie โฐ๐จ--emperor-broodlordโ runs the emperor in BroodLord mode ๐ฆ๐--emperor-throttleโ sets the throttling level in milliseconds for vassals acting up ๐ค default is1000โณ--emperor-max-throttleโ max throttling level in ms for misbehaving vassals, default is3 minutes๐โฒ๏ธ--emperor-magic-execโ if a vassal config file has the executable bit, it gets prefixed withexec://like magic โจ๐ช--emperor-on-demand-extensionโ searches for a text file named vassal name + extension that holds the on demand socket name ๐๐--emperor-on-demand-extโ same vibe, searches for that text file with the on demand socket name ๐ซถ๐--emperor-on-demand-directoryโ turns on on-demand mode, binding to a unix socket in the dir you specify, named like the vassal +.socket๐๐--emperor-on-demand-dirโ yep, enables on-demand mode with that unix socket in your chosen dir, vassal +.socket๐ซถ๐--emperor-on-demand-execโ uses the output of the command you give as the on-demand socket name; the vassal name is the only argument passed ๐ฅ๏ธ๐--emperor-extra-extensionโ lets the Emperor accept the extension you specify; the vassal gets called with--configโ ๐--emperor-extra-extโ same deal, allows that extra extension and calls the vassal with--config๐ ๐--emperor-no-blacklistโ disables the Emperor blacklisting subsystem, no cap ๐ซ๐--emperor-use-cloneโ usesclone()instead offork(), passing theunshare()flags you specify ๐งฌ๐--emperor-graceful-shutdownโ vassals get a graceful shutdown during ragnarok ๐๐๏ธ--emperor-capโ sets the vassals capability ๐๐--vassals-capโ also sets the vassals capability, bestie ๐๐ซถ--vassal-capโ sets vassals capability too, periodt ๐๐--imperial-monitor-listโ lists all enabled imperial monitors ๐๐--imperial-monitors-listโ lists enabled imperial monitors, yes plural โจ๐--vassals-inheritโ adds config templates to vassals config using--inherit๐๐งฌ--vassals-includeโ includes config templates to vassals config, but uses--includeinstead of--inherit๐๐--vassals-inherit-beforeโ adds config templates using--inherit, and parses them before the vassal file โฎ๏ธ๐--vassals-include-beforeโ includes config templates with--includeinstead of--inherit, and parses before the vassal file โฎ๏ธ๐--vassals-start-hookโ runs your command before each vassal starts ๐๐ช--vassals-stop-hookโ runs your command after a vassal dies ๐๐ช--vassal-sosโ when overloaded, the vassal asks the emperor for reinforcements ๐๐--vassal-sos-backlogโ asks the emperor for SOS if the backlog queue has more items than your value ๐๐--vassals-setโ automatically sets the option you specify via--setfor every vassal ๐คโ๏ธ--vassal-setโ same auto-set via--setfor every vassal, fr fr ๐ค๐--heartbeatโ announces healthiness to the emperor ๐๐--reload-mercyโ max time in seconds we wait for workers and other processes to die during reload/shutdown โณ๐--worker-reload-mercyโ max time in seconds a worker can take to reload/shutdown; default is60โฒ๏ธ๐ท--mule-reload-mercyโ 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โ exits instead of doing a brutal reload onSIGTERM๐๐ก--force-gatewayโ forces the spawn of the first registered gateway without a master ๐ชโก-h|--helpโ shows this help, bestie ๐๐-h|--usageโ also shows this help, same energy ๐โจ--print-symโ prints the content of the binary symbol you specify ๐๐งฌ--print-symbolโ prints that binary symbol content too, iconic ๐ซถ๐-r|--reaperโ callswaitpid(-1,...)after each request to yeet zombies ๐งโโ๏ธ๐๏ธ-R|--max-requestsโ reloads workers after the specified amount of managed requests ๐๐--max-requests-deltaโ adds(worker_id * delta)to 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 the internal sockets timeout โฐ๐--no-fd-passingโ disables file descriptor passing ๐ซ๐--locksโ creates the specified number of shared locks ๐๐ข--lock-engineโ sets the lock engine โ๏ธ๐--ftokโ sets the ipcsem key viaftok()to avoid duplicates ๐๐งฌ--persistent-ipcsemโ does NOT remove ipcsem's on shutdown, keep them around ๐ซ๐๏ธ-A|--sharedareaโ creates a raw shared memory area of the specified pages; note: it supports keyval too ๐ง โจ--safe-fdโ does not close the file descriptor you specify ๐ โโ๏ธ๐--fd-safeโ same vibe, keeps that file descriptor open ๐ซถ๐--cacheโ creates a shared cache containing the elements you give ๐๏ธโจ--cache-blocksizeโ sets the cache blocksize ๐งฑ๐๏ธ--cache-storeโ enables persistent cache to disk ๐พ๐๏ธ--cache-store-syncโ sets how often the persistent cache syncs โฑ๏ธ๐พ--cache-no-expireโ disables the auto sweep of expired items ๐ซ๐งน--cache-expire-freqโ sets the frequency of cache sweeper scans; default is3 seconds๐งนโฒ๏ธ--cache-report-freed-itemsโ constantly reports cache items freed by the sweeper; use only for debug ๐๐ข--cache-udp-serverโ binds the cache UDP server (only for set/update/delete) to the socket you specify ๐ก๐--cache-udp-nodeโ sends cache update/deletion to the cache UDP server you specify ๐ค๐ก--cache-syncโ copies the whole content of another uWSGI cache server on startup ๐๐๏ธ--cache-use-last-modifiedโ 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 with keyval syntax โจ๐๏ธ--queueโ enables shared queue ๐โจ--queue-blocksizeโ sets queue blocksize ๐งฑ๐--queue-storeโ enables persistent queue to disk ๐พ๐--queue-store-syncโ sets sync frequency for persistent queue โฑ๏ธ๐พ-Q|--spoolerโ runs a spooler on the directory you specify ๐๐--spooler-externalโ maps spooler requests to a spooler directory managed by an external instance ๐๐--spooler-orderedโ tries to order the execution of spooler tasks ๐ข๐--spooler-chdirโchdir()s to the directory you specify before each spooler task ๐๐--spooler-processesโ sets the number of processes for spoolers ๐ฏ๐--spooler-quietโ no verbose spooler task chatter, shhh ๐คซ๐--spooler-max-tasksโ max number of tasks to run before recycling a spooler ๐๐--spooler-harakiriโ sets harakiri timeout for spooler tasks โณ๐--spooler-frequencyโ sets spooler frequency ๐ถ๐--spooler-freqโ same, sets spooler frequency ๐ซถ๐ถ--muleโ adds a mule ๐ดโจ--mulesโ adds the number of mules you specify ๐ด๐ด--farmโ adds a mule farm ๐๐ด--mule-msg-sizeโ sets mule message buffer size ๐จ๐ด--signalโ sends a uWSGI signal to a server ๐กโจ--signal-bufsizeโ sets buffer size for the signal queue ๐ฆ๐ก--signals-bufsizeโ same, sets buffer size for signal queue ๐ซถ๐ฆ--signal-timerโ adds a timer, syntax:<signal> <seconds>โฒ๏ธ๐ก--timerโ adds a timer too, syntax:<signal> <seconds>๐ซถโฒ๏ธ--signal-rbtimerโ adds a redblack timer, syntax:<signal> <seconds>๐ณโฒ๏ธ--rbtimerโ adds a redblack timer, same syntax:<signal> <seconds>๐ซถ๐ณ--rpc-maxโ maximum number of rpc slots; default:64๐๐ข-L|--disable-loggingโ disables request logging ๐ซ๐--flockโ locks the file you specify before starting, and exits if it's already locked ๐๐ช--flock-waitโ locks the file before starting, but waits if it's already locked โณ๐--flock2โ locks the file after logging/daemon setup, exits if locked ๐๐ช--flock-wait2โ locks after logging/daemon setup, waits if locked โณ๐--pidfileโ creates a pidfile before privileges drop ๐๐ฝ--pidfile2โ creates a pidfile after privileges drop ๐โฌ๏ธ--safe-pidfileโ creates a safe pidfile before privileges drop ๐ก๏ธ๐--safe-pidfile2โ creates a safe pidfile after privileges drop ๐ก๏ธโฌ๏ธ--chrootโchroot()s to the directory you specify ๐ฐ๐--pivot-rootโpivot_root()s to the specified directories;new_rootandput_oldmust be separated with a space ๐๐--pivot_rootโ same thing,pivot_root()to those dirs with a space betweennew_rootandput_old๐ซถ๐--uidโsetuidto the user/uid you specify ๐ค๐--gidโsetgidto the group/gid you specify ๐ฅ๐--add-gidโ adds the specified group id to the process credentials โ๐ฅ--immediate-uidโsetuidto the user/uid IMMEDIATELY ๐โโ๏ธ๐ค--immediate-gidโsetgidto the group/gid IMMEDIATELY ๐โโ๏ธ๐ฅ--no-initgroupsโ disables additional groups set viainitgroups()๐ซ๐ฅ--capโ sets process capability ๐โจ--unshareโunshare()s part of the processes and puts them in a new namespace ๐งฌ๐--unshare2โunshare()s part of the processes into a new namespace after rootfs change ๐งฌ๐--setns-socketโ exposes a unix socket returning namespace fds from/proc/self/ns๐๐--setns-socket-skipโ skips the entry you specify when sending setns file descriptors ๐ซ๐ค--setns-skipโ same, skips that entry when sending setns file descriptors ๐ซถ๐ซ--setnsโ joins a namespace created by an external uWSGI instance ๐๐--setns-preopenโ opens/proc/self/nsas soon as possible and caches fds โก๐--jailedโ marks this instance as jailed, which forces thepost_jailhooks to actually fire. like, "yes bestie, we ARE in the box, run the things" ๐--reforkโfork()s again after privileges drop. super useful for jailing systems.--re-forkโ same exact thing as--refork:fork()again after privileges drop. useful for jailing systems. two names, one vibe ๐ซถ--refork-as-rootโfork()s again before privileges drop. again: jailing systems, you know the drill.--re-fork-as-rootโ the twin of--refork-as-root.fork()again before privileges drop, useful for jailing systems. identical, no cap.--refork-post-jailโfork()s again after jailing. useful for jailing systems โจ--re-fork-post-jailโ same as--refork-post-jail:fork()again after jailing. useful for jailing systems.
okay now the HOOKS. this is the part where uWSGI lets you inject your little scripts at exactly the right moment. it's giving main character energy for your setup scripts ๐ฅ
--hook-asapโ runs the specified hook as soon as possible.--hook-pre-jailโ runs the specified hook before jailing.--hook-post-jailโ runs the specified hook after jailing.--hook-in-jailโ runs the specified hook in jail, after initialization.--hook-as-rootโ runs the specified hook before privileges drop.--hook-as-userโ runs the specified hook after privileges drop.--hook-as-user-atexitโ runs the specified hook before app exit and reload.--hook-pre-appโ runs the specified hook before app loading.--hook-post-appโ runs the specified hook after app loading.--hook-post-forkโ runs the specified hook after each fork.--hook-acceptingโ runs the specified hook after each worker enters the accepting phase.--hook-accepting1โ runs the specified hook after the first worker enters the accepting phase.--hook-accepting-onceโ runs the specified hook after each worker enters the accepting phase, but once per-instance.--hook-accepting1-onceโ runs the specified hook after the first worker enters the accepting phase, once per instance.--hook-master-startโ runs the specified hook when the Master starts ๐--hook-touchโ runs the specified hook when the specified file is touched. syntax:<file> <action>--hook-emperor-startโ runs the specified hook when the Emperor starts.--hook-emperor-stopโ runs the specified hook when the Emperor sends a stop message.--hook-emperor-reloadโ runs the specified hook when the Emperor sends a reload message.--hook-emperor-lostโ runs the specified hook when the Emperor connection is lost ๐ญ--hook-as-vassalโ runs the specified hook beforeexec()ing the vassal.--hook-as-emperorโ runs the specified hook in the emperor after the vassal has been started.--hook-as-muleโ runs the specified hook in each mule.--hook-as-gatewayโ runs the specified hook in each gateway.--after-request-hookโ runs the specified function/symbol after each request.--after-request-callโ runs the specified function/symbol after each request. (yep, same energy as the one above ๐)
and now the exec family โ same timing slots, but it's running a whole command instead of a hook:
--exec-asapโ runs the specified command as soon as possible.--exec-pre-jailโ runs the specified command before jailing.--exec-post-jailโ runs the specified command after jailing.--exec-in-jailโ runs the specified command in jail after initialization.--exec-as-rootโ runs the specified command before privileges drop.--exec-as-userโ runs the specified command after privileges drop.--exec-as-user-atexitโ runs the specified command before app exit and reload.--exec-pre-appโ runs the specified command before app loading.--exec-post-appโ runs the specified command after app loading.--exec-as-vassalโ runs the specified command beforeexec()ing the vassal.--exec-as-emperorโ runs the specified command in the emperor after the vassal has been started.
mount time ๐ธ same timing slots, now for mounting filesystems:
--mount-asapโ mounts filesystem as soon as possible.--mount-pre-jailโ mounts filesystem before jailing.--mount-post-jailโ mounts filesystem after jailing.--mount-in-jailโ mounts filesystem in jail after initialization.--mount-as-rootโ mounts filesystem before privileges drop.--mount-as-vassalโ mounts filesystem beforeexec()ing the vassal.--mount-as-emperorโ mounts filesystem in the emperor after the vassal has been started.
and the reverse, because what goes up must come down ๐
--umount-asapโ unmounts filesystem as soon as possible.--umount-pre-jailโ unmounts filesystem before jailing.--umount-post-jailโ unmounts filesystem after jailing.--umount-in-jailโ unmounts filesystem in jail after initialization.--umount-as-rootโ unmounts filesystem before privileges drop.--umount-as-vassalโ unmounts filesystem beforeexec()ing the vassal.--umount-as-emperorโ unmounts filesystem in the emperor after the vassal has been started.
waiting era ๐ฆ these ones make uWSGI sit patiently like a good bestie until the thing you need actually shows up:
--wait-for-interfaceโ waits for the specified network interface to come up before running root hooks.--wait-for-interface-timeoutโ sets the timeout forwait-for-interface.--wait-interfaceโ waits for the specified network interface to come up before running root hooks. (alias, same vibe โจ)--wait-interface-timeoutโ sets the timeout forwait-for-interface.--wait-for-ifaceโ waits for the specified network interface to come up before running root hooks. (another alias, iconic)--wait-for-iface-timeoutโ sets the timeout forwait-for-interface.--wait-ifaceโ waits for the specified network interface to come up before running root hooks. (fourth one, yes really ๐)--wait-iface-timeoutโ sets the timeout forwait-for-interface.--wait-for-fsโ waits for the specified filesystem item to appear before running root hooks.--wait-for-fileโ waits for the specified file to appear before running root hooks.--wait-for-dirโ waits for the specified directory to appear before running root hooks.--wait-for-mountpointโ waits for the specified mountpoint to appear before running root hooks.--wait-for-fs-timeoutโ sets the timeout forwait-for-fs/file/dir.--wait-for-socketโ waits for the specified socket to be ready before loading apps.--wait-for-socket-timeoutโ sets the timeout forwait-for-socket.
call family ๐ same slots as exec/hook, except it's calling a function:
--call-asapโ calls the specified function as soon as possible.--call-pre-jailโ calls the specified function before jailing.--call-post-jailโ calls the specified function after jailing.--call-in-jailโ calls the specified function in jail after initialization.--call-as-rootโ calls the specified function before privileges drop.--call-as-userโ calls the specified function after privileges drop.--call-as-user-atexitโ calls the specified function before app exit and reload.--call-pre-appโ calls the specified function before app loading.--call-post-appโ calls the specified function after app loading.--call-as-vassalโ calls the specifiedfunction()beforeexec()ing the vassal.--call-as-vassal1โ calls the specifiedfunction(char *)beforeexec()ing the vassal.--call-as-vassal3โ calls the specifiedfunction(char *, uid_t, gid_t)beforeexec()ing the vassal.--call-as-emperorโ calls the specifiedfunction()in the emperor after the vassal has been started.--call-as-emperor1โ calls the specifiedfunction(char *)in the emperor after the vassal has been started.--call-as-emperor2โ calls the specifiedfunction(char *, pid_t)in the emperor after the vassal has been started.--call-as-emperor4โ calls the specifiedfunction(char *, pid_t, uid_t, gid_t)in the emperor after the vassal has been started.
--iniโ load config from an ini file.-y|--yamlโ load config from a yaml file.-y|--ymlโ load config from a yaml file. (same flag, same file, different spelling bestie)-j|--jsonโ load config from a json file.-j|--jsโ load config from a json file. (also the same, don't panic)--weightโ weight of the instance, used by clustering/lb/subscriptions.--auto-weightโ sets the weight of the instance automatically, used by clustering/lb/subscriptions.--no-serverโ forces no-server mode.--command-modeโ forces command mode.--no-defer-acceptโ disables deferred-accept on sockets.--tcp-nodelayโ enables TCP NODELAY on each request.--so-keepaliveโ enables TCP KEEPALIVEs.--so-send-timeoutโ setsSO_SNDTIMEO.--socket-send-timeoutโ setsSO_SNDTIMEO.--so-write-timeoutโ setsSO_SNDTIMEO.--socket-write-timeoutโ setsSO_SNDTIMEO.--socket-sndbufโ setsSO_SNDBUF.--socket-rcvbufโ setsSO_RCVBUF.--shutdown-socketsโ forces callingshutdown()in addition toclose()when sockets are destroyed.--limit-asโ limits processes address space/vsz.--limit-nprocโ limits the number of spawnable processes.--reload-on-asโ reloads if address space is higher than the specified megabytes.--reload-on-rssโ reloads if rss memory is higher than the specified megabytes.--evil-reload-on-asโ forces the master to reload a worker if its address space is higher than the specified megabytes ๐--evil-reload-on-rssโ forces the master to reload a worker if its rss memory is higher than the specified megabytes.--mem-collector-freqโ sets the memory collector frequency when evil reloads are in place.--reload-on-fdโ reloads if the specified file descriptor is ready.--brutal-reload-on-fdโ brutal reload if the specified file descriptor is ready ๐--ksmโ enables Linux KSM.--pcre-jitโ enables pcre jit, if available.--never-swapโ locks all memory pages, avoiding swapping.--touch-reloadโ reloads uWSGI if the specified file is modified/touched.--touch-workers-reloadโ triggers a reload of (only) workers if the specified file is modified/touched.--touch-mules-reloadโ reloads mules if the specified file is modified/touched.--touch-spoolers-reloadโ reloads spoolers if the specified file is modified/touched.--touch-chain-reloadโ triggers a chain reload if the specified file is modified/touched.--touch-logrotateโ triggers logrotation if the specified file is modified/touched.--touch-logreopenโ triggers log reopen if the specified file is modified/touched.--touch-execโ runs a command when the specified file is modified/touched. syntax:file command
okay bestie we're still deep in the option list, hydrate ๐ง and keep scrolling, because the filesystem-watcher girlies are up first โจ
--touch-signalโ clock a file getting modified or touched and fire off a signal when it happens. Syntax:file signal--fs-reloadโ the specified filesystem object gets modified โ graceful reload, no drama, no dropped vibes--fs-brutal-reloadโ same energy, but the reload is brutal ๐ค--fs-signalโ the filesystem object changes and uwsgi raises a signal, like a little poke. Syntax:file signal--check-mountpointโ if a filesystem stops being reachable, the instance just dies. Rude but reliable, and honestly iconic for solid Fuse management--mountpoint-checkโ literally the same thing as--check-mountpoint๐--check-mountโ yep, also the same. destroy the instance when a filesystem goes unreachable--mount-checkโ the fourth alias, same behaviour, same Fuse reliability agenda ๐ซถ--propagate-touchโ the original literally calls this an "over-engineering option for system with flaky signal management" and we respect the honesty--limit-postโ cap the request body. set that ceiling, protect the vibe--no-orphansโ when the master dies, the workers get taken out too, automatically. heads up though โ this can be dangerous for availability ๐ญ--prioโ set the priority of processes/threads--cpu-affinityโ set cpu affinity, let your processes pick their favourite core ๐--post-bufferingโ the size in bytes at which stuff gets buffered to disk instead of memory--post-buffering-bufsizeโ sets the buffer size forread()when you're in post buffering mode--body-read-warningโ how much memory (in megabytes) a request body is allowed to allocate before uwsgi starts printing a warning at you ๐ข--upload-progressโ turns on creation of.jsonfiles in the directory you name, so you can watch a file upload happening in real time ๐ธ--no-default-appโ no falling back to the default app. we're not doing that today--manage-script-nameโ automatically rewritesSCRIPT_NAMEandPATH_INFOfor you--ignore-script-nameโ just straight up ignoresSCRIPT_NAME--catch-exceptionsโ reports the exception as http output. discouraged โ use only for testing, it's giving debug-mode energy, not production ๐--reload-on-exceptionโ a worker raises an exception โ that worker gets reloaded--reload-on-exception-typeโ reload the worker when one specific exception type gets raised--reload-on-exception-valueโ reload the worker when a specific exception value shows up--reload-on-exception-reprโ reload when a specific exception type+value combo is raised (language-specific, iykyk)--exception-handlerโ add an exception handler--enable-metricsโ turn on the whole metrics subsystem ๐--metricโ add a custom metric of your very own, main character metric--metric-thresholdโ add a metric threshold/alarm--metric-alarmโ add a metric threshold/alarm (same thing, different spelling of the same dream)--alarm-metricโ add a metric threshold/alarm, third alias edition ๐--metrics-dirโ export metrics as text files into the directory you specify--metrics-dir-restoreโ restores the last value taken from the metrics dir--metric-dirโ export metrics as text files to the specified directory (the singular-flavoured alias)--metric-dir-restoreโ restore last value taken from the metrics dir--metrics-no-coresโ stop generating the cores-related metrics--udpโ run the udp server on the address you give it--statsโ enable the stats server on the specified address ๐--stats-serverโ enable the stats server on the specified address (same vibe, second name)--stats-httpโ prefixes the stats server json output with http headers--stats-minifiedโ minify the statistics json output, compact queen--stats-minโ minify the statistics json output, yes again โจ--stats-pushโ push the stats json to whatever destination you name--stats-pusher-default-freqโ set the default frequency of stats pushers--stats-pushers-default-freqโ set the default frequency of stats pushers (plural version, same deal)--stats-no-coresโ disable generation of cores-related stats--stats-no-metricsโ keeps metrics out of the stats output entirely--multicastโ subscribe to the multicast group you specify--multicast-ttlโ set multicast ttl--multicast-loopโ set multicast loop, and the default is1--master-fifoโ enable the master fifo ๐--notify-socketโ enable the notification socket--subscription-notify-socketโ set the notification socket for subscriptions
legion time ๐ซก this is the swarm/cluster arc and it goes hard
--legionโ you become a member of a legion--legion-mcastโ also become a member of a legion, this is the shortcut for multicast--legion-nodeโ add a node to a legion--legion-freqโ set the frequency of legion packets--legion-toleranceโ set the tolerance of the legion subsystem--legion-death-on-lord-errorโ if one of the lord hooks fails, declare itself a dead node for however many seconds you specify--legion-skew-toleranceโ clock skew tolerance for the legion subsystem, default60seconds โฐ--legion-lordโ the action to call on Lord election ๐--legion-unlordโ the action to call on Lord dismiss--legion-setupโ action to call on legion setup--legion-deathโ action to call on legion death, aka the shutdown of the instance ๐--legion-joinโ action to call on legion join, i.e. the first time quorum is reached--legion-node-joinedโ action to call when a new node joins the legion--legion-node-leftโ action to call when a node leaves the legion--legion-quorumโ set the quorum of a legion--legion-scrollโ set the scroll of a legion--legion-scroll-max-sizeโ max size of the legion scroll buffer--legion-scroll-list-max-sizeโ max size of the legion scroll list buffer--subscriptions-sign-checkโ set the digest algorithm and certificate directory for the secured subscription system ๐--subscriptions-sign-check-toleranceโ max tolerance (in seconds) of clock skew for the secured subscription system--subscriptions-sign-skip-uidโ skip the signature check for the uid you name, when unix sockets credentials are in play--subscriptions-credentials-checkโ add a directory to search for subscriptions key credentials--subscriptions-use-credentialsโ enable management ofSCM_CREDENTIALSin subscriptions UNIX sockets--subscription-algoโ set the load balancing algorithm for the subscription system--subscription-dotsplitโ tries to fall back to the next part (dot based) in the subscription key--subscribe-toโ subscribe to the subscription server you specify--stโ subscribe to the specified subscription server (tiny name, big job)--subscribeโ subscribe to the specified subscription server--subscribe2โ subscribe to the specified subscription server, but using the advanced keyval syntax--subscribe-freqโ send the subscription announce at the interval you set--subscription-toleranceโ set tolerance for subscription servers--unsubscribe-on-graceful-reloadโ forces the unsubscribe request through even during a graceful reload--start-unsubscribedโ configure the subscriptions but don't actually send them. genuinely useful with master fifo--subscribe-with-modifier1โ force the specifiedmodifier1when subscribing
snmp + ssl arc, aka the "lock it down" chapter ๐
--snmpโ enable the embedded snmp server--snmp-communityโ set the snmp community string--ssl-verboseโ be loud and verbose about SSL errors ๐ข--ssl-verify-depthโ set the maximum certificate verification depth--sniโ add an SNI-governed SSL context--sni-dirโ checks forcert/key/client_cafiles in the directory you name and creates a sni/ssl context on demand, whenever it's needed โจ--sni-dir-ciphersโ set ssl ciphers for thesni-diroption--ssl-enable3โ enable SSLv3. insecure, bestie, we're saying it out loud ๐ญ--ssl-enable-sslv3โ enable SSLv3, also insecure--ssl-enable-tlsv1โ enable TLSv1, also insecure--ssl-optionโ set a raw ssl option, and it takes a numeric value--sni-regexpโ add an SNI-governed SSL context, but here the key is a regexp ๐ง--ssl-tmp-dirโ store ssl-related temp files in the directory you specify--check-intervalโ the interval, in seconds, between master checks--forkbomb-delayโ when a forkbomb is detected, sleep for the number of seconds you specify ๐ด--binary-pathโ force the binary path--privileged-binary-patchโ patch the uwsgi binary with a new command, done before the privileges drop--unprivileged-binary-patchโ patch the uwsgi binary with a new command, done after the privileges drop--privileged-binary-patch-argโ patch the uwsgi binary with a new command and arguments, before privileges drop--unprivileged-binary-patch-argโ patch the uwsgi binary with a new command and arguments, after privileges drop--asyncโ enable async mode with however many cores you specify--max-fdโ set the maximum number of file descriptors. requires root privileges ๐--logtoโ set the logfile/udp address--logto2โ log to the file or udp address you name, but after the privileges drop--log-formatโ set an advanced format for request logging--logformatโ set an advanced format for request logging (short version, same glow)--logformat-strftimeโ applystrftimeto the logformat output--log-format-strftimeโ applystrftimeto the logformat output--logfile-chownโchownthe logfiles--logfile-chmodโchmodthe logfiles--log-syslogโ log to syslog--log-socketโ send logs to the socket you specify--req-loggerโ set/append a request logger--logger-reqโ set/append a request logger (flipped name, same energy)--loggerโ set/append a logger--logger-listโ list the enabled loggers--loggers-listโ list the enabled loggers, plural girlies rise ๐ซถ--threaded-loggerโ offload the log writing to a thread, so it doesn't block your whole life--log-encoderโ add an item into the log encoder chain--log-req-encoderโ add an item into the log req encoder chain--log-drainโ drain (aka do not show) log lines matching the regexp you give it--log-filterโ show only the log lines matching the specified regexp--log-routeโ if the regexp applied on the logline matches, log to the named logger you specified--log-req-routeโ if the regexp applied on the logline matches, log the requests to the named logger you specified--use-abortโ callsabort()on segfault/fpe, which could genuinely be useful for generating a core dump ๐--alarmโ create a new alarm. Syntax:<alarm> <plugin:args>โฐ
and that's part 4, no cap โ more incoming, don't go anywhere ๐
--alarm-cheapโ okay so instead of birthing a whole dedicated thread for each curl-based alarm, just run them on the main alarm thread. cheap in the best way. ๐ธ--alarm-freqโ tune the anti-loop alarm system. the default is3seconds, and yes you can change it. ๐--alarm-fdโ raise the specified alarm when an fd is read for read. by default it reads1byte โ set it to8if you're doingeventfd. ๐--alarm-segfaultโ raise the specified alarm the moment the segmentation fault handler runs. ๐ญ--segfault-alarmโ same thing as--alarm-segfault, fr: raise the specified alarm when the segmentation fault handler is executed.--alarm-backlogโ raise the specified alarm when the socket backlog queue is full. ๐--backlog-alarmโ identical energy to--alarm-backlog: raise the specified alarm when the socket backlog queue is full.--lq-alarmโ raise the specified alarm when the socket backlog queue is full. (yes, this is the same alarm again, the backlog queue is that girl.) ๐ฆ--alarm-lqโ raise the specified alarm when the socket backlog queue is full. same as--lq-alarm, just spelled the other way around.--alarm-listen-queueโ raise the specified alarm when the socket backlog queue is full. ๐ง--listen-queue-alarmโ raise the specified alarm when the socket backlog queue is full. no cap, same behaviour, different name order.--log-alarmโ raise the specified alarm whenever a log line matches the regexp you give it. syntax is exactly:<alarm>[,alarm...] <regexp>โจ--alarm-logโ raise the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>. same as--log-alarm, different outfit. ๐--not-log-alarmโ skip the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>. ๐ซ--not-alarm-logโ skip the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>. same as--not-log-alarm.--alarm-listโ list enabled alarms. go off, show me the roster. ๐--alarms-listโ list enabled alarms. (plural edition, same tea.) ๐ต--alarm-msg-sizeโ set the max size of an alarm message. default is8192. ๐--log-masterโ delegate logging to the master process. hand it over, queen. ๐--log-master-bufsizeโ set the buffer size for the master logger. heads up bestie: bigger log messages will be truncated. โ๏ธ--log-master-streamโ create the master logpipe 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. fresh page, clean slate. ๐งผ--log-maxsizeโ set the maximum logfile size. ๐ฆ--log-backupnameโ set the logfile name used after rotation. ๐--logdateโ prefix logs with a date, or with astrftimestring. ๐๏ธ--log-dateโ prefix logs with a date or astrftimestring. same as--logdate.--log-prefixโ prefix logs with a string of your choosing. ๐--log-zeroโ log responses that have no body. zero body, still logged. ๐ป--log-slowโ log requests slower than the number of milliseconds you specify. ๐--log-4xxโ log requests with a4xxresponse. ๐--log-5xxโ log requests with a5xxresponse. ๐ฅ--log-bigโ log requests bigger than the size you specify. ๐--log-sendfileโ log sendfile requests. ๐ค--log-ioerrorโ log requests that hit io errors. ๐ต--log-microsโ report response time in microseconds instead of milliseconds. precision era. โฑ๏ธ--log-x-forwarded-forโ use the ip from theX-Forwarded-Forheader instead ofREMOTE_ADDR. ๐ต๏ธ--master-as-rootโ leave the master process running asroot. periodt. ๐ซ--drop-after-initโ run privileges drop after plugin initialization. heads up: this one is superseded bydrop-after-apps. โ ๏ธ--drop-after-appsโ run privileges drop after apps loading. heads up again: this one is superseded bymaster-as-root. โ ๏ธ--force-cwdโ force the initial working directory to the value you specify. ๐--binshโ override/bin/sh. this is what the exec hooks use, and it always falls back to/bin/sh. ๐--chdirโ chdir to the specified directory before apps loading. ๐--chdir2โ chdir to the specified directory after apps loading. ๐--lazyโ set lazy mode: load apps in the workers instead of the master. ๐ฆฅ--lazy-appsโ load apps in each worker instead of the master. ๐ฃ--cheapโ set cheap mode: spawn workers only after the first request. ๐ธ--cheaperโ set cheaper mode, aka adaptive process spawning. ๐--cheaper-initialโ set the initial number of processes to spawn in cheaper mode. ๐ฑ--cheaper-algoโ choose the algorithm used for adaptive process spawning. ๐ง--cheaper-stepโ the number of additional processes to spawn at each overload. โ--cheaper-overloadโ increase workers after the specified overload. ๐--cheaper-algo-listโ list enabled cheapers algorithms. ๐--cheaper-algos-listโ list enabled cheapers algorithms. (plural algo edition.) ๐--cheaper-listโ list enabled cheapers algorithms. same roster, shorter name. ๐--cheaper-rss-limit-softโ don't spawn new workers if the total resident memory usage of all workers is higher than this limit. ๐งฏ--cheaper-rss-limit-hardโ if total workers resident memory usage is higher, try to stop workers. yikes, dramatic but correct. ๐--idleโ set idle mode: put uWSGI into cheap mode after inactivity. ๐ด--die-on-idleโ shutdown uWSGI when idle. rip bestie. โฐ๏ธ--mountโ load application under a mountpoint. โฐ๏ธ--worker-mountโ load application under a mountpoint in the specified worker, or after workers spawn. ๐งโ๐ญ--threadsโ run each worker in prethreaded mode with the specified number of threads. ๐งต--thread-stacksizeโ set threads stacksize. ๐--threads-stacksizeโ set threads stacksize. same as--thread-stacksize. ๐--thread-stack-sizeโ set threads stacksize. same thing, extra dash, still iconic. ๐--threads-stack-sizeโ set threads stacksize. yes, all four spellings exist. ๐--vhostโ enable virtualhosting mode, based on theSERVER_NAMEvariable. ๐--vhost-hostโ enable virtualhosting mode, based on theHTTP_HOSTvariable. ๐ก
--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 spelling. ๐ก--error-page-403โ add an error page (html) for the managed403response. ๐ซ--error-page-404โ add an error page (html) for the managed404response. ๐ซฅ--error-page-500โ add an error page (html) for the 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. same vibe, singularwebsocket. ๐--websockets-pong-toleranceโ set the tolerance (in seconds) of the websockets ping/pong subsystem. ๐พ--websocket-pong-toleranceโ set the tolerance (in seconds) of the websockets ping/pong subsystem. same, singular edition. ๐พ--websockets-max-sizeโ set the max allowed size of websocket messages, in Kbytes. default is1024. ๐ฆ--websocket-max-sizeโ set the max allowed size of websocket messages, in Kbytes. default1024. same thing, one fewers. ๐ฆ--chunked-input-limitโ set the max size of a chunked input part. default is1MB, and it's in bytes. ๐งฉ--chunked-input-timeoutโ set the default timeout for chunked input. โณ--clockโ set a clock source. ๐ฐ๏ธ--clock-listโ list enabled clocks. ๐ฐ๏ธโจ
okay bestie, we're in the final stretch of the options list and honestly? it's giving "static files, daemons and cursed kernel flags" and I'm obsessed ๐ stay with me, every single flag is still here, no cap.
--clocks-listโ lists all the clocks that are enabled โฐ--add-headerโ automatically adds HTTP headers to the response--rem-headerโ automatically removes the HTTP header you specify from the response--del-headerโ automatically removes the HTTP header you specify from the response (yes bestie, it's the same job as--rem-header, they're twins ๐ซถ)--collect-headerโ stores the response header you specify in a request var (syntax:header var)--response-header-collectโ stores the response header you specify in a request var (syntax:header var) โ same vibe, different name--pull-headerโ stores the response header you specify in a request var and removes it from the response (syntax:header var)
๐ธ static files era ๐ธ
--check-staticโ checks for static files in the directory you specify--check-static-docrootโ checks for static files in the requestedDOCUMENT_ROOT--static-checkโ checks for static files in the directory you specify--static-mapโ maps a mountpoint to a static directory (or file)--static-map2โ like--static-mapbut it completely appends the requested resource to the docroot--static-skip-extโ skips the extension you specify from staticfile checks--static-indexโ searches for the file you specify if a directory is requested--static-safeโ skips security checks if the file is under the path you specify--static-cache-pathsโ puts resolved paths in the uWSGI cache for the amount of seconds you specify--static-cache-paths-nameโ uses the cache you specify for static paths--mimefileโ sets the mime types file path (default/etc/mime.types)--mime-fileโ sets the mime types file path (default/etc/mime.types)--static-expires-typeโ sets 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
๐ the gzip girlies ๐
--static-gzipโ if the regexp you supply matches the static file translation, it will search for a gzip version--static-gzip-allโ checks for a gzip version of all requested static files--static-gzip-dirโ checks for a gzip version of all requested static files in the dir/prefix you specify--static-gzip-prefixโ checks for a gzip version of all requested static files in the dir/prefix you specify--static-gzip-extโ checks for a gzip version of all requested static files with the ext/suffix you specify--static-gzip-suffixโ checks for a gzip version of all requested static files with the ext/suffix you specify
--honour-rangeโ enables support for the 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()(ngl the "boring" is the manpage's own words, I'm just the messenger ๐)--check-cacheโ checks for response data in the cache you specify (empty means the default cache)--close-on-execโ sets close-on-exec on connection sockets (could be required for spawning processes in requests)--close-on-exec2โ sets close-on-exec on server sockets (could be required for spawning processes in requests)
โจ env, modes and tidying up โจ
--modeโ set uWSGI custom mode--envโ set environment variable--envdirโ loads a daemontools compatible envdir--early-envdirโ loads a daemontools compatible envdir ASAP--unenvโ unsets environment variable--vacuumโ tries to remove all of the generated file/sockets ๐งน--file-writeโ writes the content you specify to the file you specify (syntax:file=value) before privileges drop--cgroupโ puts the processes in the cgroup you specify--cgroup-optโ sets a value in the cgroup option you specify--cgroup-dir-modeโ sets permission for the cgroup directory (default is700)--namespaceโ runs in a new namespace under the rootfs you specify--namespace-keep-mountโ keeps the mountpoint you specify in your namespace--nsโ runs in a new namespace under the rootfs you specify--namespace-netโ adds a network namespace--ns-netโ adds a network namespace
๐ฅ socket behaviour, enter the zerg ๐ฅ
--enable-proxy-protocolโ enablesPROXY1protocol support (only for http parsers)--reuse-portโ enables theREUSE_PORTflag on the socket (BSD only, bestie, don't come for me)--tcp-fast-openโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you specify--tcp-fastopenโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you specify--tcp-fast-open-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported--tcp-fastopen-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported--zergโ attach to a zerg server ๐--zerg-fallbackโ falls back to normal sockets if the zerg server isn't available--zerg-serverโ enables the zerg server on the UNIX socket you specify
โฐ cron o'clock โฐ
--cronโ adds a cron task--cron2โ adds a cron task (key=val syntax)--unique-cronโ adds a unique cron task--cron-harakiriโ sets the maximum time (in seconds) we wait for a cron command to complete--legion-cronโ adds a cron task runnable only when the instance is a lord of the legion you specify--cron-legionโ adds a cron task runnable only when the instance is a lord of the legion you specify--unique-legion-cronโ adds a unique cron task runnable only when the instance is a lord of the legion you specify--unique-cron-legionโ adds a unique cron task runnable only when the instance is a lord of the legion you specify
--loopโ select the uWSGI loop engine--loop-listโ lists enabled loop engines--loops-listโ lists enabled loop engines--worker-execโ runs the command you specify as worker--worker-exec2โ runs the command you specify as worker (after the post_fork hook)
๐ซถ daemon attachment hours ๐ซถ
--attach-daemonโ attaches a command/daemon to the master process (the command has to not go in background)--attach-control-daemonโ attaches a command/daemon to the master process (the command has to not go in background); when the daemon dies, the master dies too ๐--smart-attach-daemonโ attaches a command/daemon to the master process managed by a pidfile (the command has to daemonize)--smart-attach-daemon2โ attaches a command/daemon to the master process managed by a pidfile (the command has to NOT daemonize โ opposite energy, same flag family)--legion-attach-daemonโ same as--attach-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โ attach-daemon keyval variant (supports smart modes too)
๐ง plugins, bestie ๐ง
--pluginsโ load uWSGI plugins--pluginโ load uWSGI plugins--need-pluginsโ load uWSGI plugins (exit on error)--need-pluginโ load uWSGI plugins (exit on error)--plugins-dirโ add a directory to the uWSGI plugin search path--plugin-dirโ add a directory to the uWSGI plugin search path--plugins-listโ lists enabled plugins--plugin-listโ lists enabled plugins--autoloadโ tries to automatically load plugins when unknown options are found--dlopenโ blindly loads a shared library (yes. blindly. ๐)--allowed-modifiersโ comma separated list of allowed modifiers--remap-modifierโ remap request modifier from one id to another
๐ the meta / dev-tools section ๐
--dump-optionsโ dumps the full list of available options--show-configโ shows the current config reformatted as ini--binary-append-dataโ returns the content of a resource to stdout for appending to a uwsgi binary (fordata://usage)--printโ simple print--iprintโ simple print (immediate version)--exitโ forceexit()of the instance--cflagsโ report uWSGICFLAGS(useful for building external plugins)--dot-hโ dump theuwsgi.hused for building the core (useful for building external plugins)--config-pyโ dump theuwsgiconfig.pyused for building the core (useful for building external plugins)--build-pluginโ build a uWSGI plugin for the current binary--versionโ print uWSGI version--response-headers-limitโ set response header maximum size (default:64k)
and that's the whole options list, bestie โ every last flag, no skips, no summaries, we ate ๐
and with that we're at the very end of the page, so here's the cute sign-off: this manual is for uwsgi_lua, version 2.0.31-2, dated February 2026, and it goes by UWSGI_LUA(1) when it's out in these streets ๐ thanks for reading all the way to the bottom, you're a real one ๐๐ฆ
๐ฆ where this page comes from
- ubuntu resolute: uwsgi-plugin-lua5.1 2.0.31+2+0.0.2build2 ยท GPL-3.0-only
- ubuntu stonking: uwsgi-plugin-lua5.1 2.0.31+2+0.0.2build2 ยท GPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms