Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/04-get-started/03-how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Serverpod is a full backend. It manages your database, authentication, file uplo

A Serverpod project starts with the `serverpod create` command, which walks you through a few choices that shape what it generates:

- **Code editors and AI agents:** Pick any of Antigravity, Claude, Codex, Cursor, OpenCode, and VS Code, or **None**. Serverpod installs skills and MCP servers for each one you select.
- **Project type:** A server with a Flutter app (the default), a server only, or a reusable [module](./concepts/server-fundamentals/modules) shared across servers.
- **Database and caching:** Add a Postgres database and Redis (for pub/sub and caching).
- **Authentication:** Built-in email and social sign-ins.
- **Web server:** Optionally serve web pages and your Flutter web app alongside your API.
- **Code editors and AI agents (optional):** Pick any of Antigravity, Claude, Codex, Cursor, OpenCode, and VS Code. Serverpod installs skills and MCP servers for each one you select.
- **Authentication:** Built-in email and social sign-ins.

The result is one workspace. For the default project type, it has three Dart packages:

Expand Down
2 changes: 1 addition & 1 deletion docs/05-build-your-first-app/01-creating-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Use `serverpod create` to generate a new project with a server, a client, and a
$ serverpod create magic_recipe
```

The command is interactive. Step through the prompts, accepting the defaults.
The command is interactive. Pick your editors or **None** on the first screen, then accept the defaults on the rest.

Open the project's **root** folder (`magic_recipe`) in your editor, not one of the sub-packages. This keeps the analyzer in sync when code is generated and makes it easy to move between the server and app.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Each editor you pick at create time gets its own MCP config, which registers Ser
| OpenCode | `opencode.json` | `.opencode/skills/` |
| Antigravity | `.agents/plugins/serverpod-local/` | `.agents/skills/` |

The setup screen preselects no editors, so pick the ones you use. With `--no-interactive`, `serverpod create` configures Claude, Cursor, and VS Code unless you pass `--ide`.
The first `serverpod create` screen preselects no editors, so pick the ones you use, or **None**. With `--no-interactive`, `serverpod create` configures Claude, Cursor, and VS Code unless you pass `--ide`.

The workspace `.gitignore` excludes these files for every editor except OpenCode, so Git picks up `opencode.json` and `.opencode/` unless you add them to `.gitignore`.

Expand Down
4 changes: 2 additions & 2 deletions docs/06-concepts/07-operations/07-redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Turn Redis on when more than one Serverpod instance must share a cache, pass mes

Whether a new project includes Redis configuration depends on how you created it:

- **`serverpod create` with the setup screen:** only if you select Redis.
- **`serverpod create` without the setup screen** (for example with `--no-interactive`): included by default.
- **Interactive `serverpod create`:** only if you select Redis on the **Database & caching** screen.
- **`serverpod create` without questions** (for example with `--no-interactive`): included by default.
- **`serverpod quickstart`:** always included.

Including it copies the config, the Compose service, and a generated password. It doesn't turn Redis on.
Expand Down
6 changes: 3 additions & 3 deletions docs/06-concepts/cli/commands/create/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

`serverpod create` scaffolds a new Serverpod project. By default it generates a full server project with a database, a server package, a client package, and a Flutter app.

In an interactive terminal, `serverpod create` opens a setup screen where you choose the project's features. Pass `--template server` for a server without a Flutter app, or `--template module` to create a shareable module. To set up the prerequisites first, see [Installation](../../../../04-get-started/01-installation.md).
In an interactive terminal, `serverpod create` asks about the project's features one screen at a time, starting with the editors and AI agents you use. Pass `--template server` for a server without a Flutter app, or `--template module` to create a shareable module. To set up the prerequisites first, see [Installation](../../../../04-get-started/01-installation.md).

The `--database`, `--redis`, `--auth`, `--webapp`, `--website`, and `--ide` flags apply only when the setup screen does not open, for example with `--no-interactive` or in CI. Without the setup screen, the project also gets Redis configuration and editor setup for Claude, Cursor, and VS Code, unless you pass `--no-redis` or choose editors with `--ide`.
The `--database`, `--redis`, `--auth`, `--webapp`, `--website`, and `--ide` flags apply only when there are no questions, for example with `--no-interactive` or in CI. In that case, the project also gets Redis configuration and editor setup for Claude, Cursor, and VS Code, unless you pass `--no-redis` or choose editors with `--ide`.

To create a project without a database, deselect **Database (recommended)** under **Database & caching** on the setup screen, or pass `--no-interactive --no-database`. The new project's run mode files then have no `database` section, which is what turns off database code generation. See [Database backends](../../../01-server-fundamentals/03-configuration.md#database-backends).
To create a project without a database, deselect **Database (recommended)** on the **Database & caching** screen, or pass `--no-interactive --no-database`. The new project's run mode files then have no `database` section, which is what turns off database code generation. See [Database backends](../../../01-server-fundamentals/03-configuration.md#database-backends).
4 changes: 2 additions & 2 deletions docs/07-tutorials/02-real-time-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ With the release of Serverpod 2.1, a new feature called [streaming methods](../c

## Setting up the project

We begin by creating a new project with the `serverpod create` command. Pixorama keeps its image in memory, so it doesn't need a database. In the interactive setup, deselect **Database (recommended)** under **Database & caching** and keep the other defaults:
We begin by creating a new project with the `serverpod create` command. Pixorama keeps its image in memory, so it doesn't need a database. In the interactive setup, pick your editors or **None**, deselect **Database (recommended)** on the **Database & caching** screen, and keep the other defaults:

```bash
serverpod create pixorama
```

If you run the command non-interactively, pass `--no-interactive --no-database --no-redis --ide none` instead. The last two flags match the interactive defaults. Without them, the command adds Redis and AI agent setup for Claude, Cursor, and VS Code.
If you run the command non-interactively, pass `--no-interactive --no-database --no-redis --ide none` instead. Without the last two flags, the command adds Redis and AI agent setup for Claude, Cursor, and VS Code.

Now, let's open the project in VS Code and explore the structure. The server code resides in the `pixorama_server` package. We'll start by creating models - classes that we can serialize and pass between the client and server. Our models will be placed in the `lib/src/models` directory.

Expand Down
2 changes: 1 addition & 1 deletion docs/11-upgrading/02-breaking-changes-in-four.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ In 3.4, Serverpod removed a future call from the database before running it, so
- `WidgetRedirect` to `RedirectWidget`
- If a widget extends `WebWidget` directly, implement the new abstract `String render({String? Function(String)? onMissingVariable})` method. The `WidgetRoute` class builds the response from `render` instead of `toString`. Widgets that extend `TemplateWidget`, `ListWidget`, `JsonWidget`, or `RedirectWidget` inherit `render`. The `WidgetRoute.build` method now returns `Future<WebWidget?>`. A `null` return yields a 404. See [Server-side HTML](../concepts/web-server/server-side-html#creating-a-widgetroute).
- The `RouteStaticDirectory` and `PathCacheMaxAge` classes are removed. Serve directories with `StaticRoute.directory`, and set cache headers with its `cacheControlFactory` parameter. See [Static files](../concepts/web-server/static-files#cache-control).
- The `--mini` flag on `serverpod create` is removed. To create a project without a database, deselect **Database (recommended)** on the setup screen, or pass `--no-interactive --no-database`. To create a project without a Flutter app, use `--template server`.
- The `--mini` flag on `serverpod create` is removed. To create a project without a database, deselect **Database (recommended)** on the **Database & caching** screen, or pass `--no-interactive --no-database`. To create a project without a Flutter app, use `--template server`.

## Message central delivers globally by default

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Serverpod is a full backend. It manages your database, authentication, file uplo

A Serverpod project starts with the `serverpod create` command, which walks you through a few choices that shape what it generates:

- **Code editors and AI agents:** Pick any of Antigravity, Claude, Codex, Cursor, OpenCode, and VS Code, or **None**. Serverpod installs skills and MCP servers for each one you select.
- **Project type:** A server with a Flutter app (the default), a server only, or a reusable [module](./concepts/server-fundamentals/modules) shared across servers.
- **Database and caching:** Add a Postgres database and Redis (for pub/sub and caching).
- **Authentication:** Built-in email and social sign-ins.
- **Web server:** Optionally serve web pages and your Flutter web app alongside your API.
- **Code editors and AI agents (optional):** Pick any of Antigravity, Claude, Codex, Cursor, OpenCode, and VS Code. Serverpod installs skills and MCP servers for each one you select.
- **Authentication:** Built-in email and social sign-ins.

The result is one workspace. For the default project type, it has three Dart packages:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Use `serverpod create` to generate a new project with a server, a client, and a
$ serverpod create magic_recipe
```

