Welcome! This page has everything you need to enable server-side rendering for your Drupal CMS site using Nuxt 3.
# 1. Create the frontend app (if it does not exist yet)
mkdir -p frontend
test -f frontend/package.json || npx nuxi@latest init frontend
cd frontend && npm install && npm run build && PORT=3000 HOST=0.0.0.0 node .output/server/index.mjs
# 2. Find the browser-reachable frontend URL
# docker port <nuxt-container> 3000
# ddev describe
# 3. Configure Drupal SSR settings
drush cset lupus_decoupled_ce_api.settings frontend_base_url 'http://localhost:<mapped-port>' -y
drush cset lupus_decoupled_ce_api.settings frontend_routes_redirect true -y
drush cset lupus_decoupled_ce_api.settings absolute_file_urls true -y
drush cr
# 4. Visit Drupal and click a page link
# → Should redirect to your SSR URLDone! Public pages now render on your Nuxt SSR frontend while Drupal handles content management.
- SSR (Server-Side Rendering): Pages render on a server, improving SEO and performance.
- Decoupled: Drupal is your content API; Nuxt is your frontend.
- Drupal CMS: Built on Lupus Decoupled.
- Nuxt 3: Modern Vue-based framework with SSR support.
| Page | Purpose |
|---|---|
| Setup Guide | Complete step-by-step instructions |
| Quick Start | 3-5 minute setup for experienced users |
| Checklist | Validation & testing steps |
| Troubleshooting | Common issues & fixes |
| Production Deployment | Nginx, PM2, SSL, and scaling |
frontendis the recommended location used in this documentation. It is not created automatically in this repository.- Drupal settings are at
/admin/config/system/lupus-decoupled/settings(Admin UI: Configuration -> System -> Lupus Decoupled Drupal). - If you run Nuxt in a container, do not assume
http://localhost:3000will be reachable from your browser or other containers. Use a browser-reachable URL forfrontend_base_url:- mapped host port:
http://localhost:<mapped-port> - reverse proxy URL:
https://<frontend-host>
- mapped host port:
- Find the mapped port after the frontend is running (for example
docker port <nuxt-container> 3000, orddev describewhen using DDEV). - Run the frontend with
npm run build && PORT=3000 HOST=0.0.0.0 node .output/server/index.mjs.
# Nuxt
mkdir -p frontend
test -f frontend/package.json || npx nuxi@latest init frontend
cd frontend && npm install && npm run build && PORT=3000 HOST=0.0.0.0 node .output/server/index.mjs
# Discover browser-reachable SSR URL
# docker port <nuxt-container> 3000
# ddev describe
# Drupal
drush cset lupus_decoupled_ce_api.settings frontend_base_url 'http://localhost:<mapped-port>' -y
drush cset lupus_decoupled_ce_api.settings frontend_routes_redirect true -y
drush cset lupus_decoupled_ce_api.settings absolute_file_urls true -y
drush crSelf-contained setup with no repo-local helper scripts required.
This repository already has lupus_decoupled_ce_api and lupus_decoupled_cors enabled.
# Nuxt
cd frontend && npm install && npm run build && PORT=3000 HOST=0.0.0.0 node .output/server/index.mjs
# Discover browser-reachable SSR URL
# docker port <nuxt-container> 3000
# ddev describe
# Drupal
drush cset lupus_decoupled_ce_api.settings frontend_base_url 'http://localhost:<mapped-port>' -y
drush cset lupus_decoupled_ce_api.settings frontend_routes_redirect true -y
drush crSee Setup Guide for details.
- Browser requests
/node/1 - Drupal redirects to Nuxt SSR server
- Nuxt fetches content from Drupal CE API
- Nuxt renders page on server
- Browser gets complete HTML + interactive JS
Q: Do I rewrite my Drupal code? A: No. Drupal works unchanged. You only add a Nuxt frontend.
Q: Will admin pages redirect to SSR? A: No. Admin routes stay on Drupal automatically.
Q: Can I use this in production? A: Yes. See Production Deployment guide.