Appearance
Self-Server (Host Auto-Registration)
Anjungan can automatically detect and register the host server where it's deployed — no manual server entry needed. This gives you visibility into the Docker host's containers, metrics, and compliance directly from the dashboard.
How It Works
On startup, the backend runs a self-detection routine:
- Check
SELF_SERVER_ENABLED=true— skips if false/unset - Access the Docker socket (
/var/run/docker.sock) - Detect host info — hostname, OS, kernel, CPU model, core count
- Find or Create a server record in the database (matched by hostname)
- Register with
connection_type: docker-socketandis_self: true
The registered server appears as "anjungan-host" by default, visible in:
- Servers list — shows CPU/OS info
- Container page — lists all containers on the host
- Dashboard — host metrics (CPU, memory, disk)
- Compliance scanning — CIS Docker and Lynis scans run on the host
Configuration
| Variable | Default | Description |
|---|---|---|
SELF_SERVER_ENABLED | false | Set to "true" to enable auto-registration |
SELF_SERVER_NAME | "anjungan-host" | Display name for the self-server |
DOCKER_SOCKET_PATH | /var/run/docker.sock | Path to the Docker socket |
SELF_HOST_NETWORK | — | Host IP from inside the container |
Requirements
Docker Socket Access
The backend container needs the Docker socket mounted and Docker CLI installed:
yaml
backend:
environment:
SELF_SERVER_ENABLED: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
group_add:
- "988" # Docker group GID — run `getent group docker` to verifyNote: The Docker group GID (
988in the example) varies by OS. Check with:bashgetent group docker | cut -d: -f3
Connection Type: docker-socket
The self-server uses connection_type: docker-socket instead of SSH:
- Container management → via Docker socket directly
- Host metrics → via
docker run --pid=hostnsenter - SSH Terminal → via nsenter by default
Adding SSH Access (Optional)
If you want to SSH into the self-server:
- Generate an SSH key pair on the host
- Add the public key to
~/.ssh/authorized_keys - Store the private key in Anjungan via Settings → SSH Keys
- Assign the key to the self-server in Server Settings
Troubleshooting
Self-server not appearing
Check backend logs:
bash
docker compose logs backend | grep "\[self\]"Expected output:
[self] Docker host detected: my-server
[self] self-server updated: anjungan-host (abc-123...)If you see [self] Docker socket not accessible:
- Verify
SELF_SERVER_ENABLED: "true"is set - Verify the Docker socket is mounted
- Verify the container user is in the docker group
Container actions fail
Check that:
- The socket is mounted with
:rw(read-write) - The container has docker group access
- The
dockerCLI is installed in the backend container