PHPackages                             aschmelyun/fleet - 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. aschmelyun/fleet

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

aschmelyun/fleet
================

Run multiple Laravel Sail websites on your local environment

v1.1.1(1y ago)33269.5k—6.3%17[11 issues](https://github.com/aschmelyun/fleet/issues)[4 PRs](https://github.com/aschmelyun/fleet/pulls)MITPHPPHP ^8.1

Since Jan 15Pushed 1y ago5 watchersCompare

[ Source](https://github.com/aschmelyun/fleet)[ Packagist](https://packagist.org/packages/aschmelyun/fleet)[ Docs](https://github.com/aschmelyun/fleet)[ RSS](/packages/aschmelyun-fleet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (13)Versions (7)Used By (0)

Fleet
=====

[](#fleet)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fcebe8d2972401086d546c08eef0da5ffe82b37f67a2789e69446df3bc1ff31b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617363686d656c79756e2f666c6565742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aschmelyun/fleet)[![Total Downloads](https://camo.githubusercontent.com/41761e462c03661216f5fc1bd592ea8439abe78fcfa5287b71144c4df27e1feb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617363686d656c79756e2f666c6565742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aschmelyun/fleet)

Easily run multiple Laravel Sail applications at the same time locally with custom domain names.

> Note: This is still new and may contain bugs, if you see something weird please [create an issue](https://github.com/aschmelyun/fleet/issues/new)

- [Installation](#installation)
- [Getting Started](#getting-started)
- [Local SSL](#local-ssl)
- [Port Conflicts](#port-conflicts)
- [Additional Usage](#additional-usage)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require aschmelyun/fleet --dev
```

Getting Started
---------------

[](#getting-started)

Navigate to the root directory of your Laravel application, and stop any Sail instance if it's running. Then, use the following command to add Fleet support to your app:

```
php artisan fleet:add
```

During setup you'll be prompted to enter in a domain name. Alternatively, you can pass it in through the command line:

```
php artisan fleet:add my-app.localhost
```

After the setup finishes, you can start up Sail just like normal:

```
./vendor/bin/sail up
```

And your site will be available at the domain you provided!

> Note: If you chose a domain that doesn't end in `.localhost`, you will need to add an entry to your hosts file to direct traffic to 127.0.0.1

Local SSL
---------

[](#local-ssl)

Fleet supports local SSL on your custom domains through the power of [mkcert](https://mkcert.dev). After you've installed it on your machine, you can use the `--ssl` option when using the `fleet:add` command to enable it for your application.

```
php artisan fleet:add my-app.localhost --ssl
```

A local certificate will be generated and stored in `~/.config/mkcert/certs`. After spinning up your site with Sail, your specified domain will have https enabled.

Port Conflicts
--------------

[](#port-conflicts)

When spinning up multiple Laravel Sail appliactions, it's likely you'll encounter an error about port conflicts between Docker containers. This is because each service has a port mapped to your local machine, and by default, they're the same across your applications.

In order to fix this, add different forwarded port numbers to each Laravel application using the `.env` file. For example:

- App #1

```
FORWARD_DB_PORT=3306
FORWARD_REDIS_PORT=6379
```

- App #2

```
FORWARD_DB_PORT=4306
FORWARD_REDIS_PORT=7379
```

This way, both applications can be spun up using Fleet and Sail, and their respective services' ports won't conflict.

Additional Usage
----------------

[](#additional-usage)

By default, whenever you use `fleet:add`, a Docker network and container are both started to handle the traffic from your local domain name(s).

You can start this manually by using:

```
php artisan fleet:start
```

If you would like to remove Fleet support from an application and return it back to the default Docker setup, you can run:

```
php artisan fleet:remove
```

To stop and remove all Fleet containers and networks that are currently running on your system, you can use the command:

```
php artisan fleet:stop
```

Why use this?
-------------

[](#why-use-this)

[Laravel Sail](https://laravel.com/docs/sail) uses Docker and Docker Compose to spin up containers that create a local development environment for your application.

By default, the containers are bound to the `:80` port of your local machine. Spinning up a second application results in a failure due to port conflicts, but you can always adjust it so that the second app is available at something like `:8081`.

This can have some unintended consequences though, and can get messy juggling communication between two different applications using port numbers.

Instead, Fleet provides a small set of commands that alter your `docker-compose.yml` file to provide support for [Traefik](https://hub.docker.com/_/traefik), a reverse proxy that runs on a Docker container.

When you add a site to Fleet, a network and a few labels are added to the Docker Compose entry for your application, and a main Traefik container is spun up to handle all local web traffic incoming to the `:80` port.

This configuration allows two or more Laravel Sail applications configured to different domains to resolve to their respective running containers.

For a more in-depth look at how this all ties together, check out [this video](https://www.youtube.com/watch?v=mZbLvGQqEvY) that I published on using Traefik with Docker Compose.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what's recently changed.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.3% 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.

###  Release Activity

Cadence

Every ~126 days

Total

5

Last Release

715d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89d40a36efd670c752d8d6e488192d9ae78b9ff49503cf6b671f46d17cb67768?d=identicon)[aschmelyun](/maintainers/aschmelyun)

---

Top Contributors

[![aschmelyun](https://avatars.githubusercontent.com/u/3395980?v=4)](https://github.com/aschmelyun "aschmelyun (21 commits)")[![DvDty](https://avatars.githubusercontent.com/u/18031220?v=4)](https://github.com/DvDty "DvDty (2 commits)")

---

Tags

dockerlaravellaraveldockersailfleettraefikaschmelyun

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/aschmelyun-fleet/health.svg)

```
[![Health](https://phpackages.com/badges/aschmelyun-fleet/health.svg)](https://phpackages.com/packages/aschmelyun-fleet)
```

###  Alternatives

[ryoluo/sail-ssl

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

188672.6k2](/packages/ryoluo-sail-ssl)[yoelpc4/laravel-sail-preset

Laravel Sail runtimes &amp; docker-compose.yml preset.

1429.2k](/packages/yoelpc4-laravel-sail-preset)

PHPackages © 2026

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