# Self-host NodeBB

> A modern forum platform with real-time discussions, SSO, and a plugin ecosystem, backed by Postgres.

- Page: https://levelrail.com/templates/nodebb/
- JSON: https://levelrail.com/templates/nodebb.json
- Category: Communication
- Licence: GPL-3.0 (Copyleft license)
- Source: https://github.com/NodeBB/NodeBB
- Upstream docs: https://docs.nodebb.org/

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: latest

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| nodebb | ghcr.io/nodebb/nodebb | latest | 4567 | nodebb_build -> /usr/src/app/build; nodebb_uploads -> /usr/src/app/public/uploads; nodebb_config -> /opt/config |
| postgres | postgres | 16-alpine | none | nodebb_postgres_data -> /var/lib/postgresql/data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| nodebb | POSTGRES_PASSWORD | generated |
| postgres | POSTGRES_DB | preset |
| postgres | POSTGRES_PASSWORD | generated |
| postgres | POSTGRES_USER | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy nodebb --name my-nodebb
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/nodebb/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy NodeBB on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for NodeBB, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/nodebb/nodebb:latest, postgres:16-alpine is what you deploy there.

Self-host NodeBB, NodeBB docker compose file, deploy NodeBB on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
