Skip to content

Application Directory

By default, FastAPI Cloud expects your application at the root of your repository. But if your FastAPI app lives in a subdirectory, you can configure an application directory to tell FastAPI Cloud where to find it.

This is useful for monorepos, uv workspaces, and projects where the application code is nested inside the repository.

  1. Navigate to your App in the dashboard
  2. Click Settings in the sidebar
  3. In the Application Directory section, enter the relative path to your app directory (e.g., backend or packages/api)
  4. Click Update

To reset back to the repository root, clear the field and click Update.

The directory must be a simple relative path. Here are the rules:

  • Relative paths only — absolute paths like /app/backend are not allowed
  • No path traversal — paths containing .. are rejected
  • Allowed characters — letters, numbers, spaces, /, ., _, -
PathDescription
backendSingle directory
packages/apiNested directory
apps/web/pythonDeeper nesting
my-appHyphens are fine
my_appUnderscores are fine

When you set an application directory, FastAPI Cloud uses it during the build process:

  1. Dependencies are installed from the specified directory.
  2. Your app runs from that directory so relative imports and file paths resolve correctly.

The application directory works with uv workspaces. If you have a uv.lock file at the root of your repository and your app is in a subdirectory, FastAPI Cloud will:

  1. Resolve dependencies using the root uv.lock
  2. Install dependencies for the workspace member in your app directory
  3. Install any workspace members your app depends on