ScaleTail icon indicating copy to clipboard operation
ScaleTail copied to clipboard

🏗️ New Service: Logchef

Open mr-karan opened this issue 1 month ago • 0 comments

Service Description

Logchef is a log analytics interface for logs that already live in ClickHouse or VictoriaLogs. It queries them with its own LogchefQL syntax or with SQL, and keeps its teams, sources and saved queries in a local SQLite file. It does not ingest or store logs itself, so it points at a backend you already run.

It fits ScaleTail well. A log viewer is exactly the kind of tool you want reachable from your Tailnet and from nowhere else, and the single container behind a Tailscale sidecar covers it with no reverse proxy and no exposed port.

Disclosure: I maintain Logchef. I am happy for this to be judged on the same terms as any other request.

Container Image

ghcr.io/mr-karan/logchef:latest

Upstream Compose File or Install Docs

https://github.com/mr-karan/logchef/blob/main/deployment/docker/docker-compose.yml

Website of Service

https://logchef.app

Extra Requirements

None beyond one container serving a web interface.

  • One application container on HTTP port 8125, plus the standard Tailscale sidecar.
  • No database container. Logchef keeps its own metadata in SQLite under /data.
  • Requires a ClickHouse or VictoriaLogs instance that the user already runs. That backend is deliberately outside the stack, since bundling an empty one would still need a separate log shipper to be useful.
  • Two required secrets, handled with the ${VAR:?} pattern: an API token secret (openssl rand -hex 32) and an administrator password. Built-in email and password login means no identity provider is needed.
  • The image runs as uid 1000, so the data folder needs chown 1000:1000.

Docker Compose Configuration

services:
  logchef:
    image: ghcr.io/mr-karan/logchef:latest
    ports:
      - "8125:8125"
    environment:
      - LOGCHEF_AUTH__API_TOKEN_SECRET=<32+ chars>
      - [email protected]
      - LOGCHEF_AUTH__LOCAL__ENABLED=true
      - [email protected]
      - LOGCHEF_AUTH__LOCAL__ADMIN_PASSWORD=<10+ chars>
      - LOGCHEF_SQLITE__PATH=/data/local.db
    volumes:
      - ./logchef-data/app:/data
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:8125/api/v1/health"]

Settings come from a config file in the image and are overridden by LOGCHEF_ variables, where a double underscore is one level of TOML nesting. The image is Alpine based and ships BusyBox wget, so the health check needs no extra tooling. curl is not present.

Would you be willing to work on this service?

Yes, I'd like to implement this service. The stack is written and passes docker compose config --quiet, rumdl check and git diff --check. I have confirmed the container against a real ClickHouse: sign-in, adding a source, and a SQL query returning the expected rows, with the source surviving a restart. I am completing the Tailnet run now and will open the pull request straight after.

mr-karan avatar Oct 27 '26 06:10 mr-karan