Sign inSign up

fomadev0/lith

By fomadev0

•Updated 5 days ago

Tiny (≈340 KB) dependency-free web server: static files, reverse proxy, live reload, metrics.

Image
Networking
Developer tools
Web servers
0

106

fomadev0/lith repository overview

⁠LITH — Light HTTP Server

LITH is a lightweight, fast and secure web server written in standard C11, with no external dependencies. This image is built FROM scratch: it contains only the LITH executable and a sample site — about 340 KB, no shell, no OS to patch.

  • Static files: in-memory cache, gzip, ETag/304, Range requests, SPA mode, custom error pages
  • Reverse proxy with round-robin load balancing, failover and health checks
  • Security by default: path traversal protection, hidden files blocked, security headers, rate limiting, Basic auth
  • Live reload for development, /__lith/status (JSON) and /__lith/metrics (Prometheus)
  • Runs as an unprivileged user (65534), graceful shutdown on docker stop, built-in HEALTHCHECK

Platforms: linux/amd64, linux/arm64 (Raspberry Pi, Apple Silicon, ARM servers)

⁠Quick start

# Sample site on http://localhost:8090
docker run -d -p 8090:8090 fomadev0/lith

# Your own site (mounted read-only)
docker run -d -p 8090:8090 -v "$PWD/public:/srv/public:ro" fomadev0/lith:1.0.0

# Your own configuration
docker run -d -p 8090:8090 \
  -v "$PWD/lith.conf:/lith.conf:ro" \
  -v "$PWD/public:/srv/public:ro" \
  fomadev0/lith:1.0.0

⁠Tags

TagContent
1.0.0Exact version, never changes — recommended for production
1.0Latest 1.0.x (bug fixes)
latestLatest stable release

⁠Paths and port

Port8090
Configuration/lith.conf (KEY=VALUE format)
Site root/srv/public
Health checkGET /__lith/health (also lith health inside the container)

Example lith.conf:

PORT=8090
PUBLIC_DIR=/srv/public
SPA_FALLBACK=1
GZIP=1
RATE_LIMIT=50
PROXY=/api http://backend:3000

⁠docker-compose

services:
  web:
    image: fomadev0/lith:1.0.0
    ports: ["8090:8090"]
    volumes:
      - ./public:/srv/public:ro
    restart: unless-stopped

⁠HTTPS

This image is built without TLS to stay tiny: put it behind your ingress, load balancer or a proxy such as Caddy or Traefik. Native HTTPS is available when building LITH from source with make TLS=1.

Distributed under the Fordima Public License (FPL).

Tag summary

Content type

Image

Digest

sha256:a36ab24f7…

Size

105.8 kB

Last updated

5 days ago

docker pull fomadev0/lith