# Overview

###### Local domains let you reach a local app at a name like `myapp.local` instead of `localhost:3000`. LocalCan advertises the name on your network over mDNS (Bonjour) and, when you want it, serves it through a built-in reverse proxy so the name works on standard ports and over HTTPS.

> [!NOTE/Linux]
> The Linux build doesn't publish mDNS, so `.local` domains won't resolve automatically. Use a real DNS entry, an `/etc/hosts` line, or a [Public URL](/docs/public-urls/overview) instead. See [Installation](/docs/installation).

#### How it works

LocalCan's reverse proxy sits between the browser and your app, forwarding each request to the right host and port. It handles HTTP on port 80 and HTTPS on port 443, including the WebSocket connections that dev servers like Vite and Next.js use for hot reload.

Running through the proxy gives you:

- **Standard ports.** `https://myapp.local` works with no port number, because the proxy listens on 80 and 443.
- **Any target.** Forward a domain to any host and port, even another device, for example `https://myapp.local` to `http://192.168.50.5:3000`.
- **Automatic HTTPS.** The proxy terminates TLS with an auto-generated certificate. See [Certificates](/docs/domains/certificates).
- **Traffic inspection.** Watch requests between the browser and your app. See [Inspect traffic](/docs/tools/inspect-traffic).
- **Host header rewrites.** Present a production hostname to your app. See [Headers](/docs/configuration/headers).
- **Basic auth.** Put a password on a local domain during development. See [Basic auth](/docs/configuration/basic-auth).

You can also skip the proxy and have LocalCan advertise the name only. The two setups follow.

#### Domain with proxy

With a proxy, LocalCan terminates HTTPS and forwards requests to the target IP or hostname you specify, even on a different port. This is the flexible default for local development.

To set one up in the desktop app:

1. Click **Add project** in the sidebar and give it a name.
2. Click **Add App** and set a name and the target, for example `http://localhost:3000`. LocalCan creates a proxied `.local` domain for the app automatically.
3. To add another name to the same app, click **Add .local domain** on the app's card.
4. Trust the [root certificate](/docs/domains/certificates) so the browser doesn't warn that the connection is not private.

The same setup as a project file:

```yaml title="~/.localcan/projects/my-app.yml"
services:
  web:
    target: http://localhost:3000
    endpoints:
      - url: my-app.local
        scheme: https
```

Run `localcan reload` after dropping the file into `~/.localcan/projects/`. See [Configuration → Projects](/docs/configuration/projects).

#### Domain only

Without a proxy, LocalCan only advertises the mDNS name, so you reach the app at its original port. A server on `localhost:3000` answers at `my-app.local:3000`. Set `proxy: false` and requests skip the LocalCan proxy entirely.

In the desktop app, create the domain as above, then open the endpoint and set **Routing Mode** to **Direct**. In a project file, set `proxy: false`:

```yaml title="~/.localcan/projects/my-app.yml"
services:
  web:
    target: http://localhost:3000
    endpoints:
      - url: my-app.local
        proxy: false
```

Run `localcan reload` to pick up the file. See [Configuration → Projects](/docs/configuration/projects).

