Skip to main content

Overview

Authentication works differently depending on whether you use the hosted service or the self-hosted server.

Self-Hosted: Control API (Port 8082)

The self-hosted control API (port 8082) has no authentication by default. Any client on your network can call it without credentials.
By design, the control API is intended for use on a trusted local network. If you expose port 8082 to the public internet, you should place it behind a reverse proxy (nginx, Caddy, Traefik) that handles authentication.

Optional: API Key Auth (via Reverse Proxy)

If you configure a reverse proxy with HTTP Basic Auth or a Bearer token header, the control API passes those headers through unchanged. The Python server itself does not validate them.

Self-Hosted: Device Protocol (Port 8000)

Nest thermostats use HTTP Basic Auth on every request to the device protocol endpoints. The server extracts the device serial from the credentials — it does not validate passwords.
The user ID follows the format d.{SERIAL}.{suffix}:
The server accepts all credentials. This is intentional — there is no credential provisioning in the self-hosted deployment. The serial extracted from Basic Auth is used for device identification only.

Hosted Service: API Key Authentication

API key authentication (nle_ prefixed keys) applies to the hosted service at nolongerevil.com only. Self-hosted deployments do not use this system.

Getting a Hosted API Key

  1. Go to https://nolongerevil.com/settings
  2. Click the API Keys tab
  3. Click Generate New Key
  4. Select scopes: read and/or write
  5. Copy the key immediately — it’s shown only once

API Key Format

Using a Hosted API Key

Include the key as a Bearer token:

API Key Scopes

Keys are hashed using SHA-256 before storage. The plaintext key is never stored — only the hash.
Immediately revoke it in Settings → API Keys, then generate a new key and update your applications.

Summary