Skip to content

Docker Widget

The Docker widget provides live monitoring and basic management of your Docker containers directly from Lastboard.

This widget lists containers, shows their running state, exposes port mappings, and provides real-time CPU/RAM stats. It also allows admin users to control container lifecycles (Start, Stop, Restart).

Docker Widget

To monitor Docker instances, Lastboard needs access to the Docker daemon.

You can connect the widget to Docker environments via three distinct modes:

When running Lastboard natively on Linux, it can access /var/run/docker.sock directly (ensure the lastboard user has permission to read the socket, often by adding it to the docker group).

When running Lastboard as a Docker container, uncomment the socket volume mount in the docker-compose.yml file to grant it access.

volumes:
- ./data:/var/lib/lastboard
- /var/run/docker.sock:/var/run/docker.sock:ro # Read-only access

For remote servers, you can use the official Lastboard Agent to securely proxy Docker API calls over HTTP with an authorization token.

The Lastboard Agent is a lightweight proxy that exposes specific Docker endpoints.

Using Docker Compose (Recommended):

services:
lastboard-agent:
image: git.codigosh.com/codigosh/lastboard-agent:latest
container_name: lastboard-agent
ports:
- "2375:2375"
environment:
- TOKEN=your_secure_random_token
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped

Using Docker CLI:

Terminal window
docker run -d \
--name lastboard-agent \
-p 2375:2375 \
-e TOKEN=your_secure_random_token \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--restart unless-stopped \
git.codigosh.com/codigosh/lastboard-agent:latest
VariableDescription
TOKENRequired: The Bearer token used to authenticate requests.
PORTThe port the agent binds to (default: 2375).
SOCKET_PATHPath to Docker socket (default: /var/run/docker.sock).

The agent provides a public, unauthenticated /health endpoint to verify connectivity.

If securing the agent behind a reverse proxy (like Pangolin or Cloudflare Zero Trust), ensure your proxy forwards the Authorization header containing the Bearer token intact.

In the widget’s settings, you can add multiple hosts. Supported URL formats include:

  • Local: local or empty string.
  • Agent Server: agent://IP_OR_DOMAIN:PORT?token=YOUR_TOKEN
  • TLS/TCP: https://... or http://...
  • Visibility: Click the eye icon to enter Edit Mode. From here, you can hide specific containers from view.
  • Customization: Rename containers or assign custom icons.
  • Admin Actions: Users with the admin role can start, stop, or restart containers directly from the widget overlay.