> ## Documentation Index
> Fetch the complete documentation index at: https://siderolabs-fe86397c-1-11-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Omni Service Account

You will need `omnictl` installed and configured to follow this guide. If you haven't done so already, follow the [`omnictl` guide](../getting-started/install-and-configure-omnictl).

<Info>
  And Omni service account will create token based authentication for access to Omni. This is separate from access to the clusters managed by Omni. For Kubernetes access, see [Kubernetes Service Accounts](./create-a-kubeconfig-for-a-service-account).
</Info>

### Creating the Service Account

To create an Omni service account, use the following command:

```bash
omnictl serviceaccount create <sa-name>
```

<Info>
  By default, the created service account will have a lifetime of 1 year, and uses the role of the creating user. These options can be adjusted by passing in the `--ttl` and `--role` parameters to the command. [See the command for details](../reference/cli.md#omnictl-serviceaccount-create).
</Info>

The output of this command will print `OMNI_ENDPOINT` and `OMNI_SERVICE_ACCOUNT_KEY`.

<Warning>
  Store the `OMNI_SERVICE_ACCOUNT_KEY` securely as it will not be displayed again.
</Warning>

Export these variables with the printed values:

```bash
export OMNI_ENDPOINT=<output from above command>
export OMNI_SERVICE_ACCOUNT_KEY=<output from above command>
```

You can now use `omnictl` with the generated service account.
