Caddyview/README.md
SW 8d60e9c745
Some checks failed
Release / release (push) Failing after 53s
feat: incremental history cache, errors tab, Forgejo migration
- Cache current log file incrementally by line count/inode to avoid
  re-processing the whole file every refresh.
- Collect 4xx/5xx errors during aggregation and add [4] ERRORS tab.
- Update README URLs and brew tap to point to git.janvete.com.
- Replace GitHub Actions workflow with Forgejo Actions release workflow.
2026-09-10 09:10:14 +02:00

1.9 KiB

Caddyview

Remote Caddy log viewer over SSH.

Installation

macOS (Homebrew)

brew tap janvete/tools
brew install caddyview

Linux

Download the latest release from the releases page and extract it:

VERSION=v0.6.0
curl -L "https://git.janvete.com/seth/Caddyview/releases/download/${VERSION}/caddyview-${VERSION}-linux-amd64.tar.gz" | tar xz
sudo mv caddyview /usr/local/bin/

Usage

caddyview ssh root@192.168.x.x
caddyview ssh -p 2222 admin@server.com

Press [1] for live traffic, [2] for last 24 hours, [3] for last 7 days, and [4] to view recent 4xx/5xx errors with URL and origin.

Required Caddyfile Changes

1. Add a log block to your Caddyfile

Add the logging configuration to a snippet or to each individual site block:

(hsts) {
    log {
        output file /var/log/caddy/access.log {
            roll_size 100mb
            roll_keep 10
        }
        format json
    }
    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options "nosniff"
        Referrer-Policy "strict-origin-when-cross-origin"
        Permissions-Policy "geolocation=(), microphone=(), camera=()"
        -Server
    }
}

some.dns.com {
    import hsts
    reverse_proxy 192.168.71.6:1378
}

2. Create the log file with correct permissions (BEFORE reloading!)

mkdir -p /var/log/caddy
touch /var/log/caddy/access.log
chown caddy:caddy /var/log/caddy/access.log

3. Reload Caddy

systemctl reload caddy

Development

The source repository is hosted at https://git.janvete.com/seth/Caddyview. To clone via SSH use the dedicated SSH endpoint:

git clone ssh://git@git-ssh.janvete.com:554/seth/Caddyview.git