melange provides two signing commands that cover different levels of the APK trust chain.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chainguard-dev/melange/llms.txt
Use this file to discover all available pages before exploring further.
melange sign embeds an RSA signature into individual .apk files, replacing each package on disk with a signed version. melange sign-index signs the APKINDEX.tar.gz repository index, which is what package managers verify when fetching metadata. Both commands require an RSA private key generated with melange keygen.
In most workflows, melange build --signing-key handles signing automatically during the build. The standalone sign and sign-index commands are useful when packages are built without a signing key and need to be signed afterwards, or when re-signing existing artifacts.
Signing workflow
melange sign
melange sign signs one or more .apk files in-place. The original package file is replaced with an APK that contains the embedded signature. Multiple files are processed concurrently.
Usage
Examples
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--signing-key | -k | local-melange.rsa | Path to the RSA private key file |
melange sign-index
melange sign-index signs an APKINDEX.tar.gz repository index file. By default it re-signs an already-signed index (updating the existing signature). Use --force to strip the old signature and create a fresh one.
Usage
Examples
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--signing-key | — | melange.rsa | Path to the RSA private key file |
--force | -f | false | Overwrite the index with a freshly signed copy, discarding the existing signature |
The default key name differs between the two commands:
melange sign defaults to local-melange.rsa while melange sign-index defaults to melange.rsa. Always specify --signing-key explicitly to avoid surprises.Inherited flags
Both commands inherit the global flag:| Flag | Default | Description |
|---|---|---|
--log-level | INFO | Log verbosity: debug, info, warn, or error |
Signature verification
Once packages are signed, consumers can verify them by placing the.rsa.pub public key file in /etc/apk/keys/ on their Alpine or Wolfi system. The apk package manager will then automatically verify package and index signatures against the trusted keys.
