Deployer for TYPO3 Deployment
Deployer is a deployment tool written in PHP. Internally Deployer uses Rsync.
Deployer can be used to create recipes that automate execution of the deployment steps.
Deployer recipes for TYPO3
SourceBroker's Deployer - Extended TYPO3
This recipe extends Deployer's capabilities to cover TYPO3 projects. It includes advanced features like database and file synchronization, multi-environment support, and integration with the TYPO3 Console.
Helhum Deployer recipe
This TYPO3 Deployer Recipe from Helhum can be forked and adapted to your needs.
GitLab template Deployer recipe for TYPO3
If you have created your project using the official GitLab template, it will already contain a Deployer template.
You can configure Deployer by editing the YAML configuration file
deploy.
in the project root. The Deployer recipe is found in
packages/
.
The project also contains a .gitlab-
for automated deployment.
To start using Deployer, deploy.
should look like this:
# Deployer Docs https://deployer.org/docs/7.x/basics
import:
- packages/site-distribution/Configuration/DeployerRsync.php
config:
repository: '.' # Stays as-is if deploying the current project
writable_mode: 'chmod' # Usually fine unless you have ACL or other needs
bin/php: 'php' # Adjust if PHP is not available as 'php' on remote
bin/composer: '{{bin/php}} /usr/bin/composer' # Adjust path if composer lives elsewhere
hosts:
staging:
hostname: staging.example.com # Replace with your staging server hostname or IP
remote_user: deploy # Replace with your SSH user
deploy_path: /var/www/staging-project # Replace with target directory on remote server
rsync_src: './' # Usually './' is correct (deploys the current dir)
ssh_multiplexing: false # Usually fine as-is
php_version: '8.2' # Just metadata, but can be used in your recipe
production:
hostname: www.example.com # Replace with your production server hostname or IP
remote_user: deploy # Replace with your SSH user
deploy_path: /var/www/production-project # Replace with target directory on remote server
rsync_src: './' # Usually './' is correct (deploys the current dir)
ssh_multiplexing: false # Usually fine as-is
php_version: '8.2' # Just metadata, but can be used in your recipe
Official Deployer recipe for TYPO3 <= 11.5
Attention
This recipe can only be used for TYPO3 versions up to 11.5.
The Deployer documentation describes an official TYPO3 (classic mode) Deployer recipe.
However, this recipe is only correct for TYPO3 projects up to version 11.5, using the classic directory structure. For newer TYPO3 versions with Composer-based setups, this recipe requires manual changes.
Manual deployment from DDEV
For manual deployment from DDEV, authenticate your server’s SSH key, for example
with ddev auth ssh
(see the
DDEV documentation: SSH Into Containers).
Install Deployer in your project using Composer:
ddev composer require --dev deployer/deployer
List available Deployer tasks:
ddev exec vendor/bin/dep list
Choose (and make any necessary changes to) a suitable deployer recipe for your project. Then deploy to your staging server:
ddev exec vendor/bin/dep deploy -vvv staging
This assumes you have defined a staging server in your deploy.
configuration.
Manual deployment outside of DDEV
Deployer can be run on your local machine or in other environments (Docker or native PHP setups) without using DDEV.
First, install Deployer globally using Composer:
composer global require deployer/deployer
Make sure the global Composer vendor/
directory is in your system’s PATH
.
Then list available tasks with:
dep list
And deploy to a configured environment, for example:
dep deploy -vvv staging
Refer to your deploy.
or deploy.
for environment and
task definitions.
Automatic deployment via CI/CD
Deployer can be integrated into automated deployment pipelines, such as GitLab CI/CD, GitHub Actions, and other CI systems.
For example, the official TYPO3 GitLab template
includes a .gitlab-
file with deployment stages.
You can configure these stages for automated deployment each time code is pushed to your repository.
Deployer's SSH requirements
Deployer will connect to your servers via SSH. You must ensure that your deployment user has passwordless SSH access to the target server.
You can test SSH access with:
ssh <your-ssh-user>@<your-server>
If you can connect without entering a password, SSH is correctly set up.
Typically your SSH key is managed via your local SSH agent, for example:
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
You may also need to add your server to the known hosts file:
ssh-keyscan <your-server> >> ~/.ssh/known_hosts