diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e3385bbc5cb858f46142c1640f89c353e498ed47..3d612b62830e11e45dc1f222dc08976c3aa0c673 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -81,3 +81,20 @@ publish-pip:
   - TWINE_USERNAME="${PYPI_USERNAME}" TWINE_PASSWORD="${PYPI_PASSWORD}" python3 -m twine upload dist/*
   rules:
     - if: '$CI_COMMIT_TAG =~ /v[0-9]+[.][0-9]+[.][0-9]+.*/'
+
+publish-apt:
+  stage: deploy
+  script:
+    - apt update
+    - apt-get install -y python3-all debhelper python3-pip git-buildpackage
+    - export PYBUILD_INSTALL_ARGS="--install-lib=/usr/share/uffd/ --install-scripts=/usr/share/uffd/"
+    - gbp dch --ignore-branch --debian-tag=v%\(version\)s
+    - dpkg-buildpackage -us -uc
+    - mkdir build
+    - mv ../*.deb build/
+  artifacts:
+    paths:
+      - build/*
+      - debian/changelog
+  rules:
+    - if: '$CI_COMMIT_TAG =~ /v[0-9]+[.][0-9]+[.][0-9]+.*/'
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000000000000000000000000000000000..8ec8f739601766e7ae19ea48b4213e6f0dcbdf49
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+uffd (0.1.2) unstable; urgency=medium
+
+  * Initial release.
+
+ -- Andreas Valder <nd@cccv.de>  Fri, 31 Jul 2021 23:02:31 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000000000000000000000000000000000..b27ad097ed9a09b7d98379df115e711951ed6703
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: uffd
+Section: python
+Priority: optional
+Maintainer: CCCV <it@cccv.de>
+Build-Depends:
+ debhelper-compat (= 12),
+ dh-python,
+ python3-all,
+ python3-setuptools,
+Standards-Version: 4.5.0
+Homepage: https://git.cccv.de/uffd/uffd
+Vcs-Git: https://git.cccv.de/uffd/uffd.git
+
+Package: uffd
+Architecture: any
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+Description: UserFerwaltungsFrontend: Ldap based single sign on and user management web software
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000000000000000000000000000000000..51a9034e3c8913ad57ee436eff66e6672db65310
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+export DH_VERBOSE = 1
+
+export PYBUILD_NAME=uffd
+
+%:
+	dh $@ --with python3 --buildsystem pybuild