PHPackages                             jsefton/laravel-remote-deploy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. jsefton/laravel-remote-deploy

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

jsefton/laravel-remote-deploy
=============================

Deploy Laravel sites to a remote server directly from Artisan

249PHP

Since Feb 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jsefton/laravel-remote-deploy)[ Packagist](https://packagist.org/packages/jsefton/laravel-remote-deploy)[ RSS](/packages/jsefton-laravel-remote-deploy/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Remote Deploy
---------------------

[](#laravel-remote-deploy)

This package allows you to define a remote server and directory that you can then push your changes to with a simple command directly from your local.

It allows you to create groups of commands into tasks so they can easily be ran on a remote server. This can be used for deployment, provisioning, health checks and much more.

### Installation

[](#installation)

You will need composer to install this package (get composer). Then run:

```
composer require jsefton/laravel-remote-deploy
```

#### Register Service Provider

[](#register-service-provider)

Add the below into your `config/app.php` within `providers` array

```
Jsefton\LaravelRemoteDeploy\LaravelRemoteDeployProvider::class

```

After installation you will need to publish the config file which will allow you to specify your own list of environments. To do this run:

```
php artisan vendor:publish --tag=laravel-remote-deploy
```

This will create the file `config/laravel-remote-deploy.php` where you can configure your list of environments.

### Configuration

[](#configuration)

Inside `config/laravel-remote-deploy.php` you will have 2 sets of configurations.

This includes `servers`, which is an array of all the possible connections you will want to create and connect too.

This also includes a set of `tasks` that you can then select from to run. It can contain multiple commands and feature file uploads. Below is an example config for setup and deploy:

```
'setup' => [
    'directory' => '/',
    'commands' => [
        "ssh-keygen -f ~/.ssh/id_rsa -t rsa -N '' " => [
            'confirm' => 'Do you want to create an ssh key'
        ],
        'cat ~/.ssh/id_rsa.pub',
        'cd /var/www/html',
        'git clone' => [
            'confirm' => 'Have you installed your ssh key with the repository yet?',
            'prompt' => 'Please enter a url for the git repository'
        ]
    ]
],
'deploy' => [
    'directory' => '/var/www/html',
    'commands' => [
        'cd' => [
            'prompt' => 'Please enter a folder name of the site'
        ],
        'git pull origin master'
    ]
]
```

### Usage

[](#usage)

When in the CLI run the below to execute the command and begin the prompts

```
php artisan remote:tasks
```

To clear out any stored credentials in temporary files run:

```
php artisan remote:clear
```

### TODO

[](#todo)

- Include Migrate Environments package to allow easy database updating with deploy
- Add ability to run same task on multiple servers

### Provision task

[](#provision-task)

THIS IS CURRENTLY IN DEVELOPMENT

By adding the below in your tasks config it will allow you to provision a basic LEMP stack

```
'reboot' => [
    'directory' => '/',
    'commands' => [
        'reboot'
    ]
],
'provision' => [
    'directory' => '/',
    'commands' => [
        'sudo apt-get update',
        'sudo apt-get install nginx -y',
        'sudo apt-get install mysql-server -y',
        'sudo apt-get install php-fpm php-mysql -y'
    ],
    'files' => [
        [
            'path' => '/etc/nginx/sites-available/default',
            'content' => 'server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;

server_name server_domain_or_IP;

location / {
    try_files $uri $uri/ =404;
}

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}

location ~ /\.ht {
    deny all;
}
}',
            'after' => [
                'sudo nginx -t',
                'sudo systemctl reload nginx'
            ]
        ]
    ]
]
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/41b413127c7499a63bcb5c5ae903bd8961ba29300b6ccbda873e0c4bf06d0a02?d=identicon)[jsefton](/maintainers/jsefton)

---

Top Contributors

[![jsefton](https://avatars.githubusercontent.com/u/4114741?v=4)](https://github.com/jsefton "jsefton (19 commits)")

### Embed Badge

![Health badge](/badges/jsefton-laravel-remote-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/jsefton-laravel-remote-deploy/health.svg)](https://phpackages.com/packages/jsefton-laravel-remote-deploy)
```

###  Alternatives

[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

192739.0k3](/packages/ryoluo-sail-ssl)[sarfraznawaz2005/servermonitor

Laravel package to periodically monitor the health of your server and website.

19613.5k1](/packages/sarfraznawaz2005-servermonitor)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4676.9k](/packages/tiamo-phpas2)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

106.5k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
