mirror of
https://github.com/serverhype1/gitlab-install.git
synced 2026-05-26 06:43:51 +00:00
Mirror von github.com/serverhype1/gitlab-install
- Shell 100%
| install.sh | ||
| README.md | ||
Docker-install — GitLab Install Script
An interactive installation script that automatically sets up a self-hosted GitLab CE instance via Docker on Debian-based systems.
Features
- Fully automated — installs Docker, Docker Compose, and all dependencies if not already present
- SMTP configuration — set up email delivery with automatic TLS detection based on port (465 = TLS, 587 = STARTTLS)
- OpenID Connect — optional SSO login integration (e.g. with Authentik, Keycloak, etc.)
- Reverse proxy — optional installation of:
- Caddy — automatic HTTPS, zero configuration needed
- NGINX — requires manual configuration after installation
- Or use an already installed proxy, or none at all
- SSH access — optional Git-over-SSH on a custom port
- Automatic updates — optional cronjob every Sunday at 03:00 AM that updates the system and all Docker Compose projects
- Secure password input — SMTP password is masked with asterisks during entry
Prerequisites
- A Debian-based Linux server (Debian, Ubuntu, etc.)
- Root access
- A domain pointing to your server (e.g.
gitlab.example.com)
Quick Start (One-Liner)
Download and run the script directly:
Via GitLab:
curl -sSL https://gitlab.pascalheim.de/serverhype/docker-yt/-/raw/main/install.sh?ref_type=heads | bash
Via GitHub:
curl -sSL https://raw.githubusercontent.com/serverhype1/docker-yt/refs/heads/main/gitlab/install.sh | bash
Installation via Git Clone
Alternatively, clone the repository and run it locally:
Via GitLab:
git clone https://gitlab.pascalheim.de/serverhype/docker-yt.git
cd docker-yt
chmod +x install.sh
./install.sh
Via GitHub:
git clone https://github.com/serverhype1/docker-yt.git
cd docker-yt
chmod +x install.sh
./install.sh
What the Script Does
- System preparation — installs
sudo,curl,nano,htop,wget,openssland performs a system update - Docker setup — installs Docker and Docker Compose if not already present
- GitLab configuration — interactively asks for:
- Domain name (e.g.
example.com→ GitLab will be available atgitlab.example.com) - SMTP settings (defaults to Strato, but any provider works)
- Reverse proxy choice (Caddy / NGINX / existing / none)
- OpenID Connect settings (optional)
- HTTP port and optional SSH port
- Domain name (e.g.
- File generation — creates
docker-compose.ymland.envin/root/ - Caddy integration — if Caddy is selected, automatically adds the reverse proxy entry to the Caddyfile
- GitLab startup — pulls the image and starts the container
- Update script (optional) — creates
/root/.scripts/update.shwith a weekly cronjob that:- Runs
apt update,apt upgrade,apt dist-upgrade,apt autoremove - Finds and updates all Docker Compose projects under
/root/
- Runs
- Shows credentials — waits for GitLab to finish initializing and displays the initial root password
Default Ports
| Service | Default Port | Configurable |
|---|---|---|
| GitLab HTTP | 80 | Yes |
| GitLab SSH | 2222 | Yes (optional) |
Notes
- This repository is maintained on both GitLab and GitHub — both are always in sync.
- The initial root password is displayed after installation and expires after 24 hours — change it immediately after your first login.
- GitLab data is stored in
/root/daten/(config, logs, data). - The update script avoids duplicates — if it already exists, only missing entries are appended.
Docker-YT — GitLab Install Script (Deutsch)
Ein interaktives Installationsskript, das eine selbstgehostete GitLab CE-Instanz vollautomatisch per Docker auf Debian-basierten Systemen aufsetzt.
Features
- Vollautomatisch — installiert Docker, Docker Compose und alle Abhängigkeiten, falls noch nicht vorhanden
- SMTP-Konfiguration — E-Mail-Versand einrichten mit automatischer TLS-Erkennung basierend auf dem Port (465 = TLS, 587 = STARTTLS)
- OpenID Connect — optionale SSO-Login-Anbindung (z.B. mit Authentik, Keycloak, etc.)
- Reverse Proxy — optionale Installation von:
- Caddy — automatisches HTTPS, keine weitere Konfiguration nötig
- NGINX — erfordert manuelle Konfiguration nach der Installation
- Oder einen bereits installierten Proxy verwenden, oder gar keinen
- SSH-Zugriff — optionaler Git-over-SSH auf einem eigenen Port
- Automatische Updates — optionaler Cronjob jeden Sonntag um 03:00 Uhr, der das System und alle Docker-Compose-Projekte aktualisiert
- Sichere Passworteingabe — SMTP-Passwort wird bei der Eingabe mit Sternchen maskiert
Voraussetzungen
- Ein Debian-basierter Linux-Server (Debian, Ubuntu, etc.)
- Root-Zugriff
- Eine Domain, die auf den Server zeigt (z.B.
gitlab.example.com)
Schnellstart (One-Liner)
Das Skript direkt herunterladen und ausführen:
Über GitLab:
curl -sSL https://gitlab.pascalheim.de/serverhype/docker-yt/-/raw/main/install.sh?ref_type=heads | bash
Über GitHub:
curl -sSL https://raw.githubusercontent.com/serverhype1/docker-yt/refs/heads/main/gitlab/install.sh | bash
Installation via Git Clone
Alternativ das Repository klonen und lokal ausführen:
Über GitLab:
git clone https://gitlab.pascalheim.de/serverhype/docker-yt.git
cd docker-yt
chmod +x install.sh
./install.sh
Über GitHub:
git clone https://github.com/serverhype1/docker-yt.git
cd docker-yt
chmod +x install.sh
./install.sh
Was das Skript macht
- Systemvorbereitung — installiert
sudo,curl,nano,htop,wget,opensslund führt ein System-Update durch - Docker-Setup — installiert Docker und Docker Compose, falls noch nicht vorhanden
- GitLab-Konfiguration — fragt interaktiv ab:
- Domain-Name (z.B.
example.com→ GitLab wird untergitlab.example.comerreichbar) - SMTP-Einstellungen (Standardwerte für Strato, aber jeder Anbieter funktioniert)
- Reverse-Proxy-Auswahl (Caddy / NGINX / vorhanden / keiner)
- OpenID-Connect-Einstellungen (optional)
- HTTP-Port und optionaler SSH-Port
- Domain-Name (z.B.
- Dateierstellung — erstellt
docker-compose.ymlund.envunter/root/ - Caddy-Integration — wenn Caddy gewählt wurde, wird der Reverse-Proxy-Eintrag automatisch in die Caddyfile geschrieben
- GitLab-Start — lädt das Image herunter und startet den Container
- Update-Skript (optional) — erstellt
/root/.scripts/update.shmit einem wöchentlichen Cronjob, der:apt update,apt upgrade,apt dist-upgrade,apt autoremoveausführt- Alle Docker-Compose-Projekte unter
/root/findet und aktualisiert
- Zugangsdaten anzeigen — wartet bis GitLab fertig initialisiert ist und zeigt das initiale Root-Passwort an
Standard-Ports
| Dienst | Standard-Port | Konfigurierbar |
|---|---|---|
| GitLab HTTP | 80 | Ja |
| GitLab SSH | 2222 | Ja (optional) |
Hinweise
- Das Repository wird sowohl auf GitLab als auch auf GitHub gepflegt — beide sind immer auf dem gleichen Stand.
- Das initiale Root-Passwort wird nach der Installation angezeigt und läuft nach 24 Stunden ab — ändere es sofort nach dem ersten Login.
- GitLab-Daten werden unter
/root/daten/gespeichert (Config, Logs, Daten). - Das Update-Skript vermeidet Duplikate — falls es bereits existiert, werden nur fehlende Einträge ergänzt.