Skip to content
AtGlance
Architecture

Architecture

AtGlance has two parts that work together:

  • the Management Console, which you host (Docker containers, one per organization);
  • the atglance CLI and agent, one small binary on every server you manage.

Every connection starts from the server: the CLI and the agent connect out to the console, so no inbound port is opened on your servers. The only exception is Remote Tunnel, where the console connects to servers through a profile you set up (Direct, a bastion hop or a connector).

The Management Console

The console's containers: Caddy in the app container on port 8000 (80/443 with your domain), the Kong API gateway on 8002, the app with the worker, scheduler, MCP server and controller, MySQL, Redis and the app-storage volume; optional overlays for Agent Monitoring, Remote Tunnel, NFS and a custom domain; outbound calls to atglance.live, storage targets and SMTP.

Part What it does
Caddy (in app) The front door on host port 8000 (and 80/443 with your domain). Limits request sizes and sends the paths of plugin services (Servers pages, Remote Tunnel pages) to their containers
app Laravel 12 on PHP 8.2: the web console, the REST API (/api/v1), roles and workspaces, the licence check, plugins and the setup wizard. Runs the database migrations when it starts
worker and scheduler Queued jobs (backups, email, notifications) and scheduled tasks
Kong API gateway Host port 8002: the atglance CLI, scripts and the MCP server (/mcp) come in here, with rate limits
controller The only container with the Docker socket. Answers a fixed set of calls: start and stop the MCP, Agent Monitoring and Remote Tunnel containers, mount NFS exports
MySQL 8, Redis 7 Data, cache and queue. Inside the Docker network only
app-storage volume .env with APP_KEY, configuration files, backups, the licence file

Optional overlays add containers for premium features. They use the same images and are switched on and off in Site Settings › Plugins:

  • Agent Monitoring (docker-compose.agents.yml): agent-monitoring (the Servers pages and the agents API), agent-gateway (the agents' WebSocket), agent-worker and tsdb (TimescaleDB).
  • Remote Tunnel (docker-compose.tunnel.yml): remote-tunnel (its pages, internal API and jobs) and tunnel (terminal, files, port forwards, bastion hops, connectors and the reverse tunnel).

If an optional service is down, its pages say so and the rest of the console keeps working.

Outbound from the console: atglance.live (licence activation), your storage targets (S3, Azure Blob, Google Drive, NFS), SMTP and single sign-on providers.

The CLI and the agent

The atglance binary on a host: its commands, the settings in /etc/atglance/config.json and the identity in /var/lib/atglance/identity.json, the systemd timer for the daily run, and the atglance-agent service with its collectors, buffer and heartbeat; REST calls to the console's API gateway and one WebSocket to the agent gateway.

Part What it does
atglance One binary for Linux (systemd), Windows and macOS: login, system register, health check of the host's services, configuration backup and restore, schedule, and the agent commands
Settings /etc/atglance/config.json: the console address and the API key (atgla-)
Identity /var/lib/atglance/identity.json: the system id and system key from registration, and the service account key (atgsa-) for scheduled runs
Schedule A systemd timer (Windows: a scheduled task) runs the daily check and sync
Agent The atglance-agent service for live monitoring: system metrics, services, application checks (HTTP, TCP, TLS, process), events and requests from the console. It buffers while offline and reconnects by itself

The CLI reads the host; it changes it only for restore and agent install.

How they work together

Hosts connect out to the console directly, through a Remote Tunnel reverse tunnel, or through an Agent Tunnel connector. REST from the CLI goes to Kong and the console API; the agent's WebSocket goes to the agent gateway, then through Redis streams to the agent worker, MySQL and TimescaleDB; the tunnel service opens SSH to hosts. Four credentials: the API key, the system key, the service account key and the agent token.

Network paths from a server to the console:

  1. Direct: the server reaches the console's address (public, VPN, peering).
  2. Reverse tunnel: the console keeps an SSH connection to the server and offers itself on the server's 127.0.0.1:8002. See Reverse tunnel.
  3. Agent Tunnel connector: a connector in the server's network dials the console and offers it there. See Agent Tunnel setup.

Credentials:

Credential Who has it Used for
API key atgla- a person (Settings › API keys) atglance login, system register, agent install
System key the host, from registration the host's own calls (status, configuration files)
Service account key atgsa- the host, for scheduled runs the daily check and sync, without a person's key
Agent token atgag- the agent, from agent install the WebSocket; the console keeps only its SHA-256

Sequences

Connect a host

Sequence: the admin creates an API key; atglance login calls GET /api/v1/meta and GET /api/v1/whoami through Kong on port 8002 and saves the key; atglance system register posts the host facts to /api/v1/systems and saves the system id and key.

Scheduled run

Sequence: the systemd timer starts atglance, which collects service health, reads its system status and uploads changed configuration files to /api/v1/config-files; the console stores them in the configured storage.

Live monitoring

Sequence: atglance agent install gets an agent token; the agent opens a WebSocket to /agent/v1/connect; the agent gateway authenticates it with the agent-monitoring service, answers agent.hello with server.welcome and passes heartbeats through Redis to the agent worker; configuration changes come back as config.update.

The agent speaks AACP v1 over the WebSocket. Heartbeats arrive every 60 seconds by default; a server is delayed after 90 seconds without one and offline after 180 seconds (Site Settings › Agents).

Remote Tunnel session

Sequence: the admin opens a terminal; the Remote Tunnel service checks the licence, permissions and allow-list and hands the session to the tunnel service; the browser's terminal WebSocket goes through Caddy to the tunnel service, which opens SSH to the bastion, a channel to the target and the login there.

Security in short

  • No inbound ports on servers: the CLI and the agent connect out; the console reaches servers only through Remote Tunnel profiles you create.
  • Least privilege between containers: only the controller holds the Docker socket, and it answers a fixed list of calls. Internal APIs between containers are signed (HMAC).
  • Secrets: stored encrypted with APP_KEY; API keys and agent tokens are kept as hashes.
  • Roles: administrators, workspace admins and users; workspaces separate teams and their systems.
  • Audit: sign-ins, changes, Remote Tunnel sessions and file transfers are in the activity log.

See also: Self-hosting, CLI reference, Set up Agent Monitoring, Remote Tunnel.