# Server types

> The seven Falak server types — app, web, db, cache, worker, load balancer and builder — what each installs and hosts, and layouts from one server to many.

Source: https://falak.sh/docs/servers/server-types/

Every server has a **type**, chosen when you create it. The type limits which software can be installed and what the server can host.

## Types

| Type | Value | Description | Hosts sites | Serves HTTP | Software you can pick |
|---|---|---|:-:|:-:|---|
| **App server** | `app` | All-in-one: PHP, Node, database and cache on one machine | ✓ | ✓ | PHP, Node, database, cache, Docker |
| **Web server** | `web` | Serves sites behind Caddy / FrankenPHP; database and cache live elsewhere | ✓ | ✓ | PHP, Node, Docker |
| **Database server** | `db` | Dedicated database engine | | | Database |
| **Cache server** | `cache` | Dedicated Redis / Valkey | | | Cache |
| **Worker server** | `worker` | Queue workers, daemons and scheduled tasks; no public web traffic | ✓ | | PHP, Node, Docker |
| **Load balancer** | `lb` | Caddy load balancer in front of web servers | | ✓ | none |
| **Builder** | `builder` | Builds releases and images (Railpack / BuildKit) for other servers | | | Node, Docker |

### Software options

| Component | Options |
|---|---|
| PHP runtime | FrankenPHP (default) or PHP-FPM |
| PHP versions | 8.1, 8.2, 8.3, 8.4 (default), 8.5 |
| Node.js | 20, 22 (default), 24 |
| Database | PostgreSQL, MySQL, MariaDB (Ubuntu packages); can also be [installed later](/docs/databases/create-databases/#install-an-engine-on-an-existing-server) on an app server |
| Cache | Redis or Valkey |
| Docker | Docker Engine with Compose v2 and Buildx |

### Firewall defaults

- All types: SSH (22) allowed.
- Types that serve HTTP (`app`, `web`, `lb`): also 80 and 443.
- Everything else is dropped.

## Recommended layouts

| Stage | Layout |
|---|---|
| Side project | 1 × **app** (sites + database + cache) |
| Small production | 1 × **app** or **web** + 1 × **db** |
| Growing | 2+ × **web** + 1 × **lb** + 1 × **db** + 1 × **cache** + 1 × **worker** |
| Docker/Compose builds | add 1 × **builder** with Docker |

Keep the control plane on its own host in every layout.

## Changing a type

The type is chosen at creation. To change it, create a new server of the right type, move sites to it (**Settings → Servers**), and delete the old one.

## Next steps
