From 938b7657e6a9362c917bf780f100ec8de6f36b2c Mon Sep 17 00:00:00 2001 From: mathis6787 Date: Thu, 24 Sep 2026 11:47:02 -0400 Subject: [PATCH 1/2] docs: Add support for custom server entrypoints in start command --- .../01-server-fundamentals/02-running-your-server.md | 6 ++++++ docs/06-concepts/cli/_generated/runner.md | 2 ++ docs/06-concepts/cli/_generated/start.md | 2 ++ docs/06-concepts/cli/commands/start/_start.md | 6 +++++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/06-concepts/01-server-fundamentals/02-running-your-server.md b/docs/06-concepts/01-server-fundamentals/02-running-your-server.md index 425f6e0c..4af3850b 100644 --- a/docs/06-concepts/01-server-fundamentals/02-running-your-server.md +++ b/docs/06-concepts/01-server-fundamentals/02-running-your-server.md @@ -12,6 +12,12 @@ Run it from your project's root folder or one of its package folders: serverpod start ``` +The CLI runs `bin/main.dart` from the server package by default. To use another entrypoint, pass its path relative to the server package with `--target` (or `-t`): + +```bash +serverpod start --target bin/main_enterprise.dart +``` + The interactive terminal shows a tab for the server and for each running app, with the most common actions along the bottom. Shortcuts are unshifted key presses: **M** means typing a lowercase `m`, while **Shift+M** produces the capital and triggers the variant. Press **H** for the full list of shortcuts, and **Q** to quit the session. If a session is already running for the project, a second `serverpod start` tells you so and exits. While the session runs, it also exposes an MCP endpoint that AI agents can use to drive it. See the [`serverpod mcp-server` reference](../cli/commands/mcp-server). New projects use an embedded PostgreSQL database that the server manages for you, so there is nothing else to start. See [Database backends](./configuration#database-backends) for how it is configured and how to use an external database instead. diff --git a/docs/06-concepts/cli/_generated/runner.md b/docs/06-concepts/cli/_generated/runner.md index 1d294121..a8e5a3a4 100644 --- a/docs/06-concepts/cli/_generated/runner.md +++ b/docs/06-concepts/cli/_generated/runner.md @@ -28,6 +28,8 @@ Usage: serverpod runner start [-- ] (defaults to on) -d, --directory The server directory. (defaults to "") +-t, --target The server entrypoint, relative to the server directory. + (defaults to "bin/main.dart") --[no-]docker Start Docker Compose services if a compose file exists. --[no-]flutter Auto-launch companion Flutter apps on the first UI attach. (defaults to on) diff --git a/docs/06-concepts/cli/_generated/start.md b/docs/06-concepts/cli/_generated/start.md index 28a431f4..d63ea434 100644 --- a/docs/06-concepts/cli/_generated/start.md +++ b/docs/06-concepts/cli/_generated/start.md @@ -9,6 +9,8 @@ Usage: serverpod start [-- ] (defaults to on) -d, --directory The server directory. (defaults to "") +-t, --target The server entrypoint, relative to the server directory. + (defaults to "bin/main.dart") --[no-]docker Start Docker Compose services if a compose file exists. --[no-]attach Attach a UI once the stack is up. With --no-attach the runner is brought up, its address is printed, and the command returns. (defaults to on) diff --git a/docs/06-concepts/cli/commands/start/_start.md b/docs/06-concepts/cli/commands/start/_start.md index 058e48bb..1bbafad1 100644 --- a/docs/06-concepts/cli/commands/start/_start.md +++ b/docs/06-concepts/cli/commands/start/_start.md @@ -6,4 +6,8 @@ The `serverpod start` command runs your project in development mode. It generate serverpod start ``` -Run it from anywhere inside your project folder. +Run it from anywhere inside your project folder. To run another server entrypoint, pass its path relative to the server package: + +```bash +serverpod start -t bin/main_enterprise.dart +``` From ea8ca020a4858e7b05ef0090e4c7dc89512b3fa2 Mon Sep 17 00:00:00 2001 From: mathis6787 Date: Fri, 25 Sep 2026 14:53:46 -0400 Subject: [PATCH 2/2] docs: Remove target option from runner and start command usage --- docs/06-concepts/cli/_generated/runner.md | 2 -- docs/06-concepts/cli/_generated/start.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/docs/06-concepts/cli/_generated/runner.md b/docs/06-concepts/cli/_generated/runner.md index a8e5a3a4..1d294121 100644 --- a/docs/06-concepts/cli/_generated/runner.md +++ b/docs/06-concepts/cli/_generated/runner.md @@ -28,8 +28,6 @@ Usage: serverpod runner start [-- ] (defaults to on) -d, --directory The server directory. (defaults to "") --t, --target The server entrypoint, relative to the server directory. - (defaults to "bin/main.dart") --[no-]docker Start Docker Compose services if a compose file exists. --[no-]flutter Auto-launch companion Flutter apps on the first UI attach. (defaults to on) diff --git a/docs/06-concepts/cli/_generated/start.md b/docs/06-concepts/cli/_generated/start.md index d63ea434..28a431f4 100644 --- a/docs/06-concepts/cli/_generated/start.md +++ b/docs/06-concepts/cli/_generated/start.md @@ -9,8 +9,6 @@ Usage: serverpod start [-- ] (defaults to on) -d, --directory The server directory. (defaults to "") --t, --target The server entrypoint, relative to the server directory. - (defaults to "bin/main.dart") --[no-]docker Start Docker Compose services if a compose file exists. --[no-]attach Attach a UI once the stack is up. With --no-attach the runner is brought up, its address is printed, and the command returns. (defaults to on)