diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 2fc7f84237eb58c4573a3f4a27306923ad74e52d..0000000000000000000000000000000000000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Lint
-
-on:
-  push:
-
-jobs:
-  lint:
-    name: Run lint
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v2
-        with:
-          ref: ${{ github.head_ref }}
-      - uses: actions/setup-python@v2
-        with:
-          python-version: 3.9
-      - name: Install poetry
-        uses: abatilo/actions-poetry@v2.0.0
-      - name: Install dependencies
-        run: pip install tox
-      - name: Lint
-        run: tox -e lint,security
diff --git a/.github/workflows/reformat.yml b/.github/workflows/reformat.yml
deleted file mode 100644
index e87c5bf457da4c55805715cc814eef94f72b12be..0000000000000000000000000000000000000000
--- a/.github/workflows/reformat.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: Reformat
-
-on:
-  push:
-
-jobs:
-  black:
-    name: Run black/isort
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v2
-        with:
-          ref: ${{ github.head_ref }}
-      - uses: actions/setup-python@v2
-        with:
-          python-version: 3.9
-      - name: Install poetry
-        uses: abatilo/actions-poetry@v2.0.0
-      - name: Install dependencies
-        run: pip install tox
-      - name: Reformat
-        run: tox -e reformat
-      - uses: stefanzweifel/git-auto-commit-action@v4
-        with:
-          commit_message: "Reformat code using black"
-          commit_options: '--no-verify --signoff'
-          file_pattern: "*.py"
diff --git a/.gitignore b/.gitignore
index ba40360c298d6b6e3736bcce765327e7f316a2fc..ae58a2ce678c309501040e73a784a1c1e181e88f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -155,8 +155,8 @@ debhelper-build-stamp
 /tutorial-1/packageroot/usr
 
 requirements.txt
-debian/documento-client
-debian/documento-client.*.debhelper
+debian/documento-printserver
+debian/documento-printserver.*.debhelper
 debian/files
 
 barcode-tmp.pdf
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..6e97338ac384bbef0dd06d1c8a05960a6c534a66
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,31 @@
+image: "debian:buster"
+
+.before-script: &before-script
+  - apt update && apt install -y python3-setuptools python3-pip python3-dev git
+  - pip3 install poetry tox
+
+before_script:
+  - *before-script
+
+stages:
+  - test
+  - build
+
+lint:
+  stage: test
+  script:
+    - tox -e lint
+
+build-deb:
+  stage: build
+  before_script:
+    - *before-script
+    - apt update && apt install -y build-essential debhelper devscripts equivs dh-virtualenv libffi-dev
+  script:
+    - ./build-deb.sh
+    - mkdir build
+    - mv ../*.deb build/
+
+  artifacts:
+    paths:
+      - build/*
\ No newline at end of file
diff --git a/build-deb.sh b/build-deb.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8a87ffaab11f7344b6bb0961959daa0c57793532
--- /dev/null
+++ b/build-deb.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+poetry export --without-hashes > requirements.txt
+sed -i '/^pillow.*$/d' requirements.txt
+dpkg-buildpackage -us -uc -b
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000000000000000000000000000000000..e3d1bda9e6df31e35542d22eb64a03795d549e0d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+documento-printserver (0.1-1) unstable; urgency=medium
+
+  * Initial release.
+
+ -- Jonathan Weth <dev@jonathanweth.de>  Sun, 04 Jul 2021 12:20:29 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000000000000000000000000000000000..b0beddef6eaf571072b182b99cfa5f82757cbdb2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: documento-printserver
+Section: python
+Priority: extra
+Maintainer: Jonathan Weth <dev@jonathanweth.de>
+Build-Depends: debhelper (>= 10), python3, dh-virtualenv (>= 1.0),
+    python3-setuptools, python3-pip, python3-dev, libffi-dev
+Standards-Version: 4.5.0
+Homepage: https://edugit.org/documento/documento-printserver
+Vcs-Git: https://edugit.org/documento/documento-printserver.git
+Vcs-Browser: https://edugit.org/documento/documento-printserver
+
+
+Package: documento-printserver
+Architecture: any
+Pre-Depends: dpkg (>= 1.16.1), python3 (>= 3.6), python3-pil, ${misc:Pre-Depends}
+Depends: ${misc:Depends}
+Description: The printserver for Documento
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000000000000000000000000000000000..59187f0838cfbfc727522e77fa25c7f5e2ff9b92
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,25 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: documento-printserver
+Upstream-Contact: Jonathan Weth <dev@jonathanweth.de>
+Source: https://edugit.org/documento/documento-printserver
+
+Files: *
+Copyright: 2020, 2021 Jonathan Weth <dev@jonathanweth.de>
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/documento-printserver.install b/debian/documento-printserver.install
new file mode 100644
index 0000000000000000000000000000000000000000..cccfb64abb3fc94e3495d8024e06ef185448c090
--- /dev/null
+++ b/debian/documento-printserver.install
@@ -0,0 +1 @@
+99-escpos.rules etc/udev/rules.d
\ No newline at end of file
diff --git a/debian/documento-printserver.links b/debian/documento-printserver.links
new file mode 100644
index 0000000000000000000000000000000000000000..de04223c3b9019207c39a6dab42b84222cdfda98
--- /dev/null
+++ b/debian/documento-printserver.links
@@ -0,0 +1 @@
+opt/venvs/documento-printserver/bin/documento-printserver usr/bin/documento-printserver
diff --git a/debian/documento-printserver.triggers b/debian/documento-printserver.triggers
new file mode 100644
index 0000000000000000000000000000000000000000..e544b966c1572e0667a4644ca87002d94374594b
--- /dev/null
+++ b/debian/documento-printserver.triggers
@@ -0,0 +1,10 @@
+# Register interest in Python interpreter changes (Python 2 for now); and
+# don't make the Python package dependent on the virtualenv package
+# processing (noawait)
+interest-noawait /usr/bin/python3.6
+interest-noawait /usr/bin/python3.7
+interest-noawait /usr/bin/python3.8
+interest-noawait /usr/bin/python3.9
+
+# Also provide a symbolic trigger for all dh-virtualenv packages
+interest dh-virtualenv-interpreter-update
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000000000000000000000000000000000..83ba5db0074afbf7ba14122135cffc5cb745e428
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@ --with python-virtualenv
+
+override_dh_virtualenv:
+	dh_virtualenv --python python3 --extra-pip-arg "--no-deps" --use-system-packages