Heimwerk is a platform for deploying Docker containers, designed to empower users by providing easy, self-service access to homelab resources. It enables administrators to share server capabilities securely and effortlessly, allowing users to deploy services from a prebuilt catalog with a single click while maintaining a standardized and controlled environment.
The recommended use case is in combination with Pangolin, to automatically make deployed services accessible to the user, including subdomain, network rules, and access control.
The fastest way to deploy Heimwerk on a Linux server. This script downloads the necessary production files, generates a secure SECRET_KEY, and configures your domain.
Run the following command:
curl -sSL https://raw.githubusercontent.com/arsiba/heimwerk/refs/heads/main/install.sh | bash
docker compose -f docker-compose.prod.yml exec heimwerk python manage.py collectstatic
docker compose -f docker-compose.prod.yml exec heimwerk python manage.py createsuperuser
docker compose -f docker-compose.prod.yml restartIf you prefer to set up the containers manually:
- Download the production files:
docker-compose.prod.yml,nginx.conf, and.env.example. - Configure environment:
cp .env.example .env # Edit .env to set your ALLOWED_HOSTS and a secure SECRET_KEY - Deploy:
docker compose -f docker-compose.prod.yml up -d docker compose -f docker-compose.prod.yml exec heimwerk python manage.py migrate docker compose -f docker-compose.prod.yml exec heimwerk python manage.py createsuperuser
- Clone the repository:
git clone https://github.com/arsiba/heimwerk.git cd heimwerk - Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
Edit the
cp .env.example .env # Ensure DEBUG=True for local dev.envfile and set a uniqueSECRET_KEY. - Apply migrations & Create superuser:
python manage.py migrate python manage.py createsuperuser
- Run the application:
The application will be available at
python manage.py runserver
http://127.0.0.1:80.
- Catalog Management: Maintain a catalog of prebuilt Docker modules.
- One-Click Deployment: Safe and straightforward self-service for sharing resources.
- Pangolin Integration: Automatic network configuration and access control (recommended).
- Extensible: Easily add new modules to the catalog.
- Real-time Monitoring: (In progress) Statistics for deployed instances via WebSockets.
- Language: Python 3.10+
- Framework: Django 5.2.x, Django Channels
- Database: SQLite (default for development)
- Containerization: Docker (via Docker SDK for Python)
- Web Server: Daphne (for ASGI/WebSocket support)
- Python 3.10 or higher
- Docker installed and running
- Access to Docker API
heimwerk/
├── apps/ # Django applications
│ ├── catalog/ # Module catalog management
│ ├── deployments/ # Instance and deployment logic
│ ├── hosts/ # Docker host management
│ └── users/ # User management and signals
├── config/ # Project configuration (settings, URLs, ASGI/WSGI)
├── core/ # Core logic and utilities
│ ├── docker/ # Docker SDK wrappers and deployment logic
│ └── utils/ # Common utilities
├── templates/ # Global HTML templates
├── docs/ # Documentation (TODOs, etc.)
├── manage.py # Django management script
├── requirements.txt # Python dependencies
└── pyproject.toml # Build and tool configuration (Black, Isort)
| Command | Description |
|---|---|
python manage.py runserver |
Start the development server. |
python manage.py migrate |
Apply database migrations. |
python manage.py createsuperuser |
Create an administrative user. |
python manage.py test |
Run the test suite. |
python manage.py collectstatic |
Collect static files for production. |
python manage.py shell |
Open the Django interactive shell. |
Currently, the project uses default Django settings. Future updates may include:
DEBUG: Set toFalsein production.SECRET_KEY: Django secret key.ALLOWED_HOSTS: List of hosts allowed to access the site.- TODO: Define app-specific environment variables for Docker host configurations and secure storage.
Run tests using the standard Django test runner:
python manage.py test
