diff --git a/bin/build-release.sh b/bin/build-release.sh
index cacc6b1e2de4e73b6b25cd46bc15290f9e63e2b2..881c4fab06c556ad66828fb1b5a0aebfe03dae4a 100755
--- a/bin/build-release.sh
+++ b/bin/build-release.sh
@@ -70,6 +70,7 @@ php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-
 php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-preprodwarning
 php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-radius
 php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-riak
+php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-sanitycheck
 php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-smartattributes
 php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-statistics
 php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-sqlauth
diff --git a/composer.json b/composer.json
index c440e787da3487d68b4c016e7eb49c074304ef87..0eb0912dd8f3c10daf1580a28b0a5a427892941b 100644
--- a/composer.json
+++ b/composer.json
@@ -71,6 +71,7 @@
         "simplesamlphp/simplesamlphp-module-radius": "^1.0.0",
         "simplesamlphp/simplesamlphp-module-riak": "^1.0.0",
         "simplesamlphp/simplesamlphp-module-smartattributes": "^1.0.0",
+        "simplesamlphp/simplesamlphp-module-sanitycheck": "^1.0.0",
         "simplesamlphp/simplesamlphp-module-statistics": "^1.0.0",
         "simplesamlphp/simplesamlphp-module-sqlauth": "^1.0.0",
         "symfony/routing": "^3.4 || ^4.0",
