Packeton on Ubuntu 24.04 on Azure User Guide
Overview
Packeton is a free, open source, self hosted private Composer package repository for PHP, your own private Packagist. It hosts private Composer packages, proxies and mirrors packages from public sources, integrates version control repositories over git, subversion and mercurial, and serves package metadata and zipball archives to composer clients, with per user API tokens and fine grained permissions controlling who can read and publish. The cloudimg image delivers Packeton fully installed and configured on Ubuntu 24.04 as a Symfony application on PHP 8.3, backed by a local PostgreSQL database and a local Redis instance, so a complete private package repository is serving within minutes of launch, with your private code staying on infrastructure you control. Backed by 24/7 cloudimg support.
Packeton is licensed under the MIT License. All product and company names are trademarks or registered trademarks of their respective holders. This image repackages the upstream open source release with cloudimg's provisioning and support.
What is included:
- Packeton 2.7.0 (MIT), served from
/var/www/packeton - PHP 8.3 (
php8.3-fpm) + nginx, with the web UI and Composer repository endpoints on port 80 - A local PostgreSQL 16 database and a local Redis instance, both bound to localhost only
- A background worker (
packeton-worker.service) and a one minute cron timer that keep repository metadata and package updates current - A per-VM administrator password, a fresh application secret and a rotated database password, all generated on first boot and written to a root-only file, so no default or shared credentials ship in the image
postgresql,redis-server,php8.3-fpm,nginxandpacketon-workeras systemd units, enabled and active- 24/7 cloudimg support

Prerequisites
An active Azure subscription, an SSH key pair, and a VNet plus subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point; scale up for larger teams or heavy mirroring. NSG inbound: allow 22/tcp from your management network and 80/tcp (HTTP) from your developers. Add 443/tcp if you enable HTTPS.
Step 1 — Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Packeton by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size; under Administrator account choose SSH public key and paste your key; under Inbound port rules allow SSH (22) and HTTP (80). Then Review + create and Create.
Step 2 — Deploy from the Azure CLI
az vm create \
--resource-group <your-rg> \
--name packeton \
--image <marketplace-image-urn> \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku Standard
Open HTTP to reach the web UI and Composer endpoints:
az vm open-port --resource-group <your-rg> --name packeton --port 80 --priority 900
Step 3 — Connect to your VM
ssh azureuser@<vm-public-ip>
Step 4 — Confirm the Packeton stack is running
Packeton is served by nginx on port 80, in front of php8.3-fpm, and backed by a local PostgreSQL database and a local Redis instance. Both PostgreSQL and Redis are bound to 127.0.0.1, so there is no database or cache port exposed to the network. A background worker keeps repository metadata current.
for u in postgresql redis-server php8.3-fpm nginx packeton-worker; do
printf '%-22s %s\n' "$u:" "$(systemctl is-active $u)"
done
All five units report active, and only nginx listens on a public port:

Step 5 — Retrieve the first-boot administrator credentials
On the first boot of your instance, a one shot service generates a fresh application secret, rotates the PostgreSQL password, builds the database schema and sets a fresh administrator password, writing the credentials to a root-only file. Read them with:
sudo cat /root/packeton-credentials.txt
The file is mode 0600 and owned by root, and the administrator password is unique to this VM:

Step 6 — Sign in to the web UI
Browse to http://<vm-public-ip>/login and sign in as the generated administrator (username admin). Packeton presents its Packagist-style package browser:

Step 7 — Host a private Composer package
Choose Submit to add a package from a version control repository. Packeton supports git, subversion and mercurial: paste a repository URL, click Check, and Packeton reads the package name from the composer.json on the default branch and begins tracking it.

Step 8 — Issue an API token for composer
Each user has API tokens on the profile page. A token authenticates composer against your private repository over HTTP basic auth (username:token).

The repository serves standard Composer v2 metadata. You can confirm it from the VM using the administrator's API token:
TOKEN=$(sudo -u postgres psql -tAc "SELECT apitoken FROM fos_user WHERE username='admin'" packeton | tr -d ' ')
curl -s -o /dev/null -w 'GET /api/healthz: HTTP %{http_code}\n' http://127.0.0.1/api/healthz
curl -s -u "admin:$TOKEN" http://127.0.0.1/packages.json | head -c 400; echo
Packeton returns the Composer repository descriptor (metadata URL, mirrors and dist URLs):

To consume the repository from a developer workstation, add it to your project composer.json and provide the token when prompted:
composer config repositories.packeton composer http://<vm-public-ip>/
composer require your-vendor/your-package
Step 9 — Version and stack
The image ships Packeton 2.7.0 on PHP 8.3, PostgreSQL 16, Redis 7 and nginx, with the first-boot secret-rotation service enabled:
echo -n 'Packeton version: '; grep -oE '"version": *"[0-9.]+"' /var/www/packeton/composer.json | head -1 | grep -oE '[0-9.]+' || echo 2.7.0
php -v | head -1
sudo -u postgres psql -tAc 'SHOW server_version'

Step 10 — The first-boot security model
No shared or default credentials ship in the image. On first boot, packeton-firstboot.service:
- generates a fresh per-VM
APP_SECRET, - rotates the PostgreSQL
packetonrole password to a fresh per-VM value and writes it into/var/www/packeton/.env.local, - builds the database schema,
- sets a fresh per-VM administrator password, and
- writes the credentials to
/root/packeton-credentials.txt(root only,0600).
You can confirm first boot completed and the credentials are protected:
sudo systemctl is-active packeton-firstboot.service
sudo stat -c '%a %U:%G' /root/packeton-credentials.txt
Step 11 — Enable HTTPS with a custom domain (recommended)
Point a DNS A record at your VM's public IP, then install a Let's Encrypt certificate with certbot. Open 443/tcp in your NSG first.
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d packages.your-domain.com
Certbot obtains the certificate and reconfigures nginx to serve Packeton over HTTPS and redirect HTTP to HTTPS. Packeton auto-detects the request host, so no application configuration change is needed.
Step 12 — Maintenance
- Change the administrator password from the web UI (profile → change password), or from the CLI:
text
sudo -u www-data php /var/www/packeton/bin/console packagist:user:manager admin --password
- Add more users from Settings → Users in the web UI, or with
packagist:user:manager <username> --email=<email> --password. - Security updates are applied automatically by Ubuntu's unattended-upgrades. The Packeton application, PHP, PostgreSQL, Redis and nginx are managed by systemd and restart on failure.
- Back up the PostgreSQL
packetondatabase and the stored zipballs under/var/www/packeton/var/zipball.
Support
cloudimg provides 24/7 support for this image by email (support@cloudimg.co.uk) and live chat, covering deployment, first-boot credential retrieval, VCS integration, API tokens, mirroring, HTTPS and custom domains, upgrades and troubleshooting. For billing or subscription changes, contact support@cloudimg.co.uk.