Skip to Content
Edit on GitHub

Commands

Full reference for all LearnHouse CLI commands.

setup

Interactive wizard that generates a complete Docker Compose deployment. See Setup Wizard for details.

npx learnhouse@latest setup

start

Start all Docker containers for your deployment.

npx learnhouse start

stop

Stop all running containers.

npx learnhouse stop

logs

Stream logs from all containers in real-time.

npx learnhouse logs

config

Display current installation metadata — version, directory, URL, organization slug, and file locations.

npx learnhouse config

doctor

Run comprehensive diagnostics to identify issues. Checks:

  • Docker installation and daemon status
  • Docker Compose v2 availability
  • Container health and restart counts
  • Port availability
  • DNS resolution (for non-localhost domains)
  • Disk space (warns below 1 GB)
  • Docker volume sizes
  • Log analysis (scans for errors)
  • .env validation (required variables, secret length)
  • Image freshness
npx learnhouse doctor

backup

Create a database backup as a .tar.gz archive containing a pg_dump and optionally your .env file.

npx learnhouse backup

Backups are saved to {installDir}/backups/learnhouse-backup-{timestamp}.tar.gz.

Restore

Restore a database from a backup archive. This overwrites the current database.

npx learnhouse backup --restore
npx learnhouse restore <archive.tar.gz>

Restore only works with local (Docker) databases, not external connections. Restart services after restoring.

deployments

View and manage deployments on the current machine.

npx learnhouse deployments

Features:

  • List all LearnHouse deployments with container status
  • Scale resource limits (memory) for learnhouse-app, db, and redis
  • View current resource usage via docker stats

shell

Open an interactive shell (/bin/sh) inside a running container.

npx learnhouse shell

Displays a list of running containers to choose from.

env

Interactive environment variable editor. Edit variables by category:

  • Domain & Hosting
  • Database & Redis
  • Security
  • AI
  • Email
  • S3 Storage
  • OAuth
npx learnhouse env

Secret values are masked in the display. Optionally restart services after changes.

health

Run health checks against the running deployment.

npx learnhouse health

Checks container status, PostgreSQL connection, Redis ping, HTTP health endpoint, disk usage, and resource consumption.

dev

Start a local development environment. See Dev Mode for details.

npx learnhouse dev
FlagDescription
--eeEnable Enterprise Edition features