Overview
The self-hosted installation sets up:- Firmware flashing tools - To flash your Nest thermostat
- Convex backend - Database for device state (runs in Docker container)
- API Server - Backend server for thermostat communication (runs in Docker container)
- Frontend (optional) - Web dashboard for controlling your thermostats
Step 1: Clone the Repository
Clone theopen-source-prototype branch:
Step 2: Install Dependencies
- Ubuntu/Debian
- macOS
Step 3: Run the Installer
The installer will:- Build firmware flashing tools
- Set up Docker containers for Convex backend and API server
- Guide you through flashing your thermostat
The installer is interactive and will prompt you for configuration options. Follow the on-screen instructions carefully.
Step 4: Configure Your Server
After the installer completes, you’ll have: Running Docker Containers:- Convex Backend - Database for storing device state
- API Server - Handles thermostat communication
- Frontend (web dashboard) - This is optional and must be started separately
Check Running Containers
Step 5: Flash Your Thermostat
The installer will guide you through flashing your thermostat. The process differs for Gen 1 and Gen 2 - choose your device below:- Generation 2 (Easy)
- Generation 1 (Advanced)
Gen 2: Simple USB Method
Follow these steps carefully:- Boot device on backplate - Connect your Nest to the wall backplate and let it fully boot to the home screen
- Remove from wall - Once fully booted, remove the Nest from its backplate
- Connect via USB - Plug the Nest into your computer using a micro USB cable
- Reboot the device - Press and hold down on the display for 10-15 seconds until the device reboots
- DFU mode active - The installer will detect the device and begin flashing
Step 6: Set Up Frontend (Optional)
The installer does NOT start the frontend automatically. The frontend is optional - you can use the hosted dashboard at nolongerevil.com if you prefer.To run your own frontend:
-
Navigate to the frontend directory:
-
Install dependencies:
-
Configure environment variables:
Copy the example environment file and update the values:
Then edit
.env.localand configure the following variables:Key Variables to Update:ENCRYPTION_KEY: Generate a random string (useopenssl rand -hex 32)PROXY_HOST: Your server’s IP address (e.g.,192.168.1.100)NEXTAUTH_URL: Your frontend URL (e.g.,http://192.168.1.100:3000for network access)NEXT_PUBLIC_BACKEND_URL: Your Control API URL - same server asPROXY_HOST(e.g.,http://192.168.1.100:8081)
-
Run the development server:
-
Access the dashboard:
Open your browser to
http://localhost:3000
Production deployment: For production use, run
npm run build and serve the dist/ folder with a web server like nginx or Apache.Step 7: Home Assistant Integration (Optional)
If you use Home Assistant, you can integrate No Longer Evil using MQTT for automatic device discovery.Configure MQTT Integration in Convex
Add the following configuration to your Convex backend: Basic MQTT (no authentication):- Access your Convex dashboard
- Navigate to your backend configuration
- Add the MQTT integration config
- Update the values:
brokerUrl: Your Home Assistant MQTT broker IPusername&password: Your MQTT credentials (if authentication is enabled)
- Home Assistant must have MQTT broker configured (Mosquitto addon recommended)
- MQTT broker must be accessible from your No Longer Evil server
- If using authentication, create a dedicated MQTT user in Home Assistant
Once configured, your Nest thermostats will automatically appear in Home Assistant under MQTT devices with the prefix
nolongerevil. They will support climate control, temperature monitoring, and scheduling through Home Assistant.Step 8: Configure Networking (For Remote Access)
If you want to access your thermostat remotely (outside your local network):1
Port Forwarding
Configure your router to forward these ports to your server:
- Port 443 - Thermostat Communication API (HTTPS)
- Port 8081 - Control API (HTTP)
- Port 5173 (or 80/443 if using nginx) - Frontend (if self-hosting)
2
DNS/DDNS Setup
Set up a domain name or Dynamic DNS (DDNS) service to point to your public IP:
- Use a service like DuckDNS, No-IP, or your own domain
- Configure it to update automatically if your IP changes
3
SSL/TLS Certificates
For secure HTTPS access, set up SSL certificates:
- Use Let’s Encrypt with certbot
- Or use a reverse proxy like nginx with automatic certificate management
Step 8: Link Your Device
Once your thermostat is flashed and connected to your server:- On your Nest device, navigate to: Settings → Nest App → Get Entry Code
- The device will display a unique entry code
- Enter this code in your frontend dashboard (or the hosted dashboard if you’re using that)
- Your device is now linked and ready to use!
🎉 Success!
Your self-hosted No Longer Evil infrastructure is now running! What’s Running:- ✅ Convex backend (Docker container)
- ✅ API Server (Docker container)
- ✅ Frontend (if you set it up)
- ✅ Your thermostat is connected to YOUR server
Managing Your Server
Start/Stop Containers
View running containers:View Logs
API Server logs:Next Steps
Credits & Acknowledgments
This project builds upon the excellent work of several security researchers and developers:- grant-h / ajb142 - omap_loader, the USB bootloader tool used to flash OMAP devices
- exploiteers (GTVHacker) - Original research and development of the Nest DFU attack
- guyman70718 - cuckoo_loader_gen1 guide and teardown documentation for Gen 1 DFU mode access
- FULU and all bounty backers - For funding the Nest Learning Thermostat Gen 1/2 bounty