Skip to content

docs: add App Hosting SSR deployment guide#3720

Merged
armando-navarro merged 3 commits into
angular:mainfrom
armando-navarro:docs-app-hosting-guide
Jul 20, 2026
Merged

docs: add App Hosting SSR deployment guide#3720
armando-navarro merged 3 commits into
angular:mainfrom
armando-navarro:docs-app-hosting-guide

Conversation

@armando-navarro

@armando-navarro armando-navarro commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3719

Description

Adds docs/app-hosting.md, a deployment guide for server-rendered Angular apps on Firebase App Hosting.

It covers the silent SSR-to-CSR fallback that trips up new deployments: how to detect it in 30 seconds with the ng-server-context marker, and the two-step fix (update @angular/core/@angular/ssr, then set trustProxyHeaders: true on AngularNodeAppEngine).

It applies to both public deploy paths (connected GitHub repo and firebase deploy) and defers to Firebase's App Hosting troubleshooting guide as the authoritative source.

It also adds a link under the README's Resources section.

Docs only, no code change.

Adds docs/app-hosting.md documenting the silent SSR-to-CSR fallback that
trips up Angular apps deployed to Firebase App Hosting: how to detect it
with the ng-server-context marker, and the two-step fix (update
@angular/core and @angular/ssr, then set trustProxyHeaders: true on
AngularNodeAppEngine). It applies to both public deploy paths, a
connected GitHub repo and firebase deploy, which build the same way, and
defers to Firebase's App Hosting troubleshooting guide as the
authoritative source. Links the guide from the README Resources section.
Links Firebase's own deploy guides for the two public paths (connect a
GitHub repo, or firebase deploy from a local machine) instead of
re-documenting the steps, so the guide's title is honest and the reader
reaches the deploy instructions before the Angular-specific gotcha.
Comment thread docs/app-hosting.md
Pick an SSR route (not an SSG/prerendered one) and fetch it:

```bash
curl -s https://YOUR-SITE/ | grep ng-server-context

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command here is for Cloud Functions logs, not App Hosting. App Hosting runs as a separate product and its server logs go to Google Cloud Logging, not the Functions log stream. A reader who runs firebase functions:log on an App Hosting deployment will get no output and likely conclude there is nothing to see. Suggest replacing this with a pointer to the Cloud Console (Logging > Log Explorer, filter by the App Hosting backend resource) or noting that gcloud logging read is the CLI path.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks. Fixed in 8f7c13e: the guide now points at the backend's Logs tab (Runtime logs) in the Firebase console, plus a gcloud logging read command as the CLI option, and links Firebase's View logs and metrics guide. I verified both live against a real App Hosting backend before pushing.

@tyler-reitz tyler-reitz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition. One comment on the firebase functions:log reference in the debugging section; App Hosting logs go to Cloud Logging, not the Functions log stream, so that command won't surface anything for App Hosting deployments. Otherwise the guide is clear and the 30-second curl check is exactly the kind of concrete step that helps people unstick themselves.

firebase functions:log reads Cloud Functions logs; App Hosting runs on
Cloud Run, so that command surfaces nothing for an App Hosting
deployment. Points instead at the backend's Logs tab (Runtime logs) in
the Firebase console and a gcloud logging read command, both verified
live against a real App Hosting backend, plus a link to Firebase's
logging guide.
@armando-navarro

Copy link
Copy Markdown
Collaborator Author

Good addition. One comment on the firebase functions:log reference in the debugging section; App Hosting logs go to Cloud Logging, not the Functions log stream, so that command won't surface anything for App Hosting deployments. Otherwise the guide is clear and the 30-second curl check is exactly the kind of concrete step that helps people unstick themselves.

Logging reference corrected. Thanks for catching that, Tyler.

@armando-navarro
armando-navarro merged commit 8e33021 into angular:main Jul 20, 2026
24 checks passed
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.

docs: add an App Hosting deployment guide for SSR (silent CSR fallback)

2 participants