APT repositories and Release signatures
Hosted generates pool paths, Packages, and Release from the .deb control metadata. Clients choose an index by distribution, component, and architecture. The example uses stable/main.
Create repositories
Run these Bash commands with an authenticated administrator arkactl profile and jq. Replace the example address with your HTTPS endpoint. Publish to Hosted. Group looks in Hosted first, then in Proxy. Grant the publishing account write access to Hosted and the consuming account read access to Group and the relevant members.
For each consuming or publishing identity, sign in with its profile and run arkactl --json tokens create --name apt-ci --expires-in-days 30 | jq -er .plaintext. Send the output directly to the CI secret store. Use a separate read and write token for the examples below.
export ARKA_URL=https://packages.example.org
hosted=$(arkactl --json repo create --name apt-hosted --type hosted --format apt | jq -er .id)
proxy=$(arkactl --json repo create --name apt-proxy --type proxy --format apt \
--upstream-url https://deb.debian.org/debian | jq -er .id)
arkactl repo create --name apt-group --type group --format apt --member "$hosted,$proxy"
WRITE="$ARKA_URL/repository/apt-hosted"
READ="$ARKA_URL/repository/apt-group"Publish a Debian package
dpkg-deb --root-owner-group -Zgzip --build ./widget widget_1.2.3_arm64.deb
dpkg-deb -f widget_1.2.3_arm64.deb Package Version Architecture
curl -fsS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
-T widget_1.2.3_arm64.deb "$WRITE/widget_1.2.3_arm64.deb"Declare the package name, version, maintainer, description, and actual architecture in ./widget/DEBIAN/control. Arka reads control.tar.gz, control.tar.xz, control.tar.zst, and uncompressed control.tar, then maps bare filenames to pool/main/…. The index’s Filename gives the actual download path.
Configure clients
Configure an RSA signing key in Arka security settings for the Hosted or Group whose index clients use. A Group generates its own Release. Retrieve the corresponding Group’s public key from key.gpg, check it against the published fingerprint, and install it at /etc/apt/keyrings/arka.asc with read access for _apt. For direct Proxy access, use the upstream distribution’s key and suite.
# /etc/apt/sources.list.d/arka.list
deb [signed-by=/etc/apt/keyrings/arka.asc] https://packages.example.org/repository/apt-group stable mainUse deployment tooling to create /etc/apt/auth.conf.d/arka.conf with root-only read access. Replace the placeholders and scope the credential to the Arka repository path.
machine packages.example.org/repository/apt-group
login READER
password READ_TOKENsudo apt-get update
apt-cache policy widget
apt-get download widget=1.2.3
dpkg-deb -I widget_1.2.3_arm64.debRefresh signatures and rotate keys
Enable refresh on a Hosted or Group with an RSA signing key. The example generates a new Release every six hours and sets a 24-hour validity period.
arkactl repo update "$REPO_ID" --apt-signature-refresh-seconds 21600 \
--apt-signature-validity-seconds 86400
arkactl jobs enqueue metadata_reindex --repo-id "$HOSTED_REPO_ID"The API fields are formatConfig.aptSignatureRefreshSeconds and formatConfig.aptSignatureValiditySeconds. Set a refresh interval of 60–604800 seconds, or use 0 to disable it. Validity must exceed the refresh interval and can be up to 30 days. By default it is 24 hours or three refresh intervals, whichever is longer. On index reads, Hosted and Group sign against the current time window, package contents, and active key. Direct Proxy requests keep upstream signatures. Rebuilding Hosted metadata also generates the three files.
Check the X-Arka-APT-Signed-At, X-Arka-APT-Refresh-At, and X-Arka-APT-Valid-Until headers on Release, InRelease, or Release.gpg. Responses near expiration include a Warning. APT uses the Valid-Until value in the Release body.
To rotate, stage the new key and distribute both public keys in the client keyrings. After clients have the updated keyring, activate the new key atomically. New index requests use the new key. Remove the old public key after the old Release expires.
jq -n --arg id "$REPO_ID" \
'{name:"apt-next",algorithm:"rsa-2048",repoId:$id,staged:true}' > apt-next.json
new_key=$(arkactl --json security signing-keys generate apt-next.json | jq -er .id)
arkactl --json security signing-keys public-key "$new_key" | jq -er .publicKeyArmored > apt-next.asc
# Distribute and verify client keyrings before activating the key.
arkactl security signing-keys activate "$new_key"| Symptom | What to check |
|---|---|
| Upload rejects the Debian control archive | Check that the archive uses gzip, xz, zstd, or uncompressed tar, that its compressed and decompressed sizes are at most 16 MiB, and that its control file is at most 1 MiB. |
| NO_PUBKEY or unsigned repository | Check the signing key binding, dists/stable/InRelease, and the client keyring fingerprint. The test matrix uses trusted=yes only on temporary instances without a signing key. |
| Unable to locate package | Check dpkg --print-architecture and dists/stable/main/binary-<arch>/Packages. Verify Group membership and the package’s Architecture. |