Table of Contents

How to install Classquiz - a Kahoot clone

Classquiz can be installed with Docker compose, but the process is a bit more complex:

It is not only necessary to run sudo docker compose up -d:

First we need to run

git clone https://github.com/mawoka-myblock/ClassQuiz.git

Fill out docker-compose.yml according to the documentation here https://classquiz.de/docs/self-host

Then:

sudo docker compose build

This will take a few minutes.

First now

sudo docker compose up -d

Updating Classquiz

git pull
sudo docker compose build
sudo docker compose up -d

Reverse Proxy

server {
    server_name quiz.domain.com;
    listen 443 ssl http2;

    # Proxy Config
    location / {
        proxy_pass http://localhost:8000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	client_max_body_size 200M;
    }


    ssl_certificate /etc/letsencrypt/live/quiz.domain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/quiz.domain.com/privkey.pem; # managed by Certbot
}

server {
    return 301 https://quiz.domain.com$request_uri;


    server_name quiz.domain.com;
    listen 443 ssl;
    ssl_certificate  /etc/letsencrypt/live/quiz.domain.com/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/qquiz.domain.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

 
    if ($host = quiz.domain.com) {
        return 301 https://$host$request_uri;
    }
    # managed by Certbot

}


server {
    if ($host = quiz.domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot




    server_name quiz.domain.com;


    listen 80;
    return 404; # managed by Certbot


}