Getting Started
This guide will help you get TOTPHog up and running quickly.
Prerequisites
- Docker and Docker Compose (recommended)
- OR PHP 8.3+ with Composer (for manual installation)
Installation
Docker (Recommended)
The easiest way to run TOTPHog is using Docker:
Open http://localhost:8045 in your browser.
Docker Compose
For a more configurable setup:
Custom Port
You can change the port using environment variables:
Manual Installation (Development)
-
Clone the repository:
-
Install dependencies:
-
Start the development server:
Persisting Data
By default, tokens are stored in /var/www/html/var/tokens.json inside the container. To persist data between container restarts:
Or with Docker Compose, the docker-compose.yml already includes a volume configuration.
First Steps
Web Interface
- Open http://localhost:8045
- Click "Add Token" to add a new TOTP token
- Enter the token name and secret (or paste an
otpauth://URI) - View your codes in real-time
API
Add a token via API:
curl -X POST http://localhost:8045/api/v1/tokens \
-H "Content-Type: application/json" \
-d '{"name": "My App", "secret": "JBSWY3DPEHPK3PXP"}'
Get the current code:
See the API Reference for complete documentation.