/LEMPer

LEMPer Stack is terminal-based LEMP / LNMP ( Linux, Nginx, MariaDB, PostgreSQL, MongoDB, Redis, Memcache, PHP, Secure FTP ) auto installer and virtual host manager for Debian & Ubuntu cloud or virtual server (vps) and on-premise (bare metal).

Primary LanguageShellGNU General Public License v3.0GPL-3.0

[L]inux [E]ngine-X [M]ariaDB [P]HP Install[er]

Served by LEMPer Stack © @joglomedia

LEMPer version GitHub stars GitHub forks GitHub issues GitHub CI GitHub license

LEMPer stands for Linux, Engine-X (Nginx), MariaDB and PHP installer written in Bash script, also known as LEMP / LNMP installer. This is just a small toolset (a bunch collection of scripts) that I use to deploy and manage LEMP stack on Debian and Ubuntu server. LEMPer is crafted to support wide-range PHP framework & CMS. It is available as Free Alternative to the paid control panel such as cPanel, Plesk, CloudWays, Ploi, RunCloud, ServerPilot, etc.

Features

  • Nginx - A high performance web server and a reverse proxy server.
    • Community package from Ondrej repo or @eilandert's MyGuard repo with built-in PageSpeed module.
    • Custom build from source featured with :
    • Pre-configured optimization for low-end VPS/cloud server. Need reliable VPS/cloud server? Get one from DigitalOcean, UpCloud, or Vultr.
    • Nginx virtual host (vhost) configuration optimized for WordPress and several PHP Frameworks.
    • Support HTTP/2 natively for your secure website.
    • Free SSL certificates from Let's Encrypt.
    • Get an A+ grade on several SSL Security Test (Qualys SSL Labs, ImmuniWeb, and Wormly).
  • PHP - Most used language that powers 78.9% of all websites around the universe.
    • Community package from Ondrej's PHP repository.
    • Multiple PHP versions 7.1 [EOL], 7.2 [EOL], 7.3 [EOL], 7.4 [EOL], 8.0 [EOL], 8.1 [SFO], 8.2 [Stable], 8.3 [Latest].
    • Run PHP as user who own the file (Multi-user isolation via FPM pool).
    • Feel the faster Nginx with secure multi-user environment like a top-notch shared hosting.
    • Supported PHP Framework and CMS:
      • Vanilla PHP: default,
      • Framework: codeigniter, laravel, lumen, phalcon, symfony,
      • CMS: drupal, mautic, roundcube, sendy, wordpress, wordpress-ms (multi-site), and
      • more coming soon.
    • PHP Zend OPcache.
    • PHP Loader, ionCube & SourceGuardian.
  • SQL database with MariaDB (MySQL drop-in replacement) or PostgreSQL.
  • NoSQL database with MongoDB.
  • Key-value store database with Redis.
  • In-memory cache with Memcached.
  • FTP server with VSFTPD or Pure-FTPd.
  • Web-based administration tools:

Setting Up

  • Ensure that you have git installed.
  • Clone LEMPer Git repositroy, git clone https://github.com/joglomedia/LEMPer.git
  • Enter LEMPer directory
  • Checkout to the desired version, git checkout 2.x.x
  • Make a copy of .env.dist to .env cp .env.dist .env and replace the values

Install LEMPer Stack

sudo apt-get install git && \
git clone -q https://github.com/joglomedia/LEMPer.git && \
cd LEMPer && \
cp -f .env.dist .env && \
sudo ./install.sh

Remove LEMPer Stack

sudo ./remove.sh

LEMPer Command Line Administration Tool

LEMPer packed with friendly command line tool which makes your LEMPer stack administration much easier. These command line tool called Lemper CLI (lemper-cli) for creating new virtual host and managing existing LEMPer stack.

LEMPer CLI Usage

Here are some examples of using LEMPer CLI.

LEMPer CLI add new vhost / website
lemper-cli site add -u ${USER} -d example.test -f wordpress \
-w ${HOME}/webapps/example.test --install-app

⚠️ For local/development environment, in order to make the test domain (e.g. example.test) working as expected, you need to do a small workaround by modifying the /etc/hosts file. By adding the local domain name to the hosts file and assign it with local/private IP address.

Since version 2.4.0, this workaround could be done via lemper-cli by passing --ipv4 parameter and assign it with private IP address, as below:

lemper-cli site add -u ${USER} -d example.test -f wordpress \ 
-w ${HOME}/webapps/example.test --ipv4=127.0.10.1 --install-app

For more info

lemper-cli site add --help
LEMPer CLI manage vhost / website

Example, enable SSL

sudo lemper-cli manage --enable-ssl example.test

Example, enable FastCGI cache

sudo lemper-cli manage --enable-fastcgi-cache example.test

For more info

sudo lemper-cli manage --help
for more help
sudo lemper-cli help

Note: LEMPer CLI automagically add a new PHP-FPM user's pool configuration if it doesn't exists. You must add the user account first.

Web-based Administration

You can access pre-installed web-based administration tools here.

http://YOUR_IP_ADDRESS:8082/lcp/

Adminer (Web-based SQL database manager)

http://YOUR_IP_ADDRESS:8082/lcp/dbadmin/

TinyFileManager (Web-based file manager)

http://YOUR_IP_ADDRESS:8082/lcp/filemanager/

TODOs

  • Add support for Debian (Bullseye, Bookworm) & Ubuntu (Bionic, Focal, Jammy) distro
  • Add custom build latest Nginx from source
  • Add Let's Encrypt SSL
  • Add network security (iptable rules, firewall configurator, else?)
  • Add database backup tool (Mariabackup, Percona Xtrabackup, else?)
  • Add PostgreSQL database (SQL object-relational database system)
  • Add Pure-FTPd installation as an alternative option to VSFTPD
  • Add enhanced security (AppArmor, cgroups, jailkit (chrooted/jail users), fail2ban, else?)
  • Add CrowdSec a modern Host-based Intrusion Prevention System (modern-replacement for Fail2ban)
  • Add NodeJS installation to support modern web frontend development
  • Add file backup tool (Borg, Duplicati, Rclone, Restic, Rsnapshot, else?)
  • Add server monitoring (Amplify, Monit, Nagios, else?)
  • Add user account & hosting package management

Add your feature request here!

Security Vulnerabilities and Bugs

If you discover any security vulnerabilities or any bugs within LEMPer Stack, please open an issue.

Contributing

  • Fork it (https://github.com/joglomedia/LEMPer/fork)
  • Create your feature branch (git checkout -b my-new-feature) or fix issue (git checkout -b fix-some-issue)
  • Commit your changes (git commit -am 'Add some feature') or (git commit -am 'Fix some issue')
  • Push to the branch (git push origin my-new-feature) or (git push origin fix-some-issue)
  • Create a new Pull Request
  • GitHub Workflows will be run to make sure that your changes does not have errors or warning

Awesome People

LEMPer Stack is an open-source project licensed under the GNU GPLv3 license with its ongoing development made possible entirely by the support of all these smart and generous people, from code contributors to financial contributors. 💜

Thank you for considering contributing to this project!

Project Maintainers


Edi Septriyanto
@joglomedia

Code Contributors

Made with contributors-img.

Financial Contributors

You can support development by using any of the methods below:

Buy Me a Bottle of Milk or a Cup of Coffee !!

Licence

LEMPer Stack is open-source project licensed under the GNU GPLv3 license.

Copyright

(c) 2014-2024 | MasEDI.Net

Enjoy LEMPer Stack ;)