---
title: "Other Platforms"
description: "Deploy WPNuxt to Netlify, Cloudflare, and more"
canonical_url: "https://wpnuxt.com/deploy/other-platforms"
---
# Other Platforms

> Deploy WPNuxt to Netlify, Cloudflare, and more

WPNuxt works on any platform that supports Nuxt 4.

## Netlify

### Build Settings

```toml [netlify.toml]
[build]
  command = "pnpm build"
  publish = ".output/public"

[build.environment]
  NODE_VERSION = "20"
  WPNUXT_WORDPRESS_URL = "https://your-wordpress-site.com"
```

### Environment Variables

For sensitive values, use the Netlify dashboard instead of `netlify.toml`:

1. Go to **Site settings → Environment variables**
2. Add `WPNUXT_WORDPRESS_URL` with your WordPress URL
3. Optionally add `WPNUXT_DEBUG=true` for build debugging

### Deploy

```bash
# Install Netlify CLI
npm i -g netlify-cli

# Link to your site
netlify link

# Deploy
netlify deploy --build --prod
```

Or connect your Git repository in the Netlify dashboard for automatic deployments.

## Cloudflare Pages

### Nuxt Config

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  nitro: {
    preset: 'cloudflare-pages'
  }
})
```

### Environment Variables

Set environment variables in the Cloudflare dashboard:

1. Go to **Workers & Pages → your project → Settings → Environment variables**
2. Add `WPNUXT_WORDPRESS_URL` for both Production and Preview environments

### Deploy with Wrangler

```bash
# Install wrangler
npm i -g wrangler

# Build the project
pnpm build

# Deploy
wrangler pages deploy .output/public
```

Or connect your Git repository in the Cloudflare dashboard for automatic deployments.

### Limitations

- Cloudflare Workers have a 1MB script size limit (compressed). Large dependencies may need to be externalized.
- The Workers runtime does not support all Node.js APIs. If you encounter issues, check the [Cloudflare compatibility flags](https://developers.cloudflare.com/workers/configuration/compatibility-flags/).

## Self-Hosted (Node.js)

### Build and Run

```bash
pnpm build
WPNUXT_WORDPRESS_URL=https://your-wordpress-site.com node .output/server/index.mjs
```

### Systemd Service

Create a service file to run WPNuxt as a background service:

```ini [/etc/systemd/system/wpnuxt.service]
[Unit]
Description=WPNuxt Application
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/wpnuxt
Environment=NODE_ENV=production
Environment=WPNUXT_WORDPRESS_URL=https://your-wordpress-site.com
ExecStart=/usr/bin/node .output/server/index.mjs
Restart=on-failure

[Install]
WantedBy=multi-user.target
```

Enable and start:

```bash
sudo systemctl enable wpnuxt
sudo systemctl start wpnuxt
```

### Nginx Reverse Proxy

```nginx [/etc/nginx/sites-available/wpnuxt]
server {
    listen 80;
    server_name your-domain.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }
}
```

## Docker

### Dockerfile

A multi-stage build keeps the final image small:

```dockerfile [Dockerfile]
# Build stage
FROM node:20-alpine AS build

RUN corepack enable
WORKDIR /app

COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

COPY . .
RUN pnpm build

# Runtime stage
FROM node:20-alpine

WORKDIR /app
COPY --from=build /app/.output .output

ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000

CMD ["node", ".output/server/index.mjs"]
```

### Docker Compose

```yaml [docker-compose.yml]
services:
  wpnuxt:
    build: .
    ports:
      - "3000:3000"
    environment:
      - WPNUXT_WORDPRESS_URL=https://your-wordpress-site.com
      - WPNUXT_DEBUG=false
    restart: unless-stopped
```

Run:

```bash
docker compose up -d
```

## Environment Variables

All platforms need:

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        WPNUXT_WORDPRESS_URL
      </code>
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      WordPress site URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        WPNUXT_DEBUG
      </code>
    </td>
    
    <td>
      No
    </td>
    
    <td>
      Enable debug logs
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://wpnuxt.com/sitemap.md) for all pages.
