diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f9531fcaeb7c1f8f4886980d7a3461ca7aa919ac..7a866b0b62ff034e88555ddd07bb2775d6e03820 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -80,3 +80,32 @@ build_debian:
     - chmod 0755 build_deb.sh
     - ./build_deb.sh
 
+test_install_debian_package:
+  image: ubuntu:20.04
+  stage: test
+  services:
+     - name: piotrgawron/debian-repo
+       alias: debian-repo
+  dependencies:
+     - build_debian
+  script:
+     - apt-get update
+     - DEBIAN_FRONTEND=noninteractive apt-get install -y ssh software-properties-common dirmngr wget curl
+     - debian_file=$(ls *.deb)
+     - echo "PUT $debian_file /docker/incoming" | sftp -o StrictHostKeyChecking=no user@debian-repo
+     - ssh root@debian-repo /usr/local/sbin/reprepro-import
+     - apt-add-repository "deb http://debian-repo/ unstable main" -n
+     - apt-get update --allow-insecure-repositories
+#hacky way of installing minerva on docker - by default rc-invoke is preventing services changes on docker
+     - DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated smasch
+     - cd /usr/lib/smasch/
+     - /usr/lib/smasch/env/bin/gunicorn -b 127.0.0.1:8888 --pid /run/gunicorn/pid smash.wsgi --error-logfile /var/log/smasch/gunicorn.log --log-level DEBUG --capture-output --limit-request-line 8192 &
+#we need to wait a bit for gunicorn start
+     - sleep 15
+     - ls -al /var/log/smasch/
+     - cat /var/log/smasch/gunicorn.log
+     - wget http://localhost:8888/account/login/?next=/
+#test if we can login and list projects
+     - test 302 = $(curl -X GET --write-out %{http_code} --silent --output /dev/null http://localhost:8888/)
+     - test 200 = $(curl -X GET --write-out %{http_code} --silent --output /dev/null http://localhost:8888/account/login/?next=/)
+
diff --git a/debian-template/control b/debian-template/control
index 7de3f2893269026a045e727145ec08f564c50b61..ebbdbd3060595e66a7502725339d406356e9bc9f 100644
--- a/debian-template/control
+++ b/debian-template/control
@@ -11,7 +11,7 @@ Vcs-Browser: https://git-r3lab.uni.lu/NCER-PD/scheduling-system.git
 Package: smasch
 Architecture: all
 Section: science
-Depends: ${misc:Depends}, python3(>=3.6), python3-virtualenv, libcurl4-gnutls-dev, libpng-dev, libfreetype6-dev, libpq-dev, gcc, g++, python3-dev, libgnutls28-dev, libjpeg8-dev
+Depends: ${misc:Depends}, python3(>=3.6), python3-virtualenv, libcurl4-gnutls-dev, libpng-dev, libfreetype6-dev, libpq-dev, gcc, g++, python3-dev, libgnutls28-dev, libjpeg8-dev, libfreetype6-dev, pkg-config, cron
 Description: SMart SCHeduling - research study scheduling program
  The program controls and simplifies the scheduling, and is able to manage a
  big data base of patients. Smasch is also used to organize the daily