HUB
Sign inSign up

dvandergeld/awesomequiz

By dvandergeld

•Updated 1 day ago

Realtime multiplayer quiz app: presenter mode, play on phones via QR/PIN, admin. One container.

Image
0

784

dvandergeld/awesomequiz repository overview

⁠AwesomeQuiz

A realtime multiplayer quiz app you host yourself. Show the questions on a laptop or projector; everyone plays along on their own phone. One container, no external services, no accounts for players.

  • 🎤 Presenter mode: a welcome screen with a big game PIN and QR code, countdowns, live answer counts, answer distribution, scoreboards and a podium with confetti
  • 📱 Play on any phone: scan the QR code or enter the 6-digit PIN. Nothing to install. Faster correct answers score more points.
  • 🛠️ Quiz editor: multiple choice and true/false questions, images, time limits, double points, and intermission screens to announce rounds. Changes save automatically.
  • 🎨 Make it yours: your own logo and app name, 6 colour themes (including yellow/black), English and Dutch (per quiz), and optionally the quiz master's name and photo on the welcome screen
  • 👥 Multiple quiz masters with their own quizzes, an admin role, and a history of results
  • 🔒 Secure by default: hardened, non-root, read-only container. Details are under Security below.

Supported platforms: linux/amd64 and linux/arm64 (e.g. Raspberry Pi 4/5, Apple Silicon).


⁠Quick start

docker run -d --name awesomequiz \
  -p 3000:3000 \
  -v awesomequiz-data:/data \
  -e ADMIN_PASSWORD='choose-a-long-password' \
  -e PUBLIC_URL='http://192.168.1.10:3000' \
  --restart unless-stopped \
  dvandergeld/awesomequiz:latest
  1. Open http://<your-server>:3000/admin and log in as admin with the password you chose. If you left ADMIN_PASSWORD empty, a random password is printed in docker logs awesomequiz.
  2. Create a quiz and click Start. The presentation opens with the PIN and QR code.
  3. Players scan the QR code or go to http://<your-server>:3000 and enter the PIN.

Set PUBLIC_URL to the address phones use to reach the server, for example your computer's IP address on the Wi‑Fi network. That address goes into the QR code. localhost does not work for phones.

⁠Docker Compose

services:
  awesomequiz:
    image: dvandergeld/awesomequiz:latest
    container_name: awesomequiz
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      ADMIN_USERNAME: admin
      ADMIN_PASSWORD: choose-a-long-password   # only used on first start
      PUBLIC_URL: https://quiz.example.com     # address used in QR code / join link
      COOKIE_SECURE: auto                      # "true" for HTTPS-only installs
      TRUST_PROXY: 1                           # when behind a reverse proxy
    volumes:
      - quizdata:/data
    read_only: true
    tmpfs:
      - /tmp
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true

volumes:
  quizdata:

⁠Configuration

VariableDefaultDescription
ADMIN_USERNAMEadminUsername of the first administrator (created on first start only)
ADMIN_PASSWORDrandom, printed in the logsPassword of the first administrator, at least 10 characters
PUBLIC_URLtaken from the requestPublic base URL for the QR code and join link, e.g. https://quiz.example.com
COOKIE_SECUREautoauto: secure cookies when accessed over HTTPS. true: HTTPS only, also enables HSTS. false: never.
TRUST_PROXY–Set to 1 behind a reverse proxy (Caddy, Traefik, nginx), so client IPs and HTTPS are detected correctly
MAX_PLAYERS200Maximum number of players per game
MAX_UPLOAD_MB5Maximum image upload size
SESSION_TTL_HOURS12How long a quiz master stays logged in
PORT3000Port inside the container

The app name, logo, language, theme, default time limit, scoreboard frequency, streak bonus and sounds are set in the web interface under Settings.

⁠Data, backups and updates

Everything lives in the /data volume: a SQLite database and the uploaded images.

  • Backup: docker run --rm -v awesomequiz-data:/data -v "$PWD":/backup alpine tar czf /backup/awesomequiz-backup.tgz -C /data .
  • Update: docker pull dvandergeld/awesomequiz:latest, then recreate the container. Database migrations run automatically on startup.

Run a reverse proxy in front of the container. A Caddy example:

quiz.example.com {
    reverse_proxy awesomequiz:3000
}

Then set TRUST_PROXY=1, PUBLIC_URL=https://quiz.example.com and COOKIE_SECURE=true. Both TRUST_PROXY and PUBLIC_URL are needed behind a proxy: without them the app refuses the browser's realtime connection, because the address it sees differs from the one in the browser.

WebSockets are recommended but not required: without WebSocket support the app falls back to HTTP long-polling automatically. An nginx example (WebSocket support included):

location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 1h;
}

⁠Troubleshooting

SymptomCause and fix
The page keeps loading, or shows "Can't connect to the quiz", and the log says Refused a request from …The app runs behind a reverse proxy that rewrites the host name. Set PUBLIC_URL to the address in the browser's address bar and TRUST_PROXY=1.
The log says Requests arrive through a reverse proxy … TRUST_PROXY is not setSet TRUST_PROXY=1.
Login fails with "Security check failed"Same cause as the first row: set PUBLIC_URL and TRUST_PROXY=1.
Phones can't open the QR code linkPUBLIC_URL is missing or points to localhost. Set it to an address the phones can reach.
Login works but you are logged out immediately, and the log says COOKIE_SECURE=true, but a request arrived over plain HTTPThe site is served over plain HTTP. Use COOKIE_SECURE=auto or serve over HTTPS. Behind an HTTPS proxy, set TRUST_PROXY=1 and forward X-Forwarded-Proto.

⁠Security

  • Container: runs as a non-root user and works with a read-only root filesystem, no Linux capabilities and no-new-privileges. npm is removed from the runtime image. OS packages are upgraded at build time, and published images include an SBOM and provenance attestation.
  • Accounts:
    • Passwords are hashed with scrypt.
    • Failed logins are blocked per account and IP address, so an attacker cannot lock out the real user. A global per-account limit slows down distributed attacks.
    • Login and API requests are rate-limited.
  • Sessions:
    • Sessions use random tokens; only a hash is stored. Cookies are HttpOnly and SameSite=Strict, plus Secure over HTTPS.
    • Changing your password logs out other sessions.
    • Logging out immediately revokes control of a running presentation.
  • Web:
    • Strict Content-Security-Policy with no inline scripts.
    • All user content is rendered as text (no XSS through nicknames or quiz text).
    • CSRF protection on every state-changing request.
    • WebSockets only accept connections from the same origin.
  • Uploads: images are checked by their content (PNG/JPEG/GIF/WebP only, no SVG), stored under random names and served with nosniff and a sandbox policy. Profile photos are re-encoded in the browser, which also strips EXIF data such as GPS location.
  • Game integrity:
    • The server measures answer times, so a phone's clock has no effect.
    • Players never receive the correct answer before the reveal, and each player can answer only once per question.
    • PIN guessing is rate-limited, and a PIN stops working when its game ends.
  • Access control: quiz masters only see and present their own quizzes. Administrators manage users and global settings.

⁠Versions

The version shown in the app (Settings → About this app) always equals the image tag and the GitHub release.

⁠Tags

  • latest: most recent release
  • 1, 1.2, 1.2.3: semantic version tags
  • edge: manual test builds

⁠Source

Source code and issues: https://github.com/dvandergeld/AwesomeQuiz⁠

Tag summary

Content type

Image

Digest

sha256:be7007fd9…

Size

63.7 MB

Last updated

1 day ago

docker pull dvandergeld/awesomequiz