ConfigsMay 19, 2026·2 min read

Deployer — Zero-Downtime PHP Deployment Tool

Deployer is a deployment tool for PHP projects that provides zero-downtime atomic deployments with built-in recipes for Laravel, Symfony, and other popular frameworks.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Deployer Overview
Universal CLI install command
npx tokrepo install f44a6cc3-53c0-11f1-9bc6-00163e2b0d79

Introduction

Deployer automates PHP application deployments over SSH with atomic symlink releases. It eliminates downtime by preparing new releases in a separate directory and switching a symlink only after all tasks succeed.

What Deployer Does

  • Executes zero-downtime deployments via atomic symlink switching
  • Provides built-in recipes for Laravel, Symfony, WordPress, and more
  • Manages multiple servers and deployment stages
  • Supports parallel deployment to multiple hosts simultaneously
  • Rolls back to previous releases on failure automatically

Architecture Overview

Deployer connects to remote servers via SSH (using phpseclib or native SSH). Each deployment creates a new release directory, runs build tasks (composer install, asset compilation), and atomically switches the current symlink. A configurable number of past releases are kept for rollback. Recipes are PHP files defining tasks, and custom tasks can hook into any stage of the pipeline.

Self-Hosting & Configuration

  • Install globally with composer global require deployer/deployer or per-project
  • Initialize config with dep init which generates deploy.php
  • Define hosts with SSH credentials or agent forwarding
  • Set shared files and directories that persist across releases
  • Configure the number of releases to keep with set('keep_releases', 5)

Key Features

  • Atomic deployments with instant symlink switching
  • Built-in recipes for 20+ PHP frameworks and CMSes
  • Parallel execution across multiple servers
  • Automatic rollback on task failure
  • Provisioning support for setting up fresh servers

Comparison with Similar Tools

  • Capistrano — Ruby-based deployer; Deployer offers the same model in PHP
  • Envoyer — Laravel-hosted deployment SaaS; Deployer is open source and self-managed
  • Kamal — Docker-based deployment; Deployer works with traditional PHP hosting without containers
  • Ansible — general infrastructure automation; Deployer is specialized for PHP deployment workflows
  • GitHub Actions — CI/CD platform; Deployer handles the deployment stage specifically with rollback support

FAQ

Q: Does Deployer require root access on the server? A: No. It works with a regular SSH user that has write access to the deployment directory.

Q: Can Deployer run database migrations during deployment? A: Yes. You can add migration commands as tasks in the deployment recipe.

Q: How does rollback work? A: Deployer keeps previous releases on disk and switches the current symlink back to the last working release with dep rollback.

Q: Does Deployer support Docker-based deployments? A: Deployer is designed for traditional server deployments but can run Docker commands as custom tasks.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets