Getting Started¶
Get Repod up and running and upload your first package in under 10 minutes.
Prerequisites¶
- Docker 24+
- Docker Compose v2 plugin
- Linux or macOS (Windows: use WSL2)
- 3 GB RAM minimum (ClamAV loads ~800 MB of signatures on startup; the backend container is limited to 4 GB)
Step 1 — Clone and configure¶
git clone https://github.com/repod-ce/repod
cd repod
cp .env.example .env
cp backend.env.example backend.env
.env controls Docker Compose (ports, public URLs, POSTGRES_PASSWORD).
backend.env controls the FastAPI backend (secrets).
Generate each secret with openssl rand -hex 32. In .env, set the database
password and the webhook secret:
In backend.env, set the same WEBHOOK_SECRET, plus the two signing secrets:
JWT_SECRET_KEY=your-64-char-hex-secret-here
SETTINGS_ENCRYPTION_KEY=another-64-char-hex-secret-here
WEBHOOK_SECRET=another-64-char-hex-secret-here
You do not set the database connection string: docker-compose.yaml builds
DATABASE_URL from POSTGRES_PASSWORD, and a value written in backend.env
would be ignored. The backend refuses to start in production with an empty or
default JWT_SECRET_KEY or WEBHOOK_SECRET, or with the default database password.
No admin account is created at this stage — you'll create it through the setup wizard in Step 4, on first access to the web interface.
Pre-provisioning an admin (optional, for automated deployments)
If you'd rather not use the setup wizard (e.g. scripted/CI deployments), you can pre-provision the first admin account by setting both:
Generate the bcrypt hash with:
docker run --rm python:3.12-slim sh -c \
"pip install -q bcrypt && python -c \"import bcrypt; print(bcrypt.hashpw(b'MyPassword1!', bcrypt.gensalt(12)).decode())\""
Escape $ signs in .env files
bcrypt hashes start with $2b$. In any *.env file read by Docker
Compose, every $ must be escaped as $$ to prevent variable
interpolation. If ADMIN_PASSWORD_HASH is missing, empty, or not a
valid bcrypt hash, no admin row is seeded and the setup wizard
remains available — this is the safe default.
The setup token
Between container startup and the creation of the first admin, anyone who
can reach the backend on the network could call POST /api/v1/setup. To
close this window, POST /api/v1/setup requires a setup token. If you do
not choose one, the backend generates one at each start and writes it once
in its log (Step 4 shows how to read it). To keep a value of your own, set:
GET /api/v1/setup/status remains public either way.
Step 2 — Choose your package formats (REPO_FORMAT)¶
Repod is one backend that can serve .deb, .rpm, and Alpine .apk packages.
The REPO_FORMAT environment variable (set on the backend service in
docker-compose.yaml) controls which formats are active:
REPO_FORMAT |
Serves | Repository tooling |
|---|---|---|
apt (default) |
.deb |
reprepro |
rpm |
.rpm |
createrepo_c |
apk |
.apk |
Repod's own APK indexer |
both |
.deb + .rpm |
reprepro + createrepo_c |
all |
.deb + .rpm + .apk |
reprepro + createrepo_c + APK indexer |
The bundled docker-compose.yaml ships with REPO_FORMAT: all and starts two
repository Nginx containers (depot-apt for .deb/.apk, depot-rpm for
.rpm) plus one backend and one frontend. If you only need one format, change
REPO_FORMAT and remove the unused repository service from docker-compose.yaml
(or leave it running — it's harmless, just unused).
Standalone RPM-only stack
docker-compose.rpm.yml is a separate, self-contained stack with its own
PostgreSQL database, network, and container names, pre-configured with
REPO_FORMAT=rpm. Run it with docker compose -f docker-compose.rpm.yml up -d
— see Production Deployment for when to use it.
Maven, PyPI and npm are always on
REPO_FORMAT only controls the OS-package side (.deb/.rpm/.apk).
A Maven repository, a PyPI index and an npm registry are available on every
Repod instance regardless of this setting, going through the exact same
scan-before-publish pipeline. The Docker/OCI registry is an optional overlay
(docker-compose.oci.yml, see Container registry). See
Package formats and
Client setup once you've finished this guide.
Step 3 — Start the stack¶
By default (REPO_FORMAT=all), six containers start:
| Container | Role | Default port |
|---|---|---|
repod-db |
PostgreSQL 16 — application database | (internal) |
depot-apt |
Nginx — serves .deb (APT) and .apk (Alpine) repositories |
:80 |
depot-rpm |
Nginx — serves .rpm repositories (YUM/DNF/Zypper) |
:8080 |
backend-api |
FastAPI — REST API + security pipeline | :8000 |
frontend-ui |
React — web interface | :3003 |
depot-cache |
Nginx — optional upstream cache | :8090 |
Watch the startup logs:
Wait for:
First startup is slower
ClamAV loads its signature database (~800 MB) on first start. This takes
20–60 seconds depending on disk speed. Subsequent starts are faster because
the database is cached in the repos/clamav-db/ volume. PostgreSQL also
runs its own first-time initialization in the postgres_data volume.
Step 4 — Create the admin account¶
If you pre-provisioned ADMIN_USERNAME/ADMIN_PASSWORD_HASH in Step 1, skip
to Step 5 and sign in with those credentials.
Otherwise, create the first admin once. The web interface offers a setup wizard on first access (Step 5), or you can call the API.
The wizard asks for the setup token. Read it in the backend log:
(If you set SETUP_TOKEN yourself in Step 1, use your own value.) From the
command line:
curl -X POST http://localhost:8000/api/v1/setup/ \
-H "Content-Type: application/json" \
-H "X-Setup-Token: the-token-from-the-log" \
-d '{"admin_username":"admin","admin_password":"YourPassword1!"}'
The answer holds a ready-to-use login token. POST /api/v1/setup returns 409
once an admin already exists: the wizard can only run once.
Step 5 — Open the interface¶
Navigate to http://localhost:3003.
On a new installation the page shows the setup wizard if you have not created an admin yet: fill in the account and the setup token. Otherwise, sign in with the username and password you just created.
Change the password immediately if it was a placeholder
Open Administration → Utilisateurs, click the key icon on the admin row and set a new password. The full walkthrough is in Your first login.
Step 6 — Generate a GPG signing key¶
Repository indexes must be GPG-signed. Without a signing key, packages cannot be published (for APT/RPM) or signed (for APK).
- Open Administration → Paramètres, section Clé GPG du dépôt
- Click Générer une nouvelle clé
- Copy the public key fingerprint — you will need it when configuring client machines
No interactive terminal required
Key generation uses --pinentry-mode loopback. The GPG key is stored in
the shared /repos/gnupg volume and never leaves the server.
Step 7 — Initialize distributions¶
All distributions for the formats enabled by REPO_FORMAT are initialized
automatically at first startup by auto_init_distributions(). No manual
action is required.
To re-initialize after a configuration corruption:
TOKEN=$(curl -s -X POST http://localhost:8000/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"YourPassword"}' \
| jq -r .access_token)
curl -X POST http://localhost:8000/api/v1/distributions/init \
-H "Authorization: Bearer $TOKEN"
See Supported distributions below for the full list.
Step 8 — Upload your first package¶
- Go to Déposer in the sidebar
- Drag and drop your
.deb,.rpm, or.apkfile - Select a distribution (e.g.
jammy,almalinux9,alpine3.20) - Click Déposer
The pipeline runs in real time:
# Authenticate
TOKEN=$(curl -s -X POST http://localhost:8000/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"YourPassword"}' \
| jq -r .access_token)
# Upload a .deb (standard JSON response)
curl -X POST http://localhost:8000/api/v1/upload/ \
-H "Authorization: Bearer $TOKEN" \
-F "file=@mypackage_1.0.0_amd64.deb" \
-F "distribution=jammy"
# Upload (streaming Server-Sent Events — same endpoint for all formats)
curl -X POST http://localhost:8000/api/v1/upload/stream \
-H "Authorization: Bearer $TOKEN" \
-F "[email protected]_64.rpm" \
-F "distribution=almalinux9"
CVE review queue
If the CVE scan finds high-severity vulnerabilities matching your policy,
the package status becomes pending_review. It is stored but not published
until a maintainer or an admin decides on it in Sécurité → Décisions CVE.
Step 9 — Configure a client machine¶
# 1. Import the repository GPG public key
curl -fsSL http://YOUR_HOST:80/repos/dists/depot.gpg \
| gpg --dearmor \
| sudo tee /etc/apt/trusted.gpg.d/repod.gpg > /dev/null
# 2. Add the APT source
echo "deb http://YOUR_HOST:80/repos jammy main" \
| sudo tee /etc/apt/sources.list.d/repod.list
# 3. Update and install
sudo apt update
sudo apt install mypackage
# 1. Create the repo file. Repod signs the repository metadata
# (repo_gpgcheck=1); the .rpm files keep their publisher's signature,
# so gpgkey also lists the distribution's own key.
sudo tee /etc/yum.repos.d/repod.repo << 'EOF'
[repod]
name=Repod Private Repository
baseurl=http://YOUR_HOST:8080/almalinux9/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://YOUR_HOST:80/repos/dists/depot.gpg
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9
repo_gpgcheck=1
EOF
# 2. Install
sudo dnf install mypackage
Replace YOUR_HOST with the hostname or IP of the machine running Repod, and
the port with the one mapped to depot-apt (:80 by default) or depot-rpm
(:8080 by default).
Supported distributions¶
| Codename | Distribution |
|---|---|
jammy |
Ubuntu 22.04 LTS |
noble |
Ubuntu 24.04 LTS |
focal |
Ubuntu 20.04 LTS |
bookworm |
Debian 12 |
| Codename | Distribution |
|---|---|
almalinux8 |
AlmaLinux 8 |
almalinux9 |
AlmaLinux 9 |
rocky8 |
Rocky Linux 8 |
rocky9 |
Rocky Linux 9 |
centos-stream9 |
CentOS Stream 9 |
oraclelinux8 |
Oracle Linux 8 |
fedora |
Fedora (latest) |
opensuse-leap-15.6 |
openSUSE Leap 15.6 |
opensuse-tumbleweed |
openSUSE Tumbleweed |
| Codename | Distribution |
|---|---|
alpine3.18 |
Alpine Linux 3.18 |
alpine3.19 |
Alpine Linux 3.19 |
alpine3.20 |
Alpine Linux 3.20 |
alpine3.21 |
Alpine Linux 3.21 |
What's next¶
-
Understand the 6-step validation pipeline that every package passes through.
-
Publish Maven artifacts, PyPI packages, npm packages, and container images alongside your
.deb/.rpm/.apkrepositories. -
Expose Repod over HTTPS with Nginx, Traefik, or Caddy.
-
Publish packages automatically from GitHub Actions or GitLab CI.
-
Full production checklist with firewall rules, backups, and hardening.