Deployment Guide

Deploy LogTide on your infrastructure using pre-built Docker images or build from source.

Pre-built Images (Recommended)

No Build Required
Use our official pre-built images from Docker Hub or GitHub Container Registry. Just download the config, set your passwords, and run.

Quick Start (2 Minutes)

# Create project directory
mkdir logtide && cd logtide

# Download docker-compose.yml and environment template
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/docker-compose.yml
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/.env.example
mv .env.example .env

# Edit .env with secure passwords
nano .env

# Start LogTide
docker compose up -d

Required Environment Variables

Variable Description Example
DB_PASSWORD PostgreSQL password (any characters) random_secure_password
REDIS_PASSWORD Redis password (optional, any characters) another_secure_password
API_KEY_SECRET Encryption key (32+ chars) your_32_character_secret_key_here

Database migrations run automatically on first start.

Since 1.6.1 passwords can contain any character, # % @ / included: the compose file passes the database and Redis settings separately and the backend builds the connection URLs, encoding the passwords. The one exception is $: wrap such a password in single quotes in .env (DB_PASSWORD='pa$word'), otherwise Docker Compose reads it as a variable.

Monitoring private/internal targets

To prevent SSRF, uptime monitors and webhook delivery deny private and internal destinations by default (loopback, private, link-local incl. cloud metadata 169.254.169.254, CGNAT, multicast and reserved IPv4/IPv6 ranges).

Self-hosted deployments that legitimately monitor internal services can opt back in:

# Allow monitors and webhooks to reach private/internal targets
MONITOR_ALLOW_PRIVATE_TARGETS=true

Use an External PostgreSQL or Redis

The backend and the worker share one environment block, x-backend-env, at the top of docker-compose.yml. To use a database or Redis outside the compose project (1.6.1 and later), change the connection settings there:

x-backend-env: &backend-env
  # Separate settings: the backend builds the URL and encodes the password
  DB_HOST: db.example.com
  DB_PORT: 5432
  DB_USER: logtide
  DB_PASSWORD: ${DB_PASSWORD}
  DB_NAME: logtide
  REDIS_HOST: redis.example.com
  REDIS_PORT: 6379
  REDIS_PASSWORD: ${REDIS_PASSWORD}
  # Or one URL each, which wins over the settings above
  # (percent-encode # % @ / ? : in a password you put here)
  # DATABASE_URL: postgresql://logtide:[email protected]:5432/logtide?sslmode=require
  # REDIS_URL: rediss://:[email protected]:6380

A URL is the way to pass extra connection options, such as sslmode or a TLS rediss:// connection. If you no longer need the bundled postgres or redis service, remove it together with the depends_on entries of backend and worker that point at it.

(Optional) Docker Log Collection with Fluent Bit

To automatically collect logs from all Docker containers using Fluent Bit:

# Download Fluent Bit configuration files
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/fluent-bit.conf
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/parsers.conf
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/extract_container_id.lua
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/map_syslog_level.lua
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/wrap_logs.lua

# Add your LogTide API key to .env
echo "FLUENT_BIT_API_KEY=your_api_key_here" >> .env

# Start with logging profile enabled
docker compose --profile logging up -d

This profile is optional. Without it, LogTide runs without the Fluent Bit container.

(Optional) System Metrics Collection

To collect host system metrics (CPU, memory, disk I/O, network) via the standard OTLP endpoint:

# Download metrics configuration files
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/fluent-bit-metrics.conf
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/format_metrics.lua

# Start with metrics profile enabled
docker compose --profile metrics up -d

# Or combine with Docker log collection
docker compose --profile logging --profile metrics up -d

Metrics appear in the Metrics Explorer under service host-system. Fluent Bit is included for convenience, but any OTLP-compatible collector works. See the Host Monitoring guide for details.

ARM64 / Raspberry Pi Support

LogTide images (logtide/backend, logtide/frontend) are built for both linux/amd64 and linux/arm64, so they work natively on Raspberry Pi 3/4/5 (64-bit OS).

Fluent Bit on ARM64: The default Fluent Bit image may have limited ARM64 support. You can specify an alternative image in your .env file:

# For Raspberry Pi / ARM64, use the official multi-arch registry
FLUENT_BIT_IMAGE=cr.fluentbit.io/fluent/fluent-bit:4.2.2

# Or build your own ARM64 image
FLUENT_BIT_IMAGE=myregistry/fluent-bit-arm64:latest
Raspberry Pi Performance

Raspberry Pi 4 (4GB+) or Pi 5 is recommended for homelab/small deployments. For high-volume workloads, consider x86 hardware or our managed cloud.

Available Docker Images

Image Registry
logtide/backend Docker Hub
logtide/frontend Docker Hub
ghcr.io/logtide-dev/logtide-backend GitHub Container Registry
ghcr.io/logtide-dev/logtide-frontend GitHub Container Registry
Production Tip

Always pin to a specific version in production instead of using latest:

# In your .env file
LOGTIDE_BACKEND_IMAGE=logtide/backend:1.7.1
LOGTIDE_FRONTEND_IMAGE=logtide/frontend:1.7.1

Ready to Go

Frontend: http://localhost:3000 | API: http://localhost:8080

Simplified Deployment (No Redis)

Redis is Now Optional

Starting with v0.5.0, LogTide can run without Redis for simpler deployments. When REDIS_URL is not configured, LogTide automatically uses PostgreSQL-based alternatives:

  • Job queues: graphile-worker (PostgreSQL-based) instead of BullMQ
  • Live tail streaming: PostgreSQL LISTEN/NOTIFY instead of Redis pub/sub
  • Rate limiting: In-memory fallback (per-instance)
  • Caching: Disabled (queries go directly to database)

When to Use Simplified Deployment

✓ Good For
  • • Home labs and personal projects
  • • Development environments
  • • Single-instance deployments
  • • Resource-constrained systems (Raspberry Pi)
  • • Low to medium log volume (<1000 logs/sec)
⚠ Consider Redis For
  • • Horizontal scaling (multiple backend instances)
  • • High log volume (>1000 logs/sec sustained)
  • • Production with high availability requirements
  • • When you need query result caching
  • • Distributed rate limiting across instances

Quick Start (Simplified)

# Create project directory
mkdir logtide && cd logtide

# Download simplified docker-compose (no Redis)
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/docker-compose.simple.yml
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/.env.example
mv .env.example .env

# Edit .env - only DB_PASSWORD and API_KEY_SECRET required
nano .env

# Start LogTide (fewer containers, less memory)
docker compose -f docker-compose.simple.yml up -d

Required Environment Variables (Simplified)

Variable Description Required
DB_PASSWORD PostgreSQL password Yes
API_KEY_SECRET Encryption key (32+ chars) Yes
REDIS_PASSWORD Not used: this setup has no Redis and uses PostgreSQL instead No
Migrating to Redis Later

You can add Redis at any time by setting REDIS_PASSWORD in your .env file and switching to the full docker-compose.yml. No data migration required - Redis is only used for ephemeral data (cache, rate limits, job queues).

Remote Deployment

Auto-Detection Works in Most Cases

