# A self-hosted feedback tool with four containers

Canonical: https://feeblo.com/self-hosted Markdown mirror of: https://feeblo.com/self-hosted

feeblo runs as an API server, a dashboard, PostgreSQL, and Redis. Bring a domain, an SMTP relay, and an S3 bucket. Your feedback stays in your database and on your network.

- Deployment guide: https://docs.feeblo.com/self-hosting/docker
- Source: https://github.com/G3root/feeblo
- License: AGPL-3.0

## Four services

The `docker-compose.yml` at the repository root defines a complete single-host deployment. Nothing builds locally and nothing needs a toolchain. The server and web containers ship from GHCR on pushes to main and on version tags, so you pin a tag and pull it.

| Service | Image | Port | Job |
| --- | --- | --- | --- |
| `server` | `ghcr.io/g3root/feeblo-server` | 8080 | HTTP API, auth, dashboard RPC, widget endpoints, webhooks, email |
| `web` | `ghcr.io/g3root/feeblo-web` | 4321 | Dashboard and public boards, routed by hostname |
| `pg` | `pgvector/pgvector:pg17` | 5432 | PostgreSQL 17 with pgvector |
| `redis` | `redis:7-alpine` | 6379 | Shared rate-limit counters |

The web container routes by hostname. Any subdomain except `app` renders the public board registered for that subdomain, and `app` or no subdomain serves the dashboard. The server container always listens on 8080 internally, so the compose mapping and the healthcheck agree.

Compose handles startup order. Postgres and Redis pass their healthchecks, the server applies migrations and starts, and the web container follows.

## What the machine needs

A working deployment is a compose file, a handful of environment variables, and a host with Docker. Before the first boot you need:

- Docker Engine and Docker Compose v2.
- A root domain with DNS for the dashboard, the API, and a wildcard for board subdomains.
- An SMTP relay, because new accounts verify by email by default.
- `AUTH_ENCRYPTION_KEY`, generated once with `openssl rand -hex 32`.
- An S3-compatible bucket for uploads, or a local service such as MinIO.

The server process also needs values for `DATABASE_URL`, `APP_URL`, `API_URL`, and `APP_ROOT_DOMAIN`. Compose supplies defaults for the first four, and `AUTH_ENCRYPTION_KEY` has no default. `docker compose up` fails until you set it.

Compose does not pass your whole `.env` file into the containers. The server service forwards the core URL variables, the database and Redis URLs, the auth encryption key, the trusted origins, the release label, the two email provider feedback variables, and the media group. Everything else on the environment page you add yourself to the matching service block.

On a machine with a public interface, remove the Postgres and Redis port mappings so only the server and web containers accept connections.

## Your data stays in your Postgres

feeblo keeps all state in one PostgreSQL database. The compose stack runs PostgreSQL 17 with the pgvector extension, and data lives in a named volume called `postgres`. Recreating containers is safe. Deleting the volume deletes the data.

Migrations run `CREATE EXTENSION IF NOT EXISTS vector` and add a `vector(1536)` column to the `post` table. Your PostgreSQL instance must offer the extension even if you never turn embeddings on.

Back up before an upgrade:

```bash
docker compose exec pg pg_dump -U feeblo feeblo > feeblo-backup.sql
```

The dump is plain SQL. You can restore it into any Postgres instance that has pgvector.

### Upgrades

1. Back up the database with `pg_dump` before you pull.
2. Set `IMAGE_TAG` to a release tag instead of `latest`, so you decide when to move.
3. Run `docker compose pull`, then `docker compose up -d`. The server applies pending migrations.
4. To roll back, point `IMAGE_TAG` at the previous release and recreate. If the schema moved ahead, restore the backup first.

The server image runs its own migration runner, `node ./migrate/index.js`, before it starts listening. Production never runs `pnpm db:migrate`.

### Changing embedding dimensions

Post embeddings default to OpenAI `text-embedding-3-small` at 1536 dimensions. When you switch to a model with a different vector size, reconfigure the database column from the published server image before restarting it:

```sh
docker compose run --rm server \
  node ./migrate/configure-embeddings.js \
  --dimensions 768 \
  --clear-existing
```

With `--clear-existing` it drops vectors that no longer fit. Without it, the command fails safely instead of losing data.

## The four settings that decide whether sign-in works

Before you debug the network, check four settings. A URL that does not match the browser, a key that changed, an SMTP relay the server cannot reach, or a bucket that is not public will each break sign-in or uploads.

### Origins

`APP_URL` is the dashboard, `API_URL` is the API, and `APP_ROOT_DOMAIN` is the bare root. The auth layer derives trusted origins from all three and allows board subdomains. Set them to the hosts browsers actually use. If `APP_URL` says `http://localhost:3001` and the dashboard serves `https://app.example.com`, sign-in fails.

Wildcard DNS (`*.example.com`) must resolve to the web server. Production cookies are `Secure` and `SameSite=None`, scoped to your root domain, so the API host must serve HTTPS. On plain HTTP the browser drops the session cookie and every login looks broken.

### Secrets

`AUTH_ENCRYPTION_KEY` signs sessions and encrypts verification state. Generate it once, store it, and never rotate it during normal operation. Rotating it logs every user out and invalidates pending verification links and one-time codes.

When `INTEGRATION_ENCRYPTION_KEY` is unset, the same key encrypts webhook endpoint URLs and signing secrets. A value shorter than 32 bytes makes webhook create and update fail.

### Email

Sign-up requires a verification link by default, so set `SMTP_HOST`, `SMTP_PORT`, and `SMTP_FROM_ADDRESS` before the first account. The server records each message in an outbox and a worker inside the server process delivers it, so a failed send retries instead of vanishing.

