A privileged access manager on one machine, with Docker Compose
You do not need Kubernetes, a licence or a sales call to give a small team recorded, password-free access to its servers. This is the whole path on one machine with Docker Compose, from an empty host to a replayed session, with the backup and upgrade steps people usually skip.
EnvMap is an open-source, self-hosted control plane with a privileged access manager (PAM) in it. People open SSH, RDP and VNC sessions from the browser and never see the password or key, and every session is recorded. One setting turns an installation into the PAM and nothing else, which is what this guide does.
Every command below was run on a test machine while this post was written, including the backup.
What you need#
- A Linux machine (
amd64orarm64) with Docker and the Compose plugin. A small VM is enough to start. - An authenticator app on your phone. Two-factor sign-in is required for everyone, the first administrator included.
- One SSH host to try it on.
1. Get the Compose file and choose a key#
mkdir envmap && cd envmap
curl -fsSLO \
https://raw.githubusercontent.com/ammar-hassoun/envmap/main/deploy/compose/compose.yamlCreate a .env file beside it. ENVMAP_MODE=pam makes the installation the PAM and nothing else. ENVMAP_SECRET_KEY is the key that seals every stored credential and chains the audit log:
printf 'ENVMAP_MODE=pam\nENVMAP_SECRET_KEY=%s\n' "$(openssl rand -hex 32)" > .env
chmod 600 .envSet the key before the first start. Without one, EnvMap makes a key file on its own data volume, which works, but then a copy of the volume holds both the locked box and its key. With the key in .env, the volume holds no key at all. Keep a copy of .env somewhere safe, apart from your backups.
2. Start it#
docker compose up -d
docker compose psTwo containers start:
| Service | What it does |
|---|---|
envmap | The portal. Its port is published on 127.0.0.1:8471 only, so nothing on your network can reach it yet. |
guacd | Apache Guacamole's gateway, which draws RDP and VNC sessions in the browser and writes their recordings. It shares the portal's network and volume and is not published anywhere. |
Both run as an unprivileged user on a read-only filesystem with every Linux capability dropped. Everything they keep is in one volume, envmap_data.
3. Sign in for the first time#
Open http://localhost:8471 on the machine, or through an SSH tunnel (ssh -L 8471:127.0.0.1:8471 you@the-host). A new installation has no accounts and no default password: every page goes to Create the first administrator.
- Enter your email, your name and a password: at least 10 characters, with upper and lower case letters and a digit.
- Scan the QR code with your authenticator app and type the six digits.
You land on Privileged Access. On a PAM-only installation there is no Overview, no clusters and no other menus, only the PAM, its settings, users, roles and the audit log.
4. Allow sessions#
In Settings → Privileged Access, the PAM is already on. Live sessions are a separate switch, so you can build the catalogue before anyone can connect. Tick permit opening a live session on a target and save.

5. Add your first target#
On the Privileged Access page choose + New target:
- name: how people will find it, for example
web-01; - protocol: SSH;
- address & port: the host's name or IP;
- username and credential: a password or an SSH private key. Either is sealed when you save and never shown again, not even to you.
Tick production if the host's name should be typed before every session. Save.
Want to store no key at all? Choose EnvMap certificate instead. EnvMap then signs a new key for each session, valid for five minutes, and the host trusts EnvMap's authority with one line of sshd configuration. See SSH without stored keys.

6. Open a session, then replay it#
Choose connect on the row. For a production target EnvMap first asks for the host's name, a ticket link, how long you need and a short summary, and keeps all four with the recording.
The terminal opens in the browser. Type a few commands, then close the tab. Open the Recordings tab: the session is there, with who, where and how long. Replay it at any speed, or open its list of commands. A password typed at a prompt with no echo is never in the recording, because only what the host sends back is recorded.
RDP and VNC work the same way: choose RDP or VNC as the protocol. The gateway is already running.

7. Let other people in: TLS in front#
The port stays on 127.0.0.1 on purpose. To let your team use it, run a reverse proxy with a certificate on the same machine. With Caddy, which gets the certificate and passes the WebSocket connections that terminals use, the whole configuration is:
envmap.example.com {
reverse_proxy 127.0.0.1:8471
}Then tell EnvMap that people arrive over HTTPS, so its cookies are marked secure:
echo 'ENVMAP_COOKIE_SECURE=1' >> .env
docker compose up -dNever publish the port on 0.0.0.0 without TLS in front. It holds the credentials to your servers.
8. Back up what matters#
Three things, kept apart:
- The key: your
.envfile. The database: a consistent copy, taken while EnvMap runs. The image has no
sqlite3command, so its own Python does it. The copy is written to the data volume becausedocker compose cpcannot read the container's in-memory/tmp:bashdocker compose exec envmap /venv/bin/python -c \ "import sqlite3; d = sqlite3.connect('/data/portal-backup.db'); sqlite3.connect('/data/portal.db').backup(d); d.close()" docker compose cp envmap:/data/portal-backup.db ./portal-backup.db docker compose exec envmap rm /data/portal-backup.db- The recordings, in
pam-sessions/on the volume. They are evidence, so keep them as long as your policy asks.
The simplest complete backup is a copy of the whole envmap_data volume, taken after docker compose stop.
9. Upgrade#
docker compose pull
docker compose up -dBefore a new version touches the database, EnvMap copies it to /data/backups/, and keeps the newest five. To stay on one release instead of the newest, add ENVMAP_VERSION= and a release number to .env.
What a one-machine install cannot do#
- Recorded web sessions. A web application is recorded by opening it in a browser that EnvMap starts as a Kubernetes pod, so that needs a cluster. Web targets on a Compose install open directly and are not recorded.
- Survive the machine. Everything is on one host and one volume. Back it up.
Everything else is the same product: access requests approved by a second person, SSH certificates, runbooks beside the terminal, live watch and take-over, and the hash-chained audit log.
Try it first without installing#
The demo is the real screens with pretend data. More about the PAM: the PAM page, how it compares with JumpServer, Teleport, Warpgate and Guacamole, and how a session recording is built. The full installation reference, every Compose variable included, is in the docs.
EnvMap home · Docs · GitHub