feat: add one-liner install script

curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/install.sh | bash

Handles fresh install and updates. Pulls prebuilt images, creates .env from
.env.example on first run. Update README Quick Start accordingly.
This commit is contained in:
Pouzor
2026-03-09 12:03:27 +01:00
parent 6a7113193f
commit 452f3b0860
2 changed files with 53 additions and 6 deletions
+11 -6
View File
@@ -9,13 +9,9 @@ Homelable also offers a healthcheck system (WIP) through multiple methods (ping/
## Quick Start — Docker
No clone needed. Pull the pre-built images directly:
```bash
mkdir homelable && cd homelable
curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/.env.example -o .env
curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/docker-compose.prebuilt.yml -o docker-compose.yml
docker compose up -d
curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/install.sh | bash
cd homelable && docker compose up -d
```
Open **http://localhost:3000** — login with `admin` / `admin`.
@@ -26,6 +22,15 @@ Open **http://localhost:3000** — login with `admin` / `admin`.
>
> ⚠️ Keep the single quotes around the hash value in `.env` — bcrypt hashes contain `$` characters that Docker Compose would otherwise misinterpret.
### Update
Re-run the install script — it detects an existing install and only updates `docker-compose.yml`:
```bash
curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/install.sh | bash
cd homelable && docker compose pull && docker compose up -d
```
### Build from source
```bash
Executable
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
set -euo pipefail
REPO="Pouzor/homelable"
INSTALL_DIR="${HOMELABLE_DIR:-homelable}"
RAW="https://raw.githubusercontent.com/${REPO}/main"
# Detect install vs update
if [ -f "${INSTALL_DIR}/docker-compose.yml" ]; then
echo "Updating Homelable in ./${INSTALL_DIR}/"
IS_UPDATE=1
else
echo "Installing Homelable into ./${INSTALL_DIR}/"
IS_UPDATE=0
fi
mkdir -p "${INSTALL_DIR}"
cd "${INSTALL_DIR}"
# Always update docker-compose.yml and refresh .env.example
curl -fsSL "${RAW}/docker-compose.prebuilt.yml" -o docker-compose.yml
curl -fsSL "${RAW}/.env.example" -o .env.example
if [ "${IS_UPDATE}" -eq 1 ]; then
echo ""
echo " docker-compose.yml updated."
echo " Check .env.example for any new variables, then restart:"
echo " cd ${INSTALL_DIR} && docker compose pull && docker compose up -d"
else
if [ ! -f .env ]; then
cp .env.example .env
fi
echo ""
echo " Edit .env if needed (default login: admin / admin):"
echo " - Set SECRET_KEY to a random string"
echo " - Change AUTH_PASSWORD_HASH before exposing on a network"
echo ""
echo " Then run:"
echo " cd ${INSTALL_DIR} && docker compose up -d"
echo ""
echo " Open http://localhost:3000"
fi