Skip to main content
Documentation Configuration Customize Your Site

Puma Configuration

Bridgetown uses the Puma web server (along with Roda) for serving up statically-built files as well as any dynamic routes.

The default port number for the server is 4000. The easiest way to change this is to add this to your config YAML:

bind: "tcp://0.0.0.0:4001"

# or if you only want to change this in development:
development:
  bind: "tcp://0.0.0.0:4002"

Alternatively, you can set the BRIDGETOWN_PORT environment variable which will be picked up by Puma. Or you can pass an entire bind URL via -B or --bind on the command line:

bin/bridgetown start --bind=tcp://0.0.0.0:3000

Other Puma configuration options are available in the config/puma.rb file in your Bridgetown repo. Many of these Ruby DSL options, such as concurrency (how many separate forked Puma processes startup) and per-process threading, are documented here.

Back to Customize Your Site