PHPackages                             cjmellor/saber - 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. [Caching](/categories/caching)
4. /
5. cjmellor/saber

AbandonedLibrary[Caching](/categories/caching)

cjmellor/saber
==============

Build a custom LEMP stack running off Docker containers

1.1.3(6y ago)0331MITPHPPHP ^7.1.3

Since Jul 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/cjmellor/saber)[ Packagist](https://packagist.org/packages/cjmellor/saber)[ RSS](/packages/cjmellor-saber/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (14)Used By (0)

[![StyleCI](https://camo.githubusercontent.com/06810a9ef65b9e38b7cf8a37ae13d5c7ec9bd83e23284228ab9a84f272089d94/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3137343234303034322f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/174240042)

Hello 👋

Saber is a tool that allows you to set-up a fully functioning LEMP stack using Docker 🐳

Just a single command to run and you're up and running!

```
saber new
```

Each part of the LEMP stack is constructed in a separate container.

- NGINX
- PHP
- MySQL / MariaDB

When the application is set-up, you can access your new app by visiting it in your browser at `http://your-site.test`

A self-signed certificate can be assigned to the stack and uses the latest TLS security features.

Table of Contents
=================

[](#table-of-contents)

- [Prerequisites](#prerequisites)
    - [Configuring DNSMasq](#configuring-dnsmasq)
- [Why Saber?](#why-saber)
- [Installation](#installation)
    - [Available installation options](#available-installation-options)
- [Create an App](#create-an-app)
    - [Database Management](#database-management)
    - [HTTPS](#https)
    - [Config](#config)
    - [H5BP](#h5bp)
- [Secure an App](#secure-an-app)
- [Remove an App](#remove-an-app)
- [Switch PHP Versions](#switch-php-versions)
- [Upgrade](#upgrade)
- [Uninstall](#uninstall)
- [Contribute](#contribute)
- [Contact](#contact)

Prerequisites
-------------

[](#prerequisites)

- MacOS
- [Docker / Docker Compose](https://hub.docker.com/editions/community/docker-ce-desktop-mac)
- [Homebrew](https://brew.sh/)
- DNSMasq

Configuring DNSMasq
-------------------

[](#configuring-dnsmasq)

*Already done this? [Skip ahead](#why-saber)*

DNSMasq is required so that Saber can function correctly. Here's a quick guide on getting it set-up. For a more detailed explanation, I recommend reading [this article](https://passingcuriosity.com/2013/dnsmasq-dev-osx/).

Install DNSMasq - this guide uses **Brew**

```
brew install dnsmasq
```

Open `/usr/local/etc/dnsmasq.conf` and anywhere in the file, add this line

```
address=/test/127.0.0.1
```

Restart DNSMasq

```
brew services restart dnsmasq
```

Then test it by running a `dig` command

```
dig my.awesome-website.test @127.0.0.1
```

If you get a response like so, it works!

```
;; ANSWER SECTION:
my.awesome-website.test. 0 IN A 127.0.0.1
```

Now you need to configure DNSMasq so it can control the way the DNS queries are performed.

```
sudo mkdir -p /etc/resolver

sudo tee /etc/resolver/test > /dev/null  The SSL certificates are self-signed.

If you added an SSL on creation of your app, or you made a mistake and want to start over, you can perform the reverse of this and remove an SSL certificate

```
saber unsecure
```

Upgrade
=======

[](#upgrade)

The images used to build your environment are often updated by the maintainers of the image, resulting in newer versions and secrity fixes. Normally to upgrade a version of PHP or MySQL it would take many hours to upgrade it manually or lots of tedious tickets or phone calls with your hosting provider.

Saber will pull down the newest versions of the images you want to upgrade and rebuild the containers.

```
saber upgrade
```

Run the upgrade command, and you'll be presented with a list of images stored locally on your machine

```
Select images to upgrade. Select multiple by seperating with a commar, example: 1,3
  [0] composer:latest
  [1] php:7.2-fpm-alpine
  [2] php:7.3-fpm-alpine
  [3] nginx:alpine
  [4] mariadb:latest
 >
```

Choose the image you want to update by typing the corrosponding number and the image will be pulled down and the containers will be rebuilt.

If you want update multiple images, select the image number in a commar separated value, e.g.

```
> 2,3,4
```

and those images will be updated.

> Images cannot be updated simultaneously, they will be pulled one at a time before been rebuilt

Uninstall
=========

[](#uninstall)

Not your cup of tea? That's okay, you can uninstall Saber from your machine - **but you will lose everything!**

```
saber uninstall
```

Contribute
==========

[](#contribute)

🚨 I encourage you to help me make this tool even more useful! I will be adding more features to it over time.

🐛 There are bound to be some bugs hiding away that have not been counted for - help me get rid of them by creating an issue.

⬇️ Please, submit a Pull Request and help me make this tool even better. I'm looking forward to working with other developers on this.

Contact
=======

[](#contact)

Feel free to get in touch! I'm contactable on Twitter [@cmellor](https://twitter.com/cmellor)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~17 days

Recently: every ~8 days

Total

9

Last Release

2349d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a50ec73c5a205880cbeeab7dc86f12acbe34eace997d01772d9380a1b2455390?d=identicon)[cmellor](/maintainers/cmellor)

---

Top Contributors

[![cjmellor](https://avatars.githubusercontent.com/u/1848476?v=4)](https://github.com/cjmellor "cjmellor (46 commits)")

---

Tags

dockerdocker-composelempmariadbmysqlnginxphpphp-fpmredissymfonydockerlemp

### Embed Badge

![Health badge](/badges/cjmellor-saber/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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