Install with Docker Compose

Deploy the full KubeWatch stack using the one-line installer.

The easiest way to run the full self-hosted KubeWatch stack is the one-line installer. It handles cloning the repository, generating secrets, and starting all services.

One-line install

Run this on your server as a user with Docker access (or as root):

curl -fsSL https://raw.githubusercontent.com/lloyd-theophilus/monitoring/main/install.sh | bash

The installer will prompt you interactively for:

PromptDefaultNotes
DomainlocalhostYour server's domain name. Use localhost for local access only.
Admin emailNoneUsed to create the first admin account
HTTP port80Change if port 80 is already in use
HTTPS port443Change if port 443 is already in use
Enable TLS?yRequires a valid domain with DNS pointing to this server

The installer will:

  1. Clone the repository to /opt/kubewatch
  2. Generate cryptographically random secrets for JWT_SECRET, POSTGRES_PASSWORD, and ADMIN_PASSWORD
  3. Write a .env file at /opt/kubewatch/.env
  4. Pull all Docker images
  5. Start all services with docker compose up -d
  6. Print the admin credentials

Total time: 2-5 minutes depending on internet speed.

Manual install

If you prefer full control over the process:

# 1. Clone the repository
git clone https://github.com/lloyd-theophilus/monitoring.git /opt/kubewatch
cd /opt/kubewatch

# 2. Copy the example environment file
cp .env.example .env

# 3. Edit the .env file with your values
nano .env   # or vim, or any editor

# 4. Start all services
docker compose up -d

Refer to the Configuration Reference for a full list of variables you should set in .env.

Verify the installation

Check that all services are running:

cd /opt/kubewatch
docker compose ps

Expected output, all services should show running:

NAME              IMAGE                          STATUS
gateway           kubewatch/gateway:latest       running
auth              kubewatch/auth:latest          running
ingestion         kubewatch/ingestion:latest     running
query             kubewatch/query:latest         running
live-data         kubewatch/live-data:latest     running
integrations      kubewatch/integrations:latest  running
dashboard         kubewatch/dashboard:latest     running
postgres          timescale/timescaledb:latest   running
redis             redis:7-alpine                 running

If any service is not running, check its logs:

docker compose logs <service-name>

Access the dashboard

Log in with the admin email and the password printed at the end of the install, or found in /opt/kubewatch/.env as ADMIN_PASSWORD.

Starting and stopping

# Stop all services (data is preserved)
cd /opt/kubewatch && docker compose down

# Start all services
cd /opt/kubewatch && docker compose up -d

# Restart a single service
cd /opt/kubewatch && docker compose restart gateway

Viewing logs

# All services
docker compose logs -f

# Single service
docker compose logs -f gateway

Next steps