Self-Hosting

The Chastity Tracker is built to run on your own hardware. As a Docker container the application runs with its own database on your own server, optionally extended with local AI and a hardware key safe. All data stays under your own control.

Self-Hosting with Docker

The application is delivered as a Docker container via a published image and runs on your own server. The data lives in its own SQLite database within the container directory.

Configuration and environment variables adapt the instance to your own setup, and updates are applied through new image versions.

Local AI

By default the photo check is off. As an admin you switch it on in the app: with your own API key for an external provider, in which case the photos go there, or with a local model via Ollama on your own hardware; no photo then leaves your own server, not even if the service fails. The previous route via environment variables still works, and a setting in the app takes precedence.

An optional CLIP service can be added: it matches photos against stored reference images and speeds up device detection. If it fails, the image model takes over — where the photo is then analysed depends on how that is configured.

AI Keyholder via MCP

Through the MCP protocol an AI assistant can act as a keyholder. It reads the current state and issues directives within human-defined free-text rules.

The rules stay in human hands at all times, and every action by the AI is fully audited. This combines automated control with traceable boundaries. The interface is unlocked per instance through two environment variables: ENABLE_MCP switches it on, MCP_USERNAME decides whose data the AI keyholder reads and directs. One server directs exactly one sub; the full steps are in the documentation in the repository.

Telegram Notifications

Telegram is an optional third notification channel alongside email and push. There is one bot per instance, which you create as the operator with @BotFather; you enter the token and bot name through the environment variables TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_USERNAME and TELEGRAM_WEBHOOK_SECRET and then register the webhook once. Without a token and bot name the Telegram section is invisible in settings and nothing is sent.

The message text passes through the servers of Telegram, a third-party provider, and a bot chat is not end-to-end encrypted. When you self-host, you set up the bot yourself; the portal does not do it automatically. The steps are in the Docker guide on the blog.

Weight Tracking

From tracker version 6.2.7 on, weight tracking is available on every instance without an environment variable. The former ENABLE_WEIGHT_TRACKING variable is gone and can be removed from your .env.

It is still off per sub by default: the keyholder switches it on in the sub's settings, and nothing of it appears before that. Weight and height are stored in the instance's SQLite database, scale photos in its upload directory, like all other data and photos. The photos are deleted after 60 days by default while the value remains; you set the period with WEIGHT_PHOTO_RETENTION_DAYS (0 = never delete). If the photo check is switched on, the scale photo goes to the service chosen there to be read.

LockMeBox Key Safe

The LockMeBox by kinkystuffmade.com can be controlled directly with the tracker, over Bluetooth with the phone as a relay.

A self-hosted instance needs a key in the configuration for it. The project does not provide it: with self-hosting, the LockMeBox only works if you have the matching key yourself. The Chastity Tracker is an independent hobby project; the box's maker is not involved. Questions about the tracker go to us, not to the box's maker.

Apps for Self-Hosted Instances

On your phone, as a self-hoster you use the installable web app (PWA) of your own instance: on Android via “Install app” in the Chrome menu, on iPhone and iPad via Share → “Add to Home Screen” in Safari. It receives web push without needing any key from us.

The native Android and iOS apps are available for Portal instances only. They do not accept self-hosted addresses, and push through the app needs the project's private push keys, which are not shared. This is a deliberate limit, not a fault in your installation.

Source code on GitHub

Code, setup instructions and the container image are publicly available. There you will find the steps to run it on your own hardware.

View on GitHub