Install and Run

There is an official packeton image available at which can be used with the docker-compose file, see docker installation



  • PHP 8.1+
  • Redis for some functionality (favorites, download statistics, worker queue).
  • git/svn/hg depending on which repositories you want to support.
  • Supervisor to run a background job worker
  • (optional) MySQL or PostgresSQL for the main data store, default SQLite
  1. Clone the repository
git clone /var/www/packeton/
cd /var/www/packeton/
  1. Install dependencies composer install
  2. Create .env.local and copy needed environment variables into it. See Configuration
  3. IMPORTANT! Don't forget change APP_SECRET
  4. Run bin/console doctrine:schema:update --force --complete to setup the DB
  5. Create admin user via console.
php bin/console packagist:user:manager username --password=123456 --admin 
  1. Setup nginx or any webserver, for example nginx config looks like.
server {
    listen *:443 ssl http2;
    root /var/www/packeton/public;

    ssl_certificate /etc/nginx/ssl/example.crt;
    ssl_certificate_key /etc/nginx/ssl/example.key;


    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_session_cache  builtin:1000  shared:SSL:10m;
    ssl_session_timeout  5m;

    rewrite ^/index\.php/?(.+)$ /$1 permanent;
    try_files $uri @rewriteapp;

    location @rewriteapp {
        rewrite ^(.*)$ /index.php/$1 last;

    access_log off;

    location ~ ^/index\.php(/|$) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
  1. Change cache permission to made it accessible for web server.
chown www-data:www-data -R var/
  1. If you get a 500 error in index page, please check your logs var/log/prod.log or/and webserver log and fix permissions, database config, redis etc.

  2. Enable cron tabs and background jobs.

Enable crontab crontab -e -u www-data

* * * * * /var/www/packeton/bin/console --env=prod okvpn:cron >> /dev/null

Setup Supervisor to run worker

sudo apt -y --no-install-recommends install supervisor

Create a new supervisor configuration.

sudo vim /etc/supervisor/conf.d/packagist.conf

Add the following lines to the file.

environment =
command=/var/www/packeton/bin/console packagist:run-workers


Create a file .env.local and change next options

  • APP_SECRET - Must be static, used for encrypt SSH keys in database.
  • APP_COMPOSER_HOME - composer home, default /var/www/packeton/var/.composer/
  • DATABASE_URL - Database DSN, default sqlite:///%kernel.project_dir%/var/app.db

Example for postgres postgresql://app:pass@ Example for mysql mysql://app:!ChangeMe!@

# .env.local

  • PACKAGIST_DIST_PATH - Default %kernel.project_dir%/var/zipball, path to storage zipped artifacts
  • REDIS_URL - Redis DB, default redis://localhost
  • PACKAGIST_DIST_HOST - Hostname, (auto) default use the current host header in the request.
  • TRUSTED_PROXIES - Ips for Reverse Proxy. See Symfony docs
  • PUBLIC_ACCESS - Allow anonymous users access to read packages metadata, default: false
  • MAILER_DSN - Mailer for reset password, default disabled
  • MAILER_FROM - Mailer from

Ssh key access and composer oauth token.

Packagist uses the composer config and global ssh-key to get read access to your repositories, so the supervisor worker packagist:run-workers and web-server must run under the user, that have ssh key or composer config that gives it read (clone) access to your git/svn/hg repositories. For example, if your application runs under www-data and have home directory /var/www, directory structure must be like this.

    └── /var/www/
        └── .ssh/ # ssh keys directory
            ├── config
            ├── id_rsa # main ssh key
            ├── private_key_2 # additional ssh key
            └── private_key_3
        └── packeton/ # project dir
            ├── config APP_COMPOSER_HOME="%kernel.project_dir%/var/.composer"
            ├── public 
            ├── src 
            └── var
                ├── cache
                └── .composer # APP_COMPOSER_HOME="%kernel.project_dir%/var/.composer"

By default, composer configuration load from COMPOSER_HOME and it placed at path %kernel.project_dir%/var/.composer. if you want to setup authentication in auth.json need to place this file to composer home, i e. /var/www/packeton/var/.composer/ See Authentication in auth.json

# Example /var/www/packeton/var/.composer/auth.json
  "http-basic": {
    "": {
      "username": "kastus",
      "password": "489df705a503ac0173256ce01f"

Example ssh config for multiple SSH Keys for different github account/repos, see here for details

# ~/.ssh/config - example

Host github-oroinc
	User git
	IdentityFile /var/www/.ssh/private_key_2
	IdentitiesOnly yes

Host github-org2
	User git
	IdentityFile /var/www/.ssh/private_key_3
	IdentitiesOnly yes

Allow connections to http.

You can create config.json in the composer home (see APP_COMPOSER_HOME env var) or add this option in the UI credentials form.

    "secure-http": false