config.yml.
How the subnet hierarchy works
There are threegerbil settings that work together, each nested inside the one before it:
subnet_group- The overall CIDR range that exit node subnets are carved from. This is the outermost container.block_size- The size of the subnet an exit node reserves for itself out ofsubnet_groupwhen it registers. This is the persistent subnet for that exit node.site_block_size- The size of the subnet each site or client reserves for itself out of its exit node’sblock_sizeblock when it connects.
subnet_group must be large enough to contain many block_size blocks (one per exit node), and each block_size block must be large enough to contain many site_block_size blocks (one per site or client).
With the defaults, this looks like:
config.yml
- A
/20subnet_groupholds 16 non-overlapping/24blocks, so it can support up to 16 exit nodes. - A
/24block_sizeholds 64 non-overlapping/30blocks, so each exit node can support up to 64 sites and clients.
Smaller numbers after the slash mean more addresses (a
/22 is bigger than a /24). Increasing a block size means moving to a smaller number, and it always shrinks how many of the next-larger container it can fit into - which is why growing block_size usually means you also need to grow subnet_group.Increasing the number of sites and clients per exit node
If your exit nodes are running out of room for sites and clients, increaseblock_size so each exit node reserves a bigger subnet. Because a bigger block_size block takes up more of subnet_group, you should also grow subnet_group at the same time so it can still fit as many exit nodes as you need.
For example, to go from 64 sites/clients per exit node to 1,024, and keep room for 16 exit nodes:
config.yml
site_block_size (e.g. from /30 to /29 or /28) if individual sites need more addresses for heavy WireGuard usage, but doing so reduces how many sites/clients fit in each exit node’s block, so weigh that trade-off against your capacity needs.
Applying the change
Changing any ofsubnet_group, block_size, or site_block_size changes the addressing scheme for every exit node, site, and client, so existing exit node records need to be cleared out and re-created against the new ranges.
1
Update config.yml
Edit the
gerbil.subnet_group, gerbil.block_size, and/or gerbil.site_block_size values on every node in your deployment (they must match everywhere).2
Clear exit nodes from the database
Use See Clear Exit Nodes for details.
pangctl to remove existing exit node records so they get re-created using the new ranges:3
Restart the full stack
Restart every container in your Pangolin stack (Pangolin, Gerbil, Traefik, etc.) so the exit node re-registers with the new subnet settings.
4
Restart sites and clients
Existing Newt sites and Olm clients may need to be restarted to pick up new addresses from their exit node and reconnect.

