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

# apptainer-key-export(1)

Export a public or private key into a specific file

## NAME

apptainer-key-export - Export a public or private key into a specific file

## SYNOPSIS

**apptainer key export \[export options...\]**

## DESCRIPTION

The 'key export' command allows you to export a key and save it to a file.

## OPTIONS

**-a**, **--armor**\[=false\]\
 	ascii armored format

**-g**, **--global**\[=false\]\
 	manage global public keys (import/pull/remove are restricted to root user or unprivileged installation only)

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

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

**-s**, **--secret**\[=false\]\
 	export a secret key

## EXAMPLE

```
  Exporting a private key:
  $ apptainer key export --secret ./private.asc
  Exporting a public key:
  $ apptainer key export ./public.asc
```

## SEE ALSO

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

## HISTORY

22-Sep-2026 Auto generated by spf13/cobra
