Skip to content

Install Encuestum

Encuestum ships as one all-in-one Docker image: nginx routes the frontend (Next.js) and /api/ to the backend (FastAPI). The frontend talks to the backend same-origin, so in production you configure no API URL at all. The only hard requirement is Docker (with Compose).

Published image: ghcr.io/diegoparras/encuestum:latest

Terminal window
git clone https://github.com/diegoparras/encuestum.git
cd encuestum
cp .env.example .env
# Edit .env and set a real secret:
# ENCUESTUM_SESSION_SECRET=$(openssl rand -hex 32)
docker compose -f docker-compose.prod.yml up -d

Open http://localhost:8080Create account → build your first survey. This brings up the all-in-one app + PostgreSQL with persistent data (volume encuestum_pg).

The docker-compose.prod.yml file brings up the app plus Postgres in one shot:

Terminal window
cp .env.example .env # set ENCUESTUM_SESSION_SECRET
docker compose -f docker-compose.prod.yml up -d
# → http://localhost:8080 · data in the encuestum_pg volume

Behind an HTTPS domain, add to .env:

Terminal window
ENCUESTUM_PUBLIC_URL=https://surveys.yourdomain.com
ENCUESTUM_COOKIE_SECURE=true

and serve port 8080 behind your reverse proxy (nginx / Caddy / Traefik).

EasyPanel is the most convenient way to run it on a VPS. Encuestum is an App (not a compose stack): run the image and configure it with environment variables.

  1. Database → in your EasyPanel project, create a Postgres service (it gives you an internal host such as yourproject_encuestum-db).
  2. AppCreateApp → source Docker Image: ghcr.io/diegoparras/encuestum:latest.
  3. Environment of the App:
    Terminal window
    DATABASE_URL=postgresql://USER:PASS@INTERNAL_HOST:5432/DBNAME
    ENCUESTUM_SESSION_SECRET=<openssl rand -hex 32>
    ENCUESTUM_PUBLIC_URL=https://surveys.yourdomain.com
    ENCUESTUM_COOKIE_SECURE=true
  4. Ports / Domains → map your domain to the container’s port 80. EasyPanel issues the Let’s Encrypt certificate automatically.
  5. Deploy. On boot it runs the migrations itself and creates the whole schema. Visit your domain → Create account.

Everything is configured with ENCUESTUM_* env vars; see .env.example for the full, commented list. The essentials:

VariableDefaultPurpose
ENCUESTUM_SESSION_SECRET(ephemeral)Signs sessions. Mandatory in prod (openssl rand -hex 32).
DATABASE_URL(SQLite)postgresql://user:pass@host:5432/db for Postgres. Falls back to SQLite otherwise.
ENCUESTUM_PUBLIC_URL(CORS[0])Public base URL, used for the links in emails.
ENCUESTUM_COOKIE_SECUREtrueHTTPS-only cookies. Set false only on local http.
ENCUESTUM_ALLOW_REGISTRATIONtruePublic self-registration. false closes sign-up.
ENCUESTUM_SUPERADMIN_EMAILVerified email that gets the platform super-admin panel.
ENCUESTUM_LLM_API_KEYLLM provider key (or configure AI from the app’s AI screen).
ENCUESTUM_LLM_BASE_URLhttps://openrouter.ai/api/v1OpenAI-compatible endpoint.
ENCUESTUM_LLM_MODELopenai/gpt-4o-miniDefault model.
ENCUESTUM_STORAGElocals3 to upload to Cloudflare R2 / S3.
ENCUESTUM_SMTP_HOSTEmail for invitations / magic links / notifications.
ENCUESTUM_BASE_DOMAINEnables per-organization subdomains (acme.yourdomain.com).
AUTH_MODElocalSet federado to delegate login to Lockatus (Suite SSO).
Read the full documentation