Configuration
TOTPHog is designed to work out of the box with minimal configuration. This document covers all available configuration options.
Environment Variables
Docker Compose
| Variable | Default | Description |
|---|---|---|
TOTPHOG_PORT |
8045 |
Host port for the web interface |
Example:
Storage
Token Storage
Tokens are stored in a JSON file at var/tokens.json. This file is automatically created on first use.
Storage format:
{
"uuid-here": {
"id": "uuid-here",
"name": "GitHub",
"secret": "JBSWY3DPEHPK3PXP",
"issuer": "GitHub",
"digits": 6,
"period": 30,
"algorithm": "sha1",
"created_at": "2024-01-15T10:30:00+00:00"
}
}
Persisting Data
Docker
Mount a volume to persist tokens:
Docker Compose
The provided docker-compose.yml includes a named volume for persistence.
TOTP Parameters
When creating tokens, you can configure:
| Parameter | Default | Description |
|---|---|---|
name |
(required) | Display name for the token |
secret |
(required) | Base32-encoded secret key |
issuer |
TOTPHog |
Service/application name |
digits |
6 |
Number of digits in the code |
period |
30 |
Code validity period (seconds) |
algorithm |
sha1 |
Hash algorithm: sha1, sha256, sha512 |
Example: