---
name: "singularity-key-newpair"
section: "1"
platform: "linux"
package: "apptainer"
version: "1.5.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/singularity-key-newpair"
---

# singularity-key-newpair(1)

Create a new key pair

## NAME

apptainer-key-newpair - Create a new key pair

## SYNOPSIS

**apptainer key newpair**

## DESCRIPTION

The 'key newpair' command allows you to create a new key or public/private\
   keys to be stored in the default user local keyring location (e.g.,\
   $HOME/.apptainer/keys).

## OPTIONS

**-b**, **--bit-length**=4096\
 	specify key bit length

**-C**, **--comment**=""\
 	key comment

**-E**, **--email**=""\
 	key owner email

**-h**, **--help**\[=false\]\
 	help for newpair

**-d**, **--keysdir**="/build/.apptainer/keys"\
 	set local keyring dir path, an alternative way is to set environment variable 'APPTAINER\_KEYSDIR'

**-N**, **--name**=""\
 	key owner name

**-P**, **--password**=""\
 	key password

**-U**, **--push**\[=false\]\
 	specify to push the public key to the remote keystore

## EXAMPLE

```
  $ apptainer key newpair
  $ apptainer key newpair --password=psk --name=your-name --comment="key comment" --email=mail@email.com --push=false
```

## SEE ALSO

**[apptainer-key(1)](/apptainer-key/1.md)**

## HISTORY

22-Sep-2026 Auto generated by spf13/cobra
