Go app connecting Nanit monitors to Home Assistant with a rich web dashboard for baby monitoring.
3.2K
A comprehensive Go application that bridges Nanit baby monitors with Home Assistant and provides a feature-rich web dashboard for monitoring your baby.
This is a fork of indiefan/home_assistant_nanit, which itself is a fork of the original adam.stanek/nanit project (no longer maintained). This version includes significant enhancements including 2FA support, web dashboard, historical tracking, and modern streaming capabilities.
docker run -d \
--name=nanit \
--restart unless-stopped \
-v /path/to/data:/data \
-p 8080:8080 \
-p 1935:1935 \
-e NANIT_RTMP_ADDR=YOUR_LOCAL_IP:1935 \
deltathreed/nanit-web
Open the web dashboard:
http://localhost:8080Complete setup via web interface:
Security Note: The refresh token provides full access to your Nanit account. Protect your system and proceed at your own risk.
| Variable | Default | Description |
|---|---|---|
NANIT_RTMP_ADDR | Required | Your local IP and port (e.g., 192.168.1.100:1935) |
NANIT_HTTP_PORT | 8080 | Web dashboard port |
NANIT_DATA_DIR | /data | Directory where all files are stored |
NANIT_SESSION_FILE | Session file path for storing auth tokens | |
NANIT_RTMP_AUTO_START | true | Automatically start streaming when baby comes online |
NANIT_LOG_LEVEL | info | Logging level: trace, debug, info, warn, error |
NANIT_HISTORY_ENABLED | true | Enable historical data tracking |
NANIT_HISTORY_RETENTION_DAYS | 30 | Days to keep historical data |
NANIT_MQTT_ENABLED | false | Enable MQTT for Home Assistant |
NANIT_MQTT_BROKER_URL | MQTT broker URL (e.g., tcp://localhost:1883) | |
NANIT_MQTT_USERNAME | MQTT username | |
NANIT_MQTT_PASSWORD | MQTT password | |
NANIT_MQTT_CLIENT_ID | nanit | MQTT client identifier |
NANIT_MQTT_PREFIX | nanit | MQTT topic prefix |
NANIT_EVENTS_POLLING | false | Enable polling for event messages |
NANIT_EVENTS_POLLING_INTERVAL | 30 | Seconds between event polling requests |
NANIT_EVENTS_MESSAGE_TIMEOUT | 300 | Seconds after which to disregard old events |
Note: Nanit credentials (email/password) are configured via the web dashboard at http://localhost:8080, not through environment variables.
Use the included docker-compose.yml.
docker run -d \
--name=nanit \
--restart unless-stopped \
-v /path/to/data:/data \
-p 8080:8080 \
-p 1935:1935 \
-e NANIT_RTMP_ADDR=192.168.1.100:1935 \
-e NANIT_LOG_LEVEL=info \
-e NANIT_HISTORY_ENABLED=true \
-e NANIT_MQTT_ENABLED=true \
-e NANIT_MQTT_BROKER_URL=tcp://homeassistant:1883 \
-e NANIT_MQTT_USERNAME=mqtt_user \
-e NANIT_MQTT_PASSWORD=mqtt_pass \
deltathreed/nanit-web
Important: Use your local IP address (reachable by the Nanit camera), not 127.0.0.1 or localhost.
Reset the web dashboard password protection:
docker exec -it nanit /app/nanit --reset-password
The modern React-based dashboard at http://localhost:8080 provides comprehensive baby monitoring:
When MQTT is enabled, the application automatically creates Home Assistant entities:
Simply enable MQTT in your configuration and devices will appear automatically.
Alternatively, add a camera manually to configuration.yaml:
camera:
- name: Nanit
platform: ffmpeg
input: rtmp://YOUR_LOCAL_IP:1935/local/YOUR_BABY_UID
You can find your baby_uid in the web dashboard at http://localhost:8080 or in the application logs.
For local development with hot reload:
# Clone the repository
git clone https://github.com/daleiii/nanit-web.git
cd nanit-web
# Start development environment
docker-compose -f docker-compose.dev.yml up frontend backend
# Frontend: http://localhost:3000
# Backend API: http://localhost:8080
See CLAUDE.md for detailed development instructions.
This project is licensed under the MIT License - see the LICENSE file for details.
A: Connection Limit Errors - The most common issue is "too many local connections" to the Nanit camera:
Solutions:
docker restart nanitNANIT_RTMP_ADDR uses correct local IPExpected Behavior:
A: Check the application logs using the Docker commands from the Installation section:
# Real-time logs
docker logs -f nanit
# Recent logs
docker logs --tail 100 nanit
A: This should NOT be exposed directly to the public internet. For remote access:
A: This application accesses your Nanit account and camera feeds. Important considerations:
Security Risks:
Recommendations:
http://192.168.1.100:8080)A: This is a personal project provided as-is for educational and personal use. I am not responsible for any issues, damages, or consequences that may arise from using this software.
Use at your own risk:
By using this software, you acknowledge that you understand the risks and accept full responsibility for its use.
A:
A: Your baby_uid is displayed in the web dashboard at http://localhost:8080 or can be found in the application logs.
A: Yes, your Docker host must be on the same network as your Nanit camera, and you must use your local IP address (not localhost or 127.0.0.1) in the NANIT_RTMP_ADDR setting.
Content type
Image
Digest
sha256:c4e187f16…
Size
221.4 MB
Last updated
12 months ago
docker pull deltathreed/nanit-web