Homepage & Cockpit Server Management

Overview

This section covers our two primary management interfaces: Homepage (hq.ganeshr.me), our unified, high-aesthetics dashboard and service launchpad; and Cockpit (cockpit.ganeshr.me), our full browser-based Linux operating system management console.


1. Homepage Dashboard (hq.ganeshr.me)

Homepage is a lightweight, customizable application dashboard designed to be your primary browser homepage and homelab control center.

flowchart TD
    User["User Browser"] --> Caddy["Caddy Proxy (:80)"]
    Caddy --> Authelia["Authelia (Biometric Passkey Check)"]
    Authelia --> Homepage["Homepage Dashboard (:3000)"]
    
    subgraph Widgets ["Homepage Information Engines"]
        Sock["/var/run/docker.sock"] --> Homepage
        BackupBadge["/custom-assets/backup-status.json"] --> Homepage
        BookLinks["bookmarks.yaml (OCI, Cloudflare, Termius)"] --> Homepage
    end

Key Features of Our Implementation:

  1. Frosted Glassmorphism Theme: Styled via custom.css with dark semi-transparent card panels, backdrop blur filters, and custom brand accent colors matching ganeshr.me.
  2. Dynamic Server Health Widgets: Queries the host’s Docker socket in read-only mode (/var/run/docker.sock:ro) to display live CPU usage, physical RAM consumption, and disk space.
  3. Automated Backup Status Widget: Reads /custom-assets/backup-status.json (updated daily by our backup script) to display a live green/red badge indicating whether last night’s Google Drive backup succeeded.
  4. Organized Service Groups:
    • Core Infrastructure: Authelia SSO, Vaultwarden, Caddy.
    • Finance & Net Worth: Wealthfolio, Trading 212 Automation, Chip Cash ISA, Real Estate.
    • Server Administration: Cockpit Console, Terminal Access, Backup Pipeline.
    • Cloud Bookmarks: Direct one-click links to Oracle Cloud Console, Cloudflare Zero Trust, Google Drive, GitHub, and Termius.

Homepage Configuration Files

Located on the host at /opt/vaultwarden/homepage-config/:

  • services.yaml: Defines apps, internal URLs, icons, and description labels.
  • widgets.yaml: Configures the top status bar (system resources, backup status, search bar).
  • bookmarks.yaml: Categorized external cloud links.
  • settings.yaml: Base theme options, header styling, and color schemes.
  • custom.css: Injected custom CSS rules for glass effects, border styling, and wallpaper positioning.

2. Cockpit Linux Web Console (cockpit.ganeshr.me)

Cockpit provides full, real-time operating system administration directly inside any web browser, eliminating the need to use SSH for everyday maintenance tasks.

What You Can Do in Cockpit:

  • Interactive Terminal: Run full bash commands directly from your browser (even on mobile devices).
  • Systemd Service & Timer Management: View, start, stop, restart, or inspect logs for background services (cloudflared, trading212-sync.timer, chip-interest.timer).
  • Real-time Performance Graphs: Live scrolling charts for CPU load, RAM utilization, network traffic, and disk read/write throughput.
  • Storage & Partitions: View filesystem health, free disk space, and mount points.
  • System Updates: Review and install Ubuntu security updates with a single click.

3. Cockpit Host Setup & Reverse Proxy Bridge

Unlike other apps, Cockpit runs natively on the Ubuntu host OS on port 9090 (not inside Docker) because it needs direct access to host kernel APIs, Linux PAM authentication, and D-Bus.

Bridging Through Docker Caddy:

  1. Host Gateway: In docker-compose.yml, Caddy is given host.docker.internal:host-gateway.
  2. Reverse Proxy: Caddy proxies cockpit.ganeshr.me to https://host.docker.internal:9090.
  3. Double Authentication Defense:
    • Layer 1: Authelia biometric passkey at the Caddy boundary.
    • Layer 2: Linux PAM authentication (Username: ubuntu, System Password).

Host Configuration File (/etc/cockpit/cockpit.conf)

[WebService]
Origins = https://cockpit.ganeshr.me wss://cockpit.ganeshr.me
ProtocolHeader = X-Forwarded-Proto
ForwardedForSanitizing = false
 
[Session]
IdleTimeout = 0

The 15-Minute Timeout Fix

By default, Cockpit abruptly terminates administrative sessions after 15 minutes of inactivity. Setting [Session] IdleTimeout = 0 disables this timeout, keeping your terminal tabs alive indefinitely.


4. Operational Cheatsheet

Check Cockpit Service Status on Host

sudo systemctl status cockpit.socket

Restart Cockpit

sudo systemctl restart cockpit

Restart Homepage Container

cd /opt/vaultwarden && sudo docker compose restart homepage

Clear Homepage Cache (Next.js Cache Reset)

If Homepage dashboard updates fail to render:

sudo docker exec -it homepage rm -rf /app/.next/server/pages/*.html /app/.next/server/pages/*.json
sudo docker restart homepage