# Quick start

###### Get a Public URL pointing at your local app in three commands.

This guide assumes the `localcan` binary is on your `PATH` and the daemon is running. If `localcan` isn't on your `PATH` yet, see [Installation](/docs/installation). On macOS and Windows the desktop app starts the daemon for you. On Linux or a headless install, run `localcan start --detach` first.

#### 1. Activate a license

```sh
localcan license activate localcan_xxxxxxxxxxxxx
```

The first time you activate, LocalCan prompts you to accept the license agreement and asks whether to share anonymous usage data. To skip the prompts (CI, scripts, headless servers), pass the answers as flags:

```sh
localcan license activate localcan_xxxxxxxxxxxxx --accept-terms --no-usage-data
```

Don't have a key? Sign up for the [Free plan](https://www.localcan.com/dashboard/get-started?plan=free) to get one. It includes one Public URL at a time with 60-minute sessions and 1 GB of traffic per month.

#### 2. Open a tunnel

Point your local app at any port. Here we'll use a Next.js dev server on `:3000`:

```sh
localcan http 3000
```

`localcan` auto-starts the daemon if it isn't running, then prints the local domains and the Public URL:

```plaintext
Connecting tunnel to http://localhost:3000...
Forwarding https://swift-falcon.local → localhost:3000
Forwarding http://swift-falcon.local → localhost:3000
Forwarding https://swift-falcon-12.localcan.dev → localhost:3000

Requests (Ctrl+C to stop):

15:04:21    GET 200  /
15:04:21    GET 200  /_next/static/css/app.css
```

While the command is running you'll see live request logs. Hit Ctrl+C to stop the tunnel. Your saved projects (if any) are not affected.

#### 3. Configure a permanent setup (optional)

Quick tunnels are designed for one-offs. They get a fresh URL every run, and Ctrl+C tears them down. For a stable URL, a custom domain, or any setup with extra config (multiple services, headers, basic auth), write your own project file:

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

The `provider: localcan` endpoint has no `url:`. The rule is to leave it empty and LocalCan fills it in. The first time you run `localcan reload`, the daemon registers the tunnel with the backend, gets back a URL like `my-app-12.localcan.dev`, and writes it into the file alongside the `provider:` line. To pin a specific subdomain instead, set `url:` yourself.

Then tell the running daemon to pick it up:

```sh
localcan reload
localcan tunnel ls
```

See [Configuration → Projects](/docs/configuration/projects) for the full schema.

#### Next steps

- [Quick tunnels](/docs/cli/quick-tunnels): more on the `http`, `https`, and `tcp` commands.
- [Daemon](/docs/cli/daemon): `start`, `stop`, `restart`, `reload`, `status`.
- [Configuration overview](/docs/configuration/overview): how `~/.localcan/` is laid out.