LogTide automatically detects the correct API URL based on how you access the frontend:

  • Via IP:3000 (e.g., http://192.168.1.100:3000) → API auto-detected at http://192.168.1.100:8080
  • Via domain on port 80/443 (e.g., https://logtide.example.com) → Uses relative URLs (assumes reverse proxy)

No PUBLIC_API_URL configuration needed for these scenarios! This is the compose default since 1.6.2. If your .env still has PUBLIC_API_URL=http://localhost:8080 from an older install, remove that line.

Ports taken on the host? Since 1.6.2 set FRONTEND_PORT, BACKEND_PORT, DB_PORT, REDIS_PORT or SYSLOG_PORT in .env. Only the published port changes, containers keep their own ports inside the docker network, and auto-detection follows BACKEND_PORT.

Example: VPS Deployment (No Config Needed)

# Server IP: 192.168.1.100

# .env configuration - no PUBLIC_API_URL needed!
DB_PASSWORD=secure_password
REDIS_PASSWORD=secure_password
API_KEY_SECRET=your_32_character_secret_key_here

# Access points:
# Frontend: http://192.168.1.100:3000
# API: http://192.168.1.100:8080 (auto-detected)

With Reverse Proxy (nginx/Traefik)

Important: Proxy Both Frontend and API

When using a domain (port 80/443), LogTide assumes a reverse proxy is in place and uses relative URLs (/api/). Your reverse proxy must route both the frontend and the API, otherwise API calls will fail with 404.

Example nginx configuration:

server {
  listen 443 ssl;
  server_name logtide.example.com;

  # Frontend
  location / {
      proxy_pass http://localhost:3000;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
  }

  # Backend API - REQUIRED for relative URLs to work
  location /api/ {
      proxy_pass http://localhost:8080/api/;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
  }

  # SSE for live tail (requires special headers)
  location /api/v1/logs/stream {
      proxy_pass http://localhost:8080/api/v1/logs/stream;
      proxy_set_header Connection '';
      proxy_http_version 1.1;
      chunked_transfer_encoding off;
      proxy_buffering off;
      proxy_cache off;
  }
}

Client IP Behind a Proxy

By default (TRUST_PROXY=false) the backend sees the proxy as the client, so the audit log shows the proxy address for every request and all users share the login, registration and password reset rate limits. Tell the backend how many proxies sit in front of it:

# .env
# One reverse proxy (nginx, Caddy, Traefik, Nginx Proxy Manager)
TRUST_PROXY=1

# Cloudflare in front of the reverse proxy
TRUST_PROXY=2

# Or the proxy addresses themselves (IPs and CIDRs, comma separated)
TRUST_PROXY=172.16.0.0/12

The client IP is then the address right before those proxies, so a client cannot fake it with its own X-Forwarded-For header. TRUST_PROXY=true still works and trusts every hop, which lets a client choose the IP that gets logged: prefer a number or a list. Hop counts and lists need 1.6.1 or later.

The same address is what an API key's "Allowed origins and IPs" list is matched against. If a key with an IP allowlist answers 403 behind a proxy, the response says which address the server saw (request IP: ..., since 1.7.1): when it is the proxy's own address, TRUST_PROXY is not set for your setup. The list accepts single addresses and CIDR ranges, IPv4 and IPv6. Clients that reach Cloudflare over IPv6 are seen with their IPv6 address, so allow that range too.

Alternative: API on Subdomain

If you prefer to host the API on a separate subdomain instead of proxying /api/:

# .env configuration
PUBLIC_API_URL=https://api.logtide.example.com

# Access points:
# Frontend: https://logtide.example.com
# API: https://api.logtide.example.com
Quick Reference: PUBLIC_API_URL
Scenario PUBLIC_API_URL Notes
Docker via IP:3000 (not needed) Auto-detected → IP:8080
Domain + reverse proxy (not needed) Uses /api/v1 (proxy must route it)
API on subdomain https://api.example.com Explicit configuration
Custom host ports (not needed) Set BACKEND_PORT, auto-detection follows it (1.6.2+)
LogTide Cloud https://api.logtide.dev Pre-configured

Horizontal Scaling

Scale Without Code Changes
LogTide is designed for horizontal scaling. Backend and worker services are stateless - all state is stored in PostgreSQL and Redis. For high availability, use the Traefik overlay to run multiple backend instances behind a load balancer.
Redis Required for Horizontal Scaling

Horizontal scaling requires Redis for shared state across instances (rate limiting, sessions, job distribution). The simplified deployment (no Redis) only supports single-instance deployments.

Enable Horizontal Scaling

The default docker-compose.yml runs a single instance of each service. For horizontal scaling, download and use the Traefik overlay:

# Download Traefik overlay (adds load balancer)
curl -O https://raw.githubusercontent.com/logtide-dev/logtide/main/docker/docker-compose.traefik.yml

# Start with horizontal scaling support
docker compose -f docker-compose.yml -f docker-compose.traefik.yml up -d

# Scale to 3 backend instances and 2 workers
docker compose -f docker-compose.yml -f docker-compose.traefik.yml up -d --scale backend=3 --scale worker=2

# Check running instances
docker compose ps
Traefik Changes Access URLs

When using the Traefik overlay, access changes to a single port:

  • With Traefik: http://localhost:3080 (frontend + API on same port)
  • Without Traefik: Frontend at :3000, API at :8080

The LOGTIDE_PORT environment variable controls the Traefik port (default: 3080).

The overlay needs Docker Compose 2.24 or later. It sets TRUST_PROXY: "1" on the backend, since Traefik is the one proxy in front of it; change it to "2" in the overlay if Cloudflare or another proxy sits in front of Traefik (see Client IP behind a proxy).

Architecture

Component Default With Traefik Notes
Traefik - 1 instance Load balancer, reverse proxy
Backend 1 instance N instances Stateless API servers
Worker 1 instance N instances Background job processors (BullMQ)
Frontend 1 instance N instances SvelteKit SPA (served by adapter-node)
Redis Optional 1 instance (required) Rate limiting, job queues, cache. Required for scaling.
PostgreSQL 1 instance 1 instance TimescaleDB for time-series data
Why Scaling Works (with Redis)
  • Rate limiting: Stored in Redis (shared across all backend instances)
  • Sessions: Stored in Redis (no sticky sessions required)
  • Job queues: BullMQ distributes work across all workers automatically
  • Health checks: Traefik removes unhealthy instances from rotation

Without Redis, rate limiting is per-instance and job queues use PostgreSQL (graphile-worker), which doesn't support multi-instance scaling.

Kubernetes (Helm)

Production-Ready Kubernetes Deployment
Deploy LogTide on any Kubernetes cluster using our official Helm chart. Includes auto-scaling, health probes, Ingress support, and Prometheus monitoring.

Quick Install

# Add the LogTide Helm repository
helm repo add logtide https://logtide-dev.github.io/logtide-helm-chart
helm repo update

# Install LogTide
helm install logtide logtide/logtide --namespace logtide --create-namespace --set timescaledb.auth.password=<your-db-password> --set redis.auth.password=<your-redis-password>

What's Included

  • Backend API (2+ replicas)
  • Frontend (2+ replicas)
  • Worker (BullMQ jobs)
  • TimescaleDB StatefulSet
  • Redis StatefulSet
  • Horizontal Pod Autoscaler
  • Ingress (nginx, ALB, etc.)
  • ServiceMonitor (Prometheus)

Enable Ingress

helm install logtide logtide/logtide --namespace logtide --create-namespace --set timescaledb.auth.password=<password> --set redis.auth.password=<password> --set ingress.enabled=true --set ingress.className=nginx --set ingress.hosts[0].host=logtide.example.com --set ingress.hosts[0].paths[0].path=/ --set ingress.hosts[0].paths[0].pathType=Prefix --set ingress.hosts[0].paths[0].service=frontend --set ingress.hosts[0].paths[1].path=/api --set ingress.hosts[0].paths[1].pathType=Prefix --set ingress.hosts[0].paths[1].service=backend --set ingress.hosts[0].paths[2].path=/v1 --set ingress.hosts[0].paths[2].pathType=Prefix --set ingress.hosts[0].paths[2].service=backend

Use External Database

For production, you can use an external managed database (AWS RDS, Cloud SQL, etc.):

helm install logtide logtide/logtide --namespace logtide --create-namespace --set timescaledb.enabled=false --set externalDatabase.host=your-db.region.rds.amazonaws.com --set externalDatabase.port=5432 --set externalDatabase.database=logtide --set externalDatabase.username=logtide --set externalDatabase.password=<password> --set redis.auth.password=<password>

Cloud-Specific Examples

AWS EKS

# values-eks.yaml
global:
storageClass: gp3

ingress:
enabled: true
className: alb
annotations:
  alb.ingress.kubernetes.io/scheme: internet-facing
  alb.ingress.kubernetes.io/target-type: ip

GCP GKE

# values-gke.yaml
global:
storageClass: standard-rwo

ingress:
enabled: true
className: gce
Helm Chart Resources

Build from Source (Alternative)

For Contributors & Custom Builds
Build Docker images locally from source code. Useful for development or when you need custom modifications.

Clone and Build

# Clone the repository
git clone https://github.com/logtide-dev/logtide.git
cd logtide/docker

# Copy environment template
cp ../.env.example .env

# Edit .env with your configuration
nano .env

# Build and start all services
docker compose -f docker-compose.build.yml up -d --build

Services Running

Access LogTide at http://your-server-ip:3000

Monitoring & Maintenance

Health Checks

# Check all services status
docker compose ps

# Check backend health
curl http://localhost:8080/health

# With Traefik overlay
curl http://localhost:3080/health

# Check database
docker compose exec postgres psql -U logtide -d logtide -c "SELECT COUNT(*) FROM logs;"

Common Commands

# Restart a service
docker compose restart backend

# View service logs
docker compose logs --tail=100 -f backend

# Stop all services
docker compose down

# Update to latest version
docker compose pull
docker compose up -d

Database Backup

# Create backup
docker compose exec postgres pg_dump -U logtide logtide > backup_$(date +%Y%m%d).sql

# Restore from backup
docker compose exec -T postgres psql -U logtide logtide < backup_20250115.sql
Esc

Type to search across all documentation pages