Files
docs/pages/self-hosting/hosting-guide.mdx
2025-11-26 23:27:44 +01:00

95 lines
3.3 KiB
Plaintext

import { Callout } from 'nextra-theme-docs'
# Self Hosting Guide
LearnHouse Community Edition is designed for self-hosting on your own infrastructure. We use Docker & Docker Compose to make it easy to run LearnHouse on any machine.
<Callout type="info" emoji="🚀">
**For complete installation instructions, please visit the [LearnHouse Community Edition repository](https://github.com/learnhouse/community-edition)**. This repository contains the latest Docker Compose setup, detailed configuration guides, and troubleshooting information.
</Callout>
## Quick Start
**TLDR**: Clone the repository, copy `.env.example` to `.env`, configure your admin credentials, and run `docker-compose -f docker-compose.yml up -d`. Should be ready in less than 2 minutes!
```bash
git clone https://github.com/learnhouse/community-edition.git
cd community-edition
cp env.example .env
# Edit .env with your configuration
docker-compose -f docker-compose.yml up -d
```
## Prerequisites
- **Docker Engine 20.10+** and **Docker Compose 2.0+**
- At least **2GB RAM**
- **10GB+ disk space**
- A domain name (optional, for production; use `localhost` for local development)
## Key Features
The Community Edition includes:
- **Multi-container architecture** with PostgreSQL, Redis, and nginx
- **Environment-based configuration** via `.env` file
- **Initial admin setup** with configurable credentials
- **Production-ready** deployment options
- **Data persistence** with Docker volumes
- **Health checks** for all services
- **Comprehensive monitoring** and logging
## Important Configuration
Before first start, make sure to set:
- `LEARNHOUSE_INITIAL_ADMIN_EMAIL`: Email for the first admin user
- `LEARNHOUSE_INITIAL_ADMIN_PASSWORD`: Password for the first admin user
- `NEXTAUTH_SECRET`: Generate with `openssl rand -base64 32`
- `LEARNHOUSE_AUTH_JWT_SECRET_KEY`: Generate with `openssl rand -base64 32`
<Callout type="warning">
**⚠️ Important**: Change the admin password after first login! The default credentials are only for initial setup.
</Callout>
## Architecture
LearnHouse Community Edition uses a multi-container architecture:
- **learnhouse-app**: Combined Next.js frontend and FastAPI backend (includes internal nginx on port 80)
- **nginx**: Reverse proxy (port 80 externally)
- **db**: PostgreSQL database
- **redis**: Redis cache
All containers communicate via a Docker network.
## Access LearnHouse
After starting, access LearnHouse at:
- **Frontend**: http://localhost
Login with the initial admin credentials you configured in `.env`.
## Further Configuration
For detailed information on:
- Environment variables
- Production deployment
- Data persistence and backups
- Monitoring and troubleshooting
- Advanced configuration options
Please visit the **[LearnHouse Community Edition repository](https://github.com/learnhouse/community-edition)**.
You can also check our [configuration guide](/self-hosting/configuration) for additional LearnHouse-specific settings like AI features, email configuration, S3 storage, and more.
## Found bugs?
If you find any bugs or have suggestions, please open an issue on the [Community Edition repository](https://github.com/learnhouse/community-edition/issues), we would love to hear from you.
Please include as much information as possible, like the steps to reproduce the bug, the expected behavior and the actual behavior.