Keys and sign-ins
You reach Heaven with a browser sign-in, an SSH key or an API key. Each acts as you, with your access, and a key can be limited to some commands or Computers.
On this page
Sign in
#Sign in with an email code, Google, GitHub or a passkey. Add methods under Sign-in methods in Settings → General. Only enter your Heaven sign-in on heaven.dev: a Computer's website runs its owner's software.
A browser sign-in lasts 90 days. Change it under Session length to 7, 14 or 28 days, or Never. A shorter length applies to existing sign-ins too, and to the sessions they opened on private Computer websites.
heaven sign-in view
heaven sign-in lifetime 28dReference: Read your sign-ins, Set the sign-in lifetime.
CLI and agent sign-in
#heaven login signs in the CLI on that machine. You approve its code in your browser, and the CLI gets a key that acts as you for 90 days. It can register the machine's SSH key at the same time, which stays until you remove it.
heaven loginAn MCP client connecting to the hosted server asks you to approve it in your browser. Its sign-in lasts 90 days, and refreshing extends it to at most a year.
A connect code signs in an agent that can't open a browser. Create the code while signed in and give it to the agent. It works once, within 15 minutes. When the agent uses it, you approve the request in your browser, and the agent gets a 90-day sign-in that acts as you. To give an agent less, use an API key instead.
Reference: Create a connect code, Read connect requests, Approve a connect request, Deny a connect request.
SSH keys
#Register a public key to connect over SSH. It reaches the Computers you have access to. If you don't have a key yet, make one on the machine you connect from.
ssh-keygen -t ed25519In Settings → SSH & API keys, choose Add SSH key, paste the .pub file and choose where it works.
| Access | Where the key works |
|---|---|
| All Computers | Heaven's SSH commands and Computers where you have Site and SSH access or higher. |
| One Computer | SSH to the selected Computer, while you have Site and SSH access or higher. |
| One tag | SSH to Computers currently carrying the tag, where you have Site and SSH access or higher. |
With one key registered, you can add more over SSH.
ssh cli@heaven.dev ssh-key add < ~/.ssh/id_ed25519.pubFor a program that needs only the private website, use a site token.
Reference: Register an SSH key, List SSH keys.
API keys
#An API key belongs to one organization and acts as you there. It stops working if you leave the organization. Give a program or agent its own key, limited to what it needs.
In Settings → SSH & API keys, choose New API key, then its organization, permissions, scope and expiry. Heaven shows the secret once.
A key can have a list of commands, a scope of Computers, pools or tags, or both, and a request must pass each. A key with neither can only read. A key with a scope and no list can run any command you could, inside its scope. This key can only read Computers in web:
heaven api-key create --organization acme --scope-pool web --command view --expires 30dA scope follows renames, and a tag scope covers whichever Computers carry the tag now. heaven command view lists the commands a key can be given.
A key can expire after up to 365 days, or never. A key made by an expiring key can't outlive it.
Reference: Create an API key, Edit an API key, List commands.
Rotate an API key
#Rotating gives a key a new secret and keeps everything else about it. Choose Rotate secret in the key's menu and update the programs that use it. The old secret keeps working for 24 hours, so nothing breaks while you switch. The CLI can set that overlap to anything up to seven days, or 0 to end it now.
ssh cli@heaven.dev api-key rotate KEY_ID --overlap 1hReference: Rotate an API key.
Revoke access
#In Settings → SSH & API keys, remove an SSH key or revoke an API key from its menu. CLI and MCP sign-ins are listed with the API keys and are revoked the same way. Keys a sign-in created stay until you revoke each one. On the machine itself, heaven logout revokes its sign-in and the SSH key it registered.
Sign out everywhere in Settings → General ends every browser sign-in, but not CLI, MCP or SSH access.
heaven ssh-key view
heaven ssh-key remove SSH_KEY_ID
heaven api-key view
heaven api-key remove API_KEY_ID
heaven sign-in end-allReference: Remove an SSH key, Revoke an API key, End browser sign-ins.
Your account
#Your account is you: your name, email, sign-ins and keys. Change your name or email in Settings → General → Profile. An email change needs a code sent to both the old and the new address.
heaven account name Alex
heaven account email NEW_EMAIL
heaven account email NEW_EMAIL --old-code OLD_CODE --code NEW_CODEOpen Notifications from the dashboard's top bar to see notices such as invitations and key expiry. Use heaven notification view to read them from a terminal.
To delete your account, choose Delete account in Settings → General and enter the code Heaven emails you. Your sign-ins and memberships end, and your Computers go to their organizations. An organization where you're the only member closes, and its Computers are deleted. Where you're the billing owner of a shared organization, Heaven offers the role to another member.
heaven account delete
heaven account delete --code CODEReference: Set your name, Change your email, Read notifications, Delete your account.