docs/content/advanced/accounts.md
This section describes account operations.
<!--more-->You can list all the accounts registered in your local storage:
lego accounts list
Output:
Found the following accounts:
[email protected]
├── Email:
├── Server: https://acme-v02.api.letsencrypt.org/directory
├── Key Type: EC256
└── Path: /path/to/.lego/accounts/acme-v02.api.letsencrypt.org/[email protected]/account.json
...
You can register a new account by using the following command:
{{< tabs >}} {{% tab title="Simple Registration" %}}
lego accounts register --account-id='myaccount'
{{% /tab %}} {{% tab title="With External Account Binding" %}}
lego accounts register --account-id='myaccount' \
--server https://example.com/ca \
--eab \
--eab.kid xxx \
--eab.hmac yyy
{{% /tab %}} {{< /tabs >}}
You can change the account private key (a key rollover) by using the following command:
lego accounts keyrollover --account-id='myaccount'
You can recover/import an account, to do that, you need the private key of the account.
lego account recover --account-id='myaccount' --private-key /path/to/private-key.pem
The account will be imported and added to .lego/accounts/.