The command is interactive. Step through the prompts, accepting the defaults.
The command is interactive. Pick your editors or **None** on the first screen, then accept the defaults on the rest.

Open the project's **root** folder (`magic_recipe`) in your editor, not one of the sub-packages. This keeps the analyzer in sync when code is generated and makes it easy to move between the server and app.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Each editor you pick at create time gets its own MCP config, which registers Ser
| OpenCode | `opencode.json` | `.opencode/skills/` |
| Antigravity | `.agents/plugins/serverpod-local/` | `.agents/skills/` |

The setup screen preselects no editors, so pick the ones you use. With `--no-interactive`, `serverpod create` configures Claude, Cursor, and VS Code unless you pass `--ide`.
The first `serverpod create` screen preselects no editors, so pick the ones you use, or **None**. With `--no-interactive`, `serverpod create` configures Claude, Cursor, and VS Code unless you pass `--ide`.

The workspace `.gitignore` excludes these files for every editor except OpenCode, so Git picks up `opencode.json` and `.opencode/` unless you add them to `.gitignore`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The three server blocks configure Serverpod's three servers: the API server your

### Database backends

Serverpod supports both PostgreSQL and SQLite as database backends. A server that does not use a database leaves the `database` section out of every run mode file. Its models then can't use `table`, and `serverpod create-migration` won't create migrations.
Serverpod supports both PostgreSQL and SQLite as database backends. A server that does not use a database leaves the `database` section out of every run mode file. Its models then can't use `table`, and `serverpod create-migration` won't create migrations. Serverpod 4.0.0 instead needs `database: false` under `features` in `config/generator.yaml`, which later versions ignore.

