Automatic timelapse videos from your UniFi Protect cameras, with a clean web interface to watch them.
- Captures hourly snapshots and builds daily, weekly, monthly, and yearly timelapses automatically
- 24-hour gallery — browse any day's images, sort and filter by date
- Share links — generate a time-limited public link to any timelapse
- Daylight filtering — weekly and monthly lapses skip night images automatically
- HLS adaptive streaming — smooth playback on any connection
- All settings configured in the Admin → Settings panel — no restarts needed
- Multi-arch Docker image (amd64 + ARM64)
-
Copy
.envand fill in the four required values:UFP_HOST=192.168.1.1 UFP_API_KEY=<your api key> TARGET_CAMERA_ID=<your camera id> APP_KEY=<run: head -c 32 /dev/urandom | base64> ADMIN_PASSWORD=<choose a password> -
Start:
docker compose up -d
-
Open
http://localhost:8000and log in withadmin/ yourADMIN_PASSWORD.
Edit the values at the top of start.sh, then:
bash start.shUFP_API_KEY and APP_KEY can also be exported in your shell before running rather than written into the script.
UFP_API_KEY — In your UniFi OS console go to Integrations → New API Key.
TARGET_CAMERA_ID — Open the camera in the Protect web UI. The ID is in the URL:
https://192.168.1.1/protect/dashboard/all/sidepanel/device/<YOUR_CAMERA_ID>/manage
APP_KEY — A random secret used to sign sessions. Generate one:
head -c 32 /dev/urandom | base64Only these values need to be set in the environment. Everything else (snapshot interval, video quality, retention, formats, timezones, etc.) is configured in the Admin → Settings panel after first launch.
| Variable | Required | Description |
|---|---|---|
UFP_HOST |
Yes | IP or hostname of your UniFi Protect controller |
UFP_API_KEY |
Yes | API key from UniFi OS → Integrations |
TARGET_CAMERA_ID |
Yes | Camera ID from the Protect URL |
APP_KEY |
Yes | Base64 secret for session signing |
ADMIN_PASSWORD |
Yes | Initial password for the admin account |
TZ |
No | Container timezone (e.g. Australia/Sydney) |
GIN_MODE |
No | Set to release for production (default) |
| Tag | Description |
|---|---|
v1.2.3 |
Specific release — recommended for production |
latest |
Latest build from main |
dev |
Latest build from development branches |
Pull from Docker Hub: mbern/unifi-time-machine
The container runs as appuser (UID/GID 1000). If you're using a bind-mounted data directory, set ownership on the host:
chown -R 1000:1000 ./dataIssues and PRs are welcome. See DEVGUIDE.md for build instructions and developer notes.
- GPU encoding support
- Multi-camera support
- Cloud / tiered storage for edge deployments
- AI video summaries