diff --git a/modules/sanitycheck/config-templates/config-sanitycheck.php b/modules/sanitycheck/config-templates/config-sanitycheck.php
deleted file mode 100644
index d9b45bb8af9fb724067659284eb3a0d67116d642..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/config-templates/config-sanitycheck.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/*
- * The configuration of SimpleSAMLphp sanitycheck package
- */
-
-$config = [
-    /*
-     * Do you want to generate statistics using the cron module? If so, specify which cron tag to use.
-     * Examples: daily, weekly
-     * To not run statistics in cron, set value to
-     *     'cron_tag' => null,
-     */
-    'cron_tag' => 'hourly',
-];
diff --git a/modules/sanitycheck/default-enable b/modules/sanitycheck/default-enable
deleted file mode 100644
index 25615cb47c350d23033eb9801627ed8330bcc3e9..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/default-enable
+++ /dev/null
@@ -1,3 +0,0 @@
-This file indicates that the default state of this module
-is enabled. To disable, create a file named disable in the
-same directory as this file.
diff --git a/modules/sanitycheck/dictionaries/strings.definition.json b/modules/sanitycheck/dictionaries/strings.definition.json
deleted file mode 100644
index 38aa732b32daec72c0ebecc77b37441802b93186..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/dictionaries/strings.definition.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "link_sanitycheck": {
-    "en": "Sanity check of your SimpleSAMLphp setup"
-  }
-}
\ No newline at end of file
diff --git a/modules/sanitycheck/dictionaries/strings.translation.json b/modules/sanitycheck/dictionaries/strings.translation.json
deleted file mode 100644
index 802fe912c7271d1099e12cbb05fb30dbc4f8430f..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/dictionaries/strings.translation.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "link_sanitycheck": {
-    "es": "Comprobaciones básicas de la instalación",
-    "no": "Sjekk din installasjon",
-    "nn": "Sjekk din installasjon",
-    "ca": "ComprovaciĂł de la validesa de la vostra configuraciĂł de SimpleSAMLphp"
-  }
-}
\ No newline at end of file
diff --git a/modules/sanitycheck/hooks/hook_configpage.php b/modules/sanitycheck/hooks/hook_configpage.php
deleted file mode 100644
index 68856b9305f72040d8c14a372ee18d1fb908a074..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/hooks/hook_configpage.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-/**
- * Hook to add the sanitycheck link to the config page.
- *
- * @param \SimpleSAML\XHTML\Template $template The template that we should alter in this hook.
- * @return void
- */
-function sanitycheck_hook_configpage(\SimpleSAML\XHTML\Template &$template)
-{
-    $template->data['links']['sanitycheck'] = [
-        'href' => SimpleSAML\Module::getModuleURL('sanitycheck/index.php'),
-        'text' => \SimpleSAML\Locale\Translate::noop('Sanity check of your SimpleSAMLphp setup'),
-    ];
-    $template->getLocalization()->addModuleDomain('sanitycheck');
-}
diff --git a/modules/sanitycheck/hooks/hook_cron.php b/modules/sanitycheck/hooks/hook_cron.php
deleted file mode 100644
index 0ab1a6604666aaa381e6334644c1fbd40954377d..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/hooks/hook_cron.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/**
- * Hook to run a cron job.
- *
- * @param array &$croninfo  Output
- * @return void
- */
-function sanitycheck_hook_cron(&$croninfo)
-{
-    assert(is_array($croninfo));
-    assert(array_key_exists('summary', $croninfo));
-    assert(array_key_exists('tag', $croninfo));
-
-    \SimpleSAML\Logger::info('cron [sanitycheck]: Running cron in cron tag ['.$croninfo['tag'].'] ');
-
-    try {
-        $sconfig = \SimpleSAML\Configuration::getOptionalConfig('config-sanitycheck.php');
-
-        $cronTag = $sconfig->getString('cron_tag', null);
-        if ($cronTag === null || $cronTag !== $croninfo['tag']) {
-            return;
-        }
-
-        $info = [];
-        $errors = [];
-        $hookinfo = [
-            'info' => &$info,
-            'errors' => &$errors,
-        ];
-
-        SimpleSAML\Module::callHooks('sanitycheck', $hookinfo);
-
-        if (count($errors) > 0) {
-            foreach ($errors as $err) {
-                $croninfo['summary'][] = 'Sanitycheck error: '.$err;
-            }
-        }
-    } catch (\Exception $e) {
-        $croninfo['summary'][] = 'Error executing sanity check: '.$e->getMessage();
-    }
-}
diff --git a/modules/sanitycheck/hooks/hook_frontpage.php b/modules/sanitycheck/hooks/hook_frontpage.php
deleted file mode 100644
index e1b1a126d9c94b0df8816ac3f87d11fe6b03e268..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/hooks/hook_frontpage.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * Hook to add the modinfo module to the frontpage.
- *
- * @param array &$links  The links on the frontpage, split into sections.
- * @return void
- */
-function sanitycheck_hook_frontpage(&$links)
-{
-    assert(is_array($links));
-    assert(array_key_exists('links', $links));
-
-    $links['config']['sanitycheck'] = [
-        'href' => SimpleSAML\Module::getModuleURL('sanitycheck/index.php'),
-        'text' => '{sanitycheck:strings:link_sanitycheck}',
-    ];
-}
-
diff --git a/modules/sanitycheck/hooks/hook_moduleinfo.php b/modules/sanitycheck/hooks/hook_moduleinfo.php
deleted file mode 100644
index d0eb684e1f3ab7ba9455a77dbae25a0a4a1a76ab..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/hooks/hook_moduleinfo.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/**
- * This hook lets the module describe itself.
- *
- * @param array &$moduleinfo  The links on the frontpage, split into sections.
- * @return void
- */
-function sanitycheck_hook_moduleinfo(&$moduleinfo)
-{
-    assert(is_array($moduleinfo));
-    assert(array_key_exists('info', $moduleinfo));
-
-    $moduleinfo['info']['sanitycheck'] = [
-        'name' => ['en' => 'Sanity check'],
-        'description' => ['en' => 'This module adds functionality for other modules to provide sanity checks.'],
-
-        'dependencies' => ['core'],
-        'uses' => ['cron'],
-    ];
-}
diff --git a/modules/sanitycheck/hooks/hook_sanitycheck.php b/modules/sanitycheck/hooks/hook_sanitycheck.php
deleted file mode 100644
index 6288c1be69767b617bec3e5ee13dd9cbf6bade7f..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/hooks/hook_sanitycheck.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-/**
- * Hook to add the modinfo module to the frontpage.
- *
- * @param array &$hookinfo  hookinfo
- * @return void
- */
-function sanitycheck_hook_sanitycheck(&$hookinfo)
-{
-    assert(is_array($hookinfo));
-    assert(array_key_exists('errors', $hookinfo));
-    assert(array_key_exists('info', $hookinfo));
-
-    $hookinfo['info'][] = '[sanitycheck] At least the sanity check itself is working :)';
-}
diff --git a/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po
deleted file mode 100644
index 140725668de0b59cdd3866c9f099602c0d179f5d..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po
+++ /dev/null
@@ -1,11 +0,0 @@
-msgid "These checks failed:"
-msgstr "These checks failed:"
-
-msgid "These checks succeeded:"
-msgstr "These checks succeeded:"
-
-msgid "{sanitycheck:strings:link_sanitycheck}"
-msgstr "Sanity check of your SimpleSAMLphp setup"
-
-msgid "Sanity check of your SimpleSAMLphp setup"
-msgstr "Sanity check of your SimpleSAMLphp setup"
\ No newline at end of file
diff --git a/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po
deleted file mode 100644
index 8ccf3453db844db2aa394de45e7da54cb4b6da83..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po
+++ /dev/null
@@ -1,11 +0,0 @@
-msgid "These checks failed:"
-msgstr "Las siguientes comprobaciones han fallado:"
-
-msgid "These checks succeeded:"
-msgstr "Las siguientes comprobaciones fueron satisfactorias:"
-
-msgid "{sanitycheck:strings:link_sanitycheck}"
-msgstr "Comprobaciones básicas de la instalación"
-
-msgid "Sanity check of your SimpleSAMLphp setup"
-msgstr "Comprobaciones básicas de la instalación"
diff --git a/modules/sanitycheck/locales/it/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/it/LC_MESSAGES/sanitycheck.po
deleted file mode 100644
index 558b243e066a7ab4408a5223ad3529b804efc737..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/locales/it/LC_MESSAGES/sanitycheck.po
+++ /dev/null
@@ -1,6 +0,0 @@
-msgid "These checks failed:"
-msgstr "I seguenti controlli hanno riscontrato dei problemi:"
-
-msgid "These checks succeeded:"
-msgstr "I seguenti controlli sono stati eseguiti con successo:"
-
diff --git a/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po
deleted file mode 100644
index eed8799443a3aaf137c3fb919507338934461357..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po
+++ /dev/null
@@ -1,11 +0,0 @@
-msgid "These checks failed:"
-msgstr "Disse sjekkene har feila:"
-
-msgid "These checks succeeded:"
-msgstr "Disse sjekkene var suksessfulle:"
-
-msgid "{sanitycheck:strings:link_sanitycheck}"
-msgstr "Sjekk din installasjon"
-
-msgid "Sanity check of your SimpleSAMLphp setup"
-msgstr "Sjekk din installasjon"
diff --git a/modules/sanitycheck/locales/nl/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nl/LC_MESSAGES/sanitycheck.po
deleted file mode 100644
index e6c41cc5748cdf3f3988b6b778cf1873f296f438..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/locales/nl/LC_MESSAGES/sanitycheck.po
+++ /dev/null
@@ -1,11 +0,0 @@
-msgid "These checks failed:"
-msgstr "De volgende controles zijn mislukt:"
-
-msgid "These checks succeeded:"
-msgstr "De volgende controles zijn geslaagd:"
-
-msgid "{sanitycheck:strings:link_sanitycheck}"
-msgstr "Sanity check van je SimpleSAMLphp setup"
-
-msgid "Sanity check of your SimpleSAMLphp setup"
-msgstr "Sanity check van je SimpleSAMLphp setup"
diff --git a/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po
deleted file mode 100644
index e3e4c989f91924dfcc967c6eb6365f954a370855..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po
+++ /dev/null
@@ -1,11 +0,0 @@
-msgid "These checks failed:"
-msgstr "These checks failed:"
-
-msgid "These checks succeeded:"
-msgstr "Desse sjekkane var suksessfulle:"
-
-msgid "{sanitycheck:strings:link_sanitycheck}"
-msgstr "Sjekk din installasjon"
-
-msgid "Sanity check of your SimpleSAMLphp setup"
-msgstr "Sjekk din installasjon"
diff --git a/modules/sanitycheck/templates/check.tpl.php b/modules/sanitycheck/templates/check.tpl.php
deleted file mode 100644
index ba9f69ada602d490a9f01bf6593e81a123f02800..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/templates/check.tpl.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-$this->data['header'] = 'Sanity check';
-$this->includeAtTemplateBase('includes/header.php');
-
-echo '<h2>'.$this->data['header'].'</h2>';
-if (count($this->data['errors']) > 0) {
-    echo '<div style="border: 1px solid #800; background: #caa; margin: 1em; padding: .5em">';
-    echo '<p><img class="float-r" src="/'.$this->data['baseurlpath'].
-        'resources/icons/silk/delete.png" alt="Failed" />These checks failed:</p>';
-    echo '<ul>';
-    foreach ($this->data['errors'] as $err) {
-        echo '<li>'.$err.'</li>';
-    }
-}
-?>
-    </ul>
-</div>
-<?php
-if (count($this->data['info']) > 0) {
-    echo '<div style="border: 1px solid #ccc; background: #eee; margin: 1em; padding: .5em">';
-    echo '<p><img class="float-r" src="/'.$this->data['baseurlpath'].
-        'resources/icons/silk/accept.png" alt="OK" />These checks succeeded:</p>';
-    echo '<ul>';
-    foreach ($this->data['info'] as $i) {
-        echo '<li>'.$i.'</li>';
-    }
-}
-echo '</ul></div>';
-$this->includeAtTemplateBase('includes/footer.php');
diff --git a/modules/sanitycheck/templates/check.twig b/modules/sanitycheck/templates/check.twig
deleted file mode 100644
index fe51f41809cade804ccfcb83bdd5eb9b3dccfa8a..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/templates/check.twig
+++ /dev/null
@@ -1,46 +0,0 @@
-{% extends "base.twig" %}
-{% set pagetitle = 'Sanity check' %}
-{% block content %}
-
-<h2>{{ pagetitle }}</h2>
-
-{% if errors %}
-
-<div class="message-box error">
-    <div class="pure-g">
-        <div class="pure-u-1-12">
-            <span class="fa fa-times-circle fa-2x"></span>
-        </div>
-        <div class="pure-u-11-12">
-            <p>{{ 'These checks failed:'|trans }}</p>
-
-            <ul class="error-list">
-            {% for err in errors %}
-                <li>{{ err }}</li>
-            {% endfor %}
-            </ul>
-        </div>
-    </div>
-</div>
-{% endif %}
-
-{% if info %}
-<div class="message-box success">
-    <div class="pure-g">
-        <div class="pure-u-1-12">
-            <span class="fa fa-check fa-2x"> </span>
-        </div>
-        <div class="pure-u-11-12">
-            <p>{{ 'These checks succeeded:'|trans }}</p>
-
-            <ul>
-            {% for i in info %}
-                <li>{{ i }}</li>
-            {% endfor %}
-            </ul>
-        </div>
-    </div>
-</div>
-{% endif %}
-
-{% endblock %}
diff --git a/modules/sanitycheck/www/index.php b/modules/sanitycheck/www/index.php
deleted file mode 100644
index 8946bad073f5ca56a7107056c5343ec8acefda21..0000000000000000000000000000000000000000
--- a/modules/sanitycheck/www/index.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-$config = \SimpleSAML\Configuration::getInstance();
-
-$info = [];
-$errors = [];
-$hookinfo = [
-    'info' => &$info,
-    'errors' => &$errors,
-];
-\SimpleSAML\Module::callHooks('sanitycheck', $hookinfo);
-
-if (isset($_REQUEST['output']) && $_REQUEST['output'] == 'text') {
-    if (count($errors) === 0) {
-        echo 'OK';
-    } else {
-        echo 'FAIL';
-    }
-    exit;
-}
-
-$t = new \SimpleSAML\XHTML\Template($config, 'sanitycheck:check.tpl.php');
-$t->data['pageid'] = 'sanitycheck';
-$t->data['errors'] = $errors;
-$t->data['info'] = $info;
-$t->show();