PUMA(1)
β¨ PUMA β like, the manual page bestie β¨
puma β a fast, concurrent web server for ruby and rack π (yes that's the NAME section, we're doing this properly)
π¦ USAGE π¦
okay so here's the shape of it:
puma [options...] [rackup file]
puma [-h | --help | -V | --version]
that's it. that's the whole vibe check. π
π OPTIONS π
The following options are available (all of them, bestie, I'm not skipping a single one):
-b,--bind URIβ the URI you wanna bind to, liketcp://,unix://,ssl://. π«Ά-C,--config PATHβ load that path as a config file. give it the path, it does the thing.--control URLβ DEPRECATED alias for--control-url. it's giving legacy, ngl. π--control-token TOKENβ theTOKENused as authentication for the control server.--control-url URLβ the bind URL for the control server and app. useautoto use a temp unix server. this requires you to use a--control-token, which needs to be given with every request to the control server (token=foo). no token no entry, periodt.-d,--daemonβ demonize the server into the background. go girl give us nothing (visually, she's running in the back) π--debugβ show low level debugging information. the tea β--dir DIRβ change to the given directory before starting.-e,--environment ENVIRONMENTβ the environment to run the Rack app on. Defaultdevelopment.-I,--include PATHβ specify$LOAD_PATHdirectories.-p,--port PORTβ define the TCP port to bind to. use-bfor more advanced options, iykyk.--pidfile PATHβ use the given path as PID file.--preloadβ preload the application. this loads all the application code prior to forking. preloading reduces total memory usage of an application and is only available in cluster mode. β¨--prune-bundlerβ prune out the bundler env if possible.-q,--quietβ do not log requests internally. Default:true. π€«-v,--log-requestsβ log requests as they occur. the receipts! π§Ύ-R,--restart-cmd CMDβ the puma command to run during a hot restart. Default: inferred.-S,--state PATHβ where to store the state details.-t,--threads INTβ Min:max threads to use. Puma will automatically scale the number of threads, from the minimum until it caps out at the maximum, based on how much traffic is present. Default:0:16. she scales, she adapts, main character energy fr fr π₯--tcp-modeβ run the app in raw TCP mode instead of HTTP mode.--early-hintsβ enable early hints support.-w,--workers COUNTβ activate cluster mode and define number of worker processes to create. in this mode workers are forked from a master process. each child process still has its own thread pool and the-tsetting is per worker. π--tag NAMEβ additional text to display in process listing.--redirect-stdout FILEβ redirect STDOUT to a specific file.--redirect-stderr FILEβ redirect STDERR to a specific file.--[no-]redirect-appendβ append to redirected files.-h,--helpβ show help. we love a helpful icon π-V,--versionβ print the version information.
πΈ EXAMPLES πΈ
The following examples show how to bind TCP or sockets:
Bind Puma to a socket with the -b (or --bind) flag:
puma -b tcp://127.0.0.1:9292
To use a UNIX Socket instead of TCP:
puma -b unix:///var/run/puma.sock
To change the permissions of the UNIX socket, add a umask parameter:
puma -b 'unix:///var/run/puma.sock?umask=0111'
In need of a bit of security use SSL sockets:
puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'
The following example show how to Create a control server and use pumactl(1) to interact with the control server to restart puma:
puma --control-url tcp://127.0.0.1:9293 --control-token foo
pumactl --control-url 'tcp://127.0.0.1:9293' --control-token foo
restart
likeβ¦ she's literally controlling herself through a whole other command. iconic. π
π CONFIGURATION FILE π
puma will look for a configuration file at config/puma.rb. If an environment is specified, either via the -e and --environment flags, or through the RACK_ENV or the RAILS_ENV environment variables, it looks for configuration at config/puma/<environment_name>.rb.
The -C flag allows one to pass on a custom configuration location. If the value specified is a dash (-) puma won't look for any configuration file:
puma -C "-"
so like, -C "-" = no config, we're going in raw. π«£
π§ SEE ALSO π§
There is extensive documentation at <https://puma.io/puma/> and <https://github.com/puma/puma>. go read it bestie, it's giving extensive. πβ¨
π AUTHOR π
This manual page was written by Daniel Leidert <dleidert@debian.org>, for the Debian GNU/Linux system (but may be used by others).
and that's the whole thing!! π this was PUMA 3.12, from January 2020 β yes she's a lil vintage but she ate and left no crumbs. mwah, go run your server bestie π
π¦πΈ
π¦ where this page comes from
- debian bookworm: puma 5.6.5-3+deb12u1 Β· BSD-3-Clause
- debian bookworm: puma 5.6.5-3+deb12u2 Β· BSD-3-Clause
- debian trixie: puma 6.6.0-4 Β· BSD-3-Clause
- ubuntu jammy: puma 5.5.2-2ubuntu2 Β· BSD-3-Clause
- ubuntu noble: puma 6.4.2-4ubuntu4 Β· BSD-3-Clause
- ubuntu noble: puma 6.4.2-4ubuntu4.3 Β· BSD-3-Clause
- ubuntu questing: puma 6.6.0-4
- ubuntu resolute: puma 6.6.0-4build1 Β· BSD-3-Clause
- ubuntu stonking: puma 8.0.2-3build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms