Skip to content

docs: Document the serverDirectory constructor argument#705

Closed
marcelomendoncasoares wants to merge 2 commits into
serverpod:mainfrom
marcelomendoncasoares:docs/server-directory
Closed

docs: Document the serverDirectory constructor argument#705
marcelomendoncasoares wants to merge 2 commits into
serverpod:mainfrom
marcelomendoncasoares:docs/server-directory

Conversation

@marcelomendoncasoares

@marcelomendoncasoares marcelomendoncasoares commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Serverpod constructor takes a serverDirectory, which decides where configuration, passwords, migrations, and relative database paths are resolved from. It was undocumented, so anyone launching the server from somewhere other than the server package root had nothing to go on.

Changes

  • Add a "Server directory" subsection to "Configure in Dart" on the configuration page, next to the other constructor arguments.
  • Explain the default behavior, that generated projects need no configuration, and when a nonstandard launcher does.
  • Show a monorepo launcher pointing at a nested server package.
  • List everything resolved from the directory: run-mode config, passwords, migrations including module migrations, and relative SQLite and embedded PostgreSQL paths.
  • Note that a ServerpodConfig object still leaves serverDirectory anchoring migrations and relative database paths, and that files your own code opens have to be anchored through pod.serverDirectory.

Reference

Both serverDirectory and config are passed to the Serverpod constructor,
so the section belongs under Configure in Dart rather than ahead of the
YAML files. Give it a noun-shaped heading like the other subsections and
tighten the prose.
@marcelomendoncasoares
marcelomendoncasoares deleted the docs/server-directory branch July 21, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant