# Quick Install

> Install LearnHouse on your own server in a few minutes. Run the setup wizard with npx or a one-line installer, start the stack and log in.

Follow these steps to install and start a self-hosted LearnHouse instance using the LearnHouse CLI.

## Step 1: Run the Setup Wizard

The quickest way to get started is to run the setup wizard directly using `npx`. No global installation is needed.

```bash
npx learnhouse@latest setup
```

> You can also use the one-line installer scripts. They install Docker and Node.js if they are missing, then launch the setup wizard.
> 
> **macOS / Linux:**
> ```bash
curl -fsSL https://raw.githubusercontent.com/learnhouse/learnhouse/main/apps/cli/install.sh | bash
```
> 
> **Windows (PowerShell):**
> ```powershell
irm https://raw.githubusercontent.com/learnhouse/learnhouse/main/apps/cli/install.ps1 | iex
```

The wizard prompts you for:

- **Edition and release channel**: Community or Enterprise, stable or dev
- **Installation name**: files go in `~/.learnhouse/<name>`
- **Domain configuration**: your domain name or `localhost`, HTTPS mode, and port
- **Database and Redis**: in Docker (the defaults) or external services
- **Organization**: name and URL slug
- **Admin credentials**: email and password for the first admin account
- **Optional features**: AI, email, S3 storage, and Google OAuth

The wizard generates `docker-compose.yml`, `.env`, `learnhouse.config.json`, and an nginx or Caddy configuration. Most options have defaults; press Enter to accept them and adjust settings later. See [Setup Wizard](https://docs.learnhouse.app/cli/setup-wizard) for every step.

### Non-interactive setup

For scripts, cloud-init or CI, use `--ci`. The admin password is required:

```bash
LEARNHOUSE_ADMIN_PASSWORD=change-me-please npx learnhouse@latest setup --ci \
  --domain learn.yourdomain.com \
  --admin-email admin@yourdomain.com
```

See [`setup` flags](https://docs.learnhouse.app/cli/commands#setup) for every option.

## Step 2: Start LearnHouse

At the end of the wizard, accept **Start LearnHouse now?**. The CLI pulls the images, starts the containers, and waits up to 3 minutes for LearnHouse to respond. This typically takes one to two minutes on the first launch.

If you declined, start it later:

```bash
npx learnhouse start
```

## Step 3: Access LearnHouse

Once all services are running, open your configured domain, or **http://localhost** for a local install. The CLI prints the URL when setup finishes.

Log in with the admin credentials you provided during setup.

## Verifying the Installation

Run the built-in diagnostics to check that everything is working:

```bash
npx learnhouse doctor
```

This checks Docker, container state and restarts, the HTTP port, DNS resolution, disk space, recent log errors, and your `.env` file, then reports any issues it finds.

You can also check the health endpoint directly. It returns `true` with status `200` when the API can reach the database:

```bash
curl http://localhost/api/v1/health
```

## Next Steps

- [CLI Commands](https://docs.learnhouse.app/cli/commands): learn all available CLI commands.
- [Configuration](https://docs.learnhouse.app/self-hosting/configuration): customize your instance with environment variables, AI, email, and more.
