Deployment guide

Packeton

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, and integrates version control repositories over git, subversion and mercurial. It 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 SecureAnyCloud image delivers Packeton fully installed and configured on Ubuntu 24.04 as a Symfony application on PHP 8.3. A complete private package repository is serving within minutes of launch, and your private code stays on infrastructure you control.

What you get:

  • Packeton 2.7.0 (MIT), served from /var/www/packeton
  • PHP 8.3 (php8.3-fpm) and 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, nginx and packeton-worker as systemd units, enabled and active
  • 24/7 SecureAnyCloud 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 SecureAnyCloud's provisioning and support.

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet and subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting size. Choose a larger size for bigger teams or heavy mirroring.

Configure the NSG to allow inbound 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 SecureAnyCloud, and select Create.

On the Basics tab, 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 select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:packeton-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name packeton \
  --image sac1647283583153:packeton-ubuntu-24-04:default:latest \
  --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

Connect over SSH:

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the Packeton stack is running

nginx serves Packeton on port 80, in front of php8.3-fpm. A local PostgreSQL database and a local Redis instance back it. Both are bound to 127.0.0.1, so no database or cache port is 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 and rotates the PostgreSQL password. It then builds the database schema, sets a fresh administrator password, and writes 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. 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 and select Check. 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. Confirm this from the VM with 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, which includes the 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 - Check the 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 - Review the first-boot security model

No shared or default credentials ship in the image. On first boot, packeton-firstboot.service does the following:

  • Generates a fresh per-VM APP_SECRET.
  • Rotates the PostgreSQL packeton role 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.
  • Writes the credentials to /root/packeton-credentials.txt (root only, 0600).

Confirm that 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 address. Open 443/tcp in your NSG, then install a Let's Encrypt certificate with certbot:

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 detects the request host automatically, so no application configuration change is needed.

Step 12 - Maintenance

  • Change the administrator password in the web UI (profile, then change password), or from the CLI:

    sudo -u www-data php /var/www/packeton/bin/console packagist:user:manager admin --password

  • Add more users in the web UI under Settings, then Users, 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 packeton database and the stored zipballs under /var/www/packeton/var/zipball.

Support

SecureAnyCloud provides 24/7 support for this image by email (sales@secureanycloud.com) and live chat. Support covers deployment, first-boot credential retrieval, VCS integration, API tokens, mirroring, HTTPS and custom domains, upgrades and troubleshooting.

For billing or subscription changes, contact sales@secureanycloud.com.

Deploy on Azure

Launch Packeton on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure