> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nolongerevil.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-Hosted Overview

> Run your own No Longer Evil infrastructure for complete control

## What is Self-Hosting?

Self-hosting means running your own No Longer Evil infrastructure on your own server. Your thermostat connects to **your server**, not the hosted service at nolongerevil.com.

<Warning>
  **Advanced Users Only**: Self-hosting requires technical troubleshooting skills with command line, Docker, and networking. If you're not comfortable with these, we recommend using the [hosted service](/hosted/overview) instead.
</Warning>

## How It Works

<Steps>
  <Step title="Set Up Your NLE Server">
    Pull and run the pre-built Docker image (`ghcr.io/codykociemba/nolongerevil-selfhosted:latest`) on any always-on machine — or install the Home Assistant add-on if you're on HAOS.
  </Step>

  <Step title="Flash Your Thermostat">
    Run the GUI installer on macOS or Linux to flash custom firmware to your Nest Gen 1 or Gen 2 thermostat via USB. The firmware redirects all thermostat traffic from Google's servers to **your server**.
  </Step>

  <Step title="Select Self-Hosted in the Wizard">
    When the installer wizard asks for a hosting mode, choose **Self-Hosted** and enter your server address. The wizard handles SSH configuration and device registration automatically.
  </Step>

  <Step title="Thermostat Connects to Your Server">
    Once configured, your thermostat connects to your self-hosted NLE server instead of Google's servers. All communication stays within your infrastructure.
  </Step>
</Steps>

<Note>
  **Key Difference from Hosted**: You're responsible for running the NLE server. The hosted service runs this for you.
</Note>

## What You'll Need

<CardGroup cols={2}>
  <Card title="Server Hardware" icon="server">
    Raspberry Pi, NAS, VPS, home server, or cloud VM that can run 24/7
  </Card>

  <Card title="Nest Gen 1 or Gen 2" icon="temperature-half">
    Compatible thermostat

    [Check compatibility →](/compatibility)
  </Card>

  <Card title="Technical Skills" icon="code">
    Command line, Docker, and basic networking
  </Card>

  <Card title="Computer for Flashing" icon="laptop">
    Linux or macOS (Windows not supported)
  </Card>
</CardGroup>

***

## Components You'll Run

When self-hosting, you're responsible for running and maintaining:

<CardGroup cols={2}>
  <Card title="API Server (Port 8000)" icon="server">
    Handles thermostat device communication

    Pre-built Docker image: `ghcr.io/codykociemba/nolongerevil-selfhosted:latest`
  </Card>

  <Card title="Control API / Dashboard (Port 8082)" icon="tower-broadcast">
    Web interface for device management
  </Card>

  <Card title="MQTT (Optional)" icon="rss">
    Publishes climate entities to Home Assistant via MQTT discovery
  </Card>
</CardGroup>

Not sure if self-hosting is right for you? See [Choose Your Path →](/choose-your-path)

***

## Ready to Get Started?

<CardGroup cols={2}>
  <Card title="Prerequisites" icon="list-check" href="/self-hosted/prerequisites">
    **Review requirements** before starting installation
  </Card>

  <Card title="Installation Guide" icon="screwdriver-wrench" href="/self-hosted/installation">
    **Step-by-step instructions** to set up your self-hosted infrastructure
  </Card>
</CardGroup>

***

## Need Help?

<CardGroup cols={2}>
  <Card title="Join Discord" icon="discord" href="https://discord.gg/AffeGaJ5XS">
    Ask the self-hosting community
  </Card>

  <Card title="GitHub Issues" icon="github" href="https://github.com/codykociemba/NoLongerEvil-Thermostat/issues">
    Report bugs or request features
  </Card>
</CardGroup>
