Learn

age: simple file encryption that stays out of your way

age is a simple, modern file-encryption tool. You encrypt a file to a recipient's public key, and only the matching private key can decrypt it. It does one job with one short command and no certificate or keyring ceremony, which is why automated pipelines favour it.

At a glance

What it is
A small command-line tool that encrypts a file to a recipient key
Why people pick it
One command, one key, no certificate or keyring overhead
How it is keyed
Encrypt to a public recipient; decrypt with the private key
Common use here
Encrypting a backup tarball before it leaves the machine
Flow

Encrypting a backup with age

The tarball is encrypted to a recipient's public key. The resulting file is safe to store off-site; only the holder of the matching private key can read it back.

1
Plain tarball your backup before encryption
2
age --recipient (public key) encrypts to that recipient
3
Encrypted file, stored off-site readable only with the private key

What does age do, and why so small?

age encrypts a file to a recipient. You hold a key pair: a public recipient string you can share, and a private key you keep. Anything encrypted to the public recipient can only be opened with the matching private key. That is the whole model. There is no certificate authority, no web of trust, no keyring daemon to fight. The deliberate smallness is the feature: a tool you can reason about in a sentence is a tool you can wire into a script and trust to behave the same way every night.

The typical use in a self-hosted stack is the last step before data leaves the machine. A backup job tars up the directories that matter, pipes the result through age to a single recipient key, and writes an encrypted file you can store on a USB stick or a rented disk without trusting that disk at all.

Where does age stop?

age encrypts files at rest. It is not full-disk encryption, so it does not protect a whole running system the way LUKS (Linux Unified Key Setup) does, and it is not a transport layer, so it does not secure a live connection the way TLS (Transport Layer Security) does. It also does not sign anything: encrypting a file proves nobody else can read it, not who wrote it.

One operational caveat worth the scar tissue: if the age binary is not installed, a poorly written script can skip the encrypt step and carry on as if it worked. The data goes off-site unencrypted and nothing complains. Check that the tool is actually present before you trust the pipeline that depends on it.

Check it yourself

age --version

If the binary is not installed, the command fails, which is exactly the silent gap that can make an encryption step skip without complaint in a script.

age fits

  • Encrypting a backup or a secret to one or a few known recipients
  • Scripts that need a non-interactive, one-line encrypt step
  • A setup where you control the keys and want no certificate machinery
  • Storing files on someone else's disk without trusting them

age is not for

  • Full-disk encryption of a running system, which is what LUKS is for
  • Signing files to prove who wrote them, a different job
  • Encrypting to strangers without first holding their recipient key
  • A transport channel; it encrypts files at rest, not a live connection

Related terms

← All terms Reviewed: June 2026