Debian Repositories
Nitro Repo supports Debian package repositories that expose the standard dists/ and pool/ layout used by apt.
Debian repositories can run in two modes:
- Hosted: you upload
.debpackages to Nitro; Nitro generatesdists/metadata. - Proxy/Mirror: Nitro serves and caches upstream APT paths (including
by-hash) and can download all referenced.debfiles for offline mirroring.
For hosted repositories, Nitro generates Packages, Packages.gz, and Packages.xz indexes for every component/architecture pair and emits a Release file so that apt update behaves as expected.
Uploading packages
Uploads require write access to the repository and must use multipart/form-data. The simplest workflow is to select a distribution and component and post the .deb file in the package field:
curl -u username:password \
-F distribution=stable \
-F component=main \
-F package=@nitro_repo_1.0.0_amd64.deb \
https://nitro.example.com/repositories/<storage>/<repository>If distribution or component are omitted the first value from the repository configuration will be used. Architectures are detected from the package metadata and must match one of the allowed entries (include all if you need architecture-independent packages).
Every upload is stored under pool/<component>/<first-letter>/<package>/ and automatically indexed inside the appropriate dists/<suite>/<component>/binary-<arch>/Packages* files.
Using the repository with apt
Add the repository to /etc/apt/sources.list.d/nitro.list (replace placeholders with your storage and repository names):
# /etc/apt/sources.list.d/nitro.list
deb [trusted=yes] https://nitro.example.com/repositories/<storage>/<repository> stable mainRelease signatures are not generated yet, so include the trusted=yes option or configure your host to allow unsigned repositories. Once added, run sudo apt update followed by the usual apt install commands. Nitro serves the Packages, Packages.gz, and Packages.xz files that apt expects.
Proxy/mirror repositories
Debian proxy repositories are designed to behave like an upstream mirror:
GET/HEADrequests are served from Nitro storage when cached; on a cache miss Nitro fetchesupstream_url + request.path, stores it, then serves it.- Upstream metadata bytes (
InRelease/Release/Release.gpg) are served unchanged so signature verification can work. - An offline mirror refresh can be triggered via the API:
POST /api/repository/<id>/deb/refresh(requires repository edit permission). The refresh downloadsRelease/InRelease/Release.gpg, thePackagesindex for configured dists/components/architectures, creates a SHA256by-hashalias forPackages, and downloads every referenced.debfile.
Current limitations
- Hosted repositories: Release files are unsigned. Configure clients with
trusted=yesuntil signing is available. - Hosted repositories: uploads must be
.debartifacts; source packages andaptby-hash lookups are not implemented yet. - Proxy repositories: upstream authentication is not supported yet; scheduling is not implemented yet (manual refresh only).