ek login, the CLI shows a verification code and a link that you can open on any device, like your laptop or phone. Because the login does not depend on a browser running on the same machine, it works over SSH, inside Docker containers and on any headless server.
How device login works
1
Start the login
2
Approve on another device
Open the URL in a browser on any device and sign in to Enkryptify if you are not already. Check that the code on the page matches the code in your terminal, then click Approve.
3
Done
The CLI detects the approval within a few seconds and stores your credentials on the machine where you ran
ek login.The verification code expires after 5 minutes. If you miss the window, run
ek login again to get a new code.Logging in on a server
Over SSH the flow is exactly the same. Runek login on the server, open the authentication URL in the browser on your own machine and approve. Then configure and run as usual:
Using the CLI in Docker
Install the CLI in your image and useek run as the entrypoint so secrets are injected when the container starts:
Dockerfile
~/.enkryptify so the credentials survive container restarts:
Where credentials are stored
On a desktop machine the CLI stores credentials in the operating system’s credential store. Containers and minimal servers usually do not have one, so the CLI falls back to a protected file at~/.enkryptify/secure-store.json, readable only by your user.
To store credentials somewhere else, for example on a mounted volume, set ENKRYPTIFY_STORE_PATH:
A login session is valid for 8 hours.
ek run injects secrets when your process starts, so a running process is not affected when the session expires. If a container restarts after the session has expired, ek run fails with an authentication error and you need to run ek login again.