Docker Swarm automatically stores two critical keys in the manager’s in-memory keystore by default:Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
- Raft Encryption Key: Encrypts on-disk Raft logs
- TLS Key: Secures communication between Swarm nodes
When you enable auto-lock, Swarm generates a one-time unlock key. Store it in a secure password manager—without it, you cannot unlock your manager after a restart.
Enable Auto-Lock
You can turn on auto-lock either during cluster initialization or on an existing Swarm:Manager Restart and Unlocking
After a manager restart, the Swarm remains locked. Any attempt to run Swarm commands will result in an error:Quick Reference
| Command | Description |
|---|---|
docker swarm init --autolock=true | Initialize a new Swarm with auto-lock enabled |
docker swarm update --autolock=true | Turn on auto-lock for an existing Swarm |
docker swarm unlock | Unlock a locked Swarm manager after restart |