The mailer always sends through nodemailer over SMTP. `SMTP_TRANSPORT` appears in `.env.example` with values `smtp-auth`, `smtp-api`, and `resend`, but no code reads that variable. Set it to `smtp-auth` and configure the `SMTP_*` variables.

Delivery pauses and cost guards are environment-driven through the `EMAIL_OUTBOX_*` variables.

### Media

Uploads go to one S3-compatible bucket under `profile-images/`, `organization-logos/`, and `editor-media/`. Any provider that speaks the S3 API works: MinIO, Cloudflare R2, AWS S3, or Backblaze B2.

Cloudflare R2 needs `MEDIA_UPLOAD_REGION=auto` and a public base URL, either a custom domain connected to the bucket or an `r2.dev` URL. Without a public route, images render as access denied. The dashboard upload endpoint accepts images only, 10 MB per file.

## What your users get after deploy

Everything below runs from the containers you started. The public board lives on a subdomain of `APP_ROOT_DOMAIN`, and the API answers on `API_URL`.

- **Feedback boards.** Public or private boards with upvotes, threaded comments, tags, moderation, list and board views, and a custom subdomain.
- **Public roadmap.** Planned, In Progress, and Completed lanes filled from post statuses, with custom domains and privacy controls.
- **Changelog.** Rich text, image uploads, scheduling, a draft to published lifecycle, RSS, and Markdown export.
- **Widget.** The `@feeblo/sdk` and `@feeblo/sdk-react` packages. Set `baseUrl` when the widget is served from your own host.
- **Public API.** Versioned REST under `/api/v1` on your `API_URL`, authenticated with an `x-api-key` header, with an OpenAPI document at `/api/v1/openapi.json`.
- **Webhooks.** `feedback.post.created` and `feedback.post.status_changed`, signed with Standard Webhooks, retried on failure, and limited to public egress in production.

## Deployment docs

The self-hosting section is eight pages deep. Start with the overview if you are planning, the Docker page if you are deploying, and troubleshooting when something answers with the wrong status code.

- **Self-hosting overview** (https://docs.feeblo.com/self-hosting/overview): the four services, the requirements, and how traffic moves between them.
- **Deploy with Docker** (https://docs.feeblo.com/self-hosting/docker): the compose walkthrough from env file to first account, plus upgrades and rollback.
- **Database** (https://docs.feeblo.com/self-hosting/database): the `DATABASE_URL` shape, the migration lifecycle, and the db: scripts.
- **Environment variables** (https://docs.feeblo.com/self-hosting/environment): every variable the server reads, grouped by concern and marked required or optional.
- **Email** (https://docs.feeblo.com/self-hosting/email): SMTP variables, the outbox controls, and the Amazon SES feedback webhook.
- **Media** (https://docs.feeblo.com/self-hosting/media): S3, Cloudflare R2, and MinIO settings for profile images, logos, and editor uploads.
- **OAuth login** (https://docs.feeblo.com/self-hosting/oauth): GitHub and Google callback URLs, client credentials, and trusted origins.
- **Troubleshooting** (https://docs.feeblo.com/self-hosting/troubleshooting): sessions that drop after restart, CORS failures, missing email, and rejected webhooks.

## When self-hosting fits

It fits teams that already run infrastructure and have a reason to keep customer feedback inside it. It fits teams that want to change the product itself. It fits teams that have someone on call for the database.

Good reasons to run it yourself:

- A customer contract or policy requires feedback data on your infrastructure.
- You already operate PostgreSQL, object storage, and an SMTP relay.
- You need a sign-in flow, field, or notification that the stock product does not have.
- You want the deployment to keep working through a vendor pricing change.
- You want to read the migration and the query before it touches customer data.

It does not fit a team that wants a board online this afternoon with no server to maintain. For that, the cloud version is the shorter path.

The docs and the GitHub issue tracker are the support path for a self-hosted deployment.

## Self-hosting FAQ

### What do I need before the first boot?

Docker Engine with Compose v2, a root domain with DNS for the dashboard, the API, and a wildcard for board subdomains, an SMTP relay, and a generated `AUTH_ENCRYPTION_KEY`. The compose stack supplies PostgreSQL with pgvector and Redis.

### Can I use my own PostgreSQL instance?

Yes, as long as it offers the pgvector extension. Migrations run `CREATE EXTENSION IF NOT EXISTS vector` and add a `vector(1536)` column to the `post` table, so the extension has to be available even if you never turn embeddings on.

### Do I need Redis?

One server instance rate-limits in memory and runs without Redis. As soon as you run more than one server replica, point `REDIS_URL` at a shared Redis so the rate-limit counters are shared too.

### How do upgrades work?

Back up the database, pull the new images, and run `docker compose up -d`. The server image applies pending migrations before it starts listening. Pin `IMAGE_TAG` to an exact release so you decide when to move.

### Does self-hosting include the widget and the API?

Yes. The web container serves the dashboard and public boards, and the server container answers the widget endpoints and the Public API on your `API_URL`. The same repository is the product.

### Where do I get help with a deployment?

The self-hosting docs cover the four services, every environment variable, database migrations, SMTP, S3 media, OAuth, and the common failure modes. Bug reports go to the GitHub repository.

## Next

- Self-hosting overview: https://docs.feeblo.com/self-hosting/overview
- Docker walkthrough: https://docs.feeblo.com/self-hosting/docker
- Open source license: https://feeblo.com/open-source
- Widget: https://feeblo.com/features/widget
- Hosted plans: https://feeblo.com/pricing