:::warning
All run modes must use the same database backend, and either all of them or none of them configure a database: `serverpod generate` fails otherwise. This also keeps your development environment consistent with production.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Future call settings cover execution, concurrency, the scan interval, and broken-call handling, set in config files or environment variables.
description: Future call settings cover enabling future calls, execution, concurrency, the scan interval, and broken-call handling, set in config files or environment variables.
---

# Configuration
Expand All @@ -8,28 +8,43 @@ You configure future calls in your Serverpod config files or through environment

| Option | Default | Controls |
| --- | --- | --- |
| `futureCallExecutionEnabled` | `true` | Whether this server runs future calls at all. |
| `futureCall.enabled` | `true` | Whether future calls can be scheduled and executed. |
| `futureCall.executionEnabled` | `true` | Whether this server runs due calls. Scheduling still works. |
| `futureCall.concurrencyLimit` | `1` | How many calls may run at once. |
| `futureCall.scanInterval` | `5000` | How often, in milliseconds, the server checks for due calls. |
| `futureCall.checkBrokenCalls` | unset | Whether to scan for broken calls on startup. |
| `futureCall.deleteBrokenCalls` | `false` | Whether to delete broken calls that are found. |

```yaml
futureCallExecutionEnabled: true

futureCall:
enabled: true # default
executionEnabled: true # default
concurrencyLimit: 1 # default
scanInterval: 5000 # default, in milliseconds
```

The `futureCall.enabled` and `futureCall.executionEnabled` options need Serverpod 4.0.3 or later. Earlier versions set execution with the top-level `futureCallExecutionEnabled` key, which later versions still read when `futureCall.executionEnabled` is not set.

## Disable future calls

The `futureCall.enabled` option turns future calls off completely. It is `true` by default. When set to `false`, calls can neither be scheduled nor executed. Use it when your project does not use future calls.

```yaml
futureCall:
enabled: false
```

If you schedule a call while it is off, the server throws a `StateError` with the message `FutureCalls is not initialized.` Future calls also need a database. Without one, they are off regardless of this option.

## Execution options

### Enable or disable execution

The `futureCallExecutionEnabled` option turns future call execution on or off for a server. It is `true` by default. Set it to `false` in environments where background tasks should not run, such as a staging server where you want to test API behavior without triggering scheduled work.
The `futureCall.executionEnabled` option turns future call execution on or off for a server. It is `true` by default. Unlike `futureCall.enabled`, it does not stop calls from being scheduled; they are stored and run by any server that has execution enabled. Set it to `false` in environments where background tasks should not run, such as a staging server where you want to test API behavior without triggering scheduled work.

```yaml
futureCallExecutionEnabled: false
futureCall:
executionEnabled: false
```

### Concurrency limit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Use roles so request capacity and background work do not share the same scaling
dart run bin/main.dart --mode production --role serverless
```

Schedule a separate process in the `maintenance` role (for example once per minute) when request nodes run as `serverless`. On pure request nodes you can also set `futureCallExecutionEnabled` to `false`; see [Future call configuration](../scheduling/configuration).
Schedule a separate process in the `maintenance` role (for example once per minute) when request nodes run as `serverless`. On pure request nodes you can also disable execution with the `SERVERPOD_FUTURE_CALL_EXECUTION_ENABLED` environment variable set to `false`, so the maintenance process, which reads the same config file, keeps running calls; see [Future call configuration](../scheduling/configuration).

## Offload CPU work to isolates

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Turn Redis on when more than one Serverpod instance must share a cache, pass mes

Whether a new project includes Redis configuration depends on how you created it:

- **`serverpod create` with the setup screen:** only if you select Redis.
- **`serverpod create` without the setup screen** (for example with `--no-interactive`): included by default.
- **Interactive `serverpod create`:** only if you select Redis on the **Database & caching** screen.
- **`serverpod create` without questions** (for example with `--no-interactive`): included by default.
- **`serverpod quickstart`:** always included.

Including it copies the config, the Compose service, and a generated password. It doesn't turn Redis on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ withServerpod(
);
```

Serverpod then neither creates nor drops that database, and [`rollbackDatabase`](#rollbackdatabase) still decides whether the group's writes are rolled back. Groups that share the database can't run in parallel, so run their test files one at a time with `dart test --concurrency=1`.
Serverpod then neither creates nor drops that database, and [`rollbackDatabase`](#rollbackdatabase) still decides whether the group's writes are rolled back. Groups that share the database can't run in parallel, so run their test files one at a time with `dart test --concurrency=1`. The option needs Serverpod 4.0.3 or later.

## Database rollback {#rollbackdatabase}

Expand Down
Loading
Loading