Skip to content
Edi Septriyanto edited this page Aug 13, 2021 · 8 revisions

LEMPer Stack Installer Configurations

Please consider making changes to the default configuration before running LEMPer Stack installer by executing the following command:

cp .env.dist .env

Edit the .env file with your favorite editor. The .env file contains all of the configuration parameters for LEMPer Stack installer.

vim .env

Adjust all the parameters to your needs.

Environment Variables

The .env file contains configuration parameters (environment variables) used during installation. Each of environment variables are grouped in a section. The section names represents the software stack names.

Installer Variables [installer]

  • AUTO_INSTALL - If this is set to true, the LEMPer Stack will automatically install the software stack in unattended installation mode, otherwise you will be prompted to install the software stack in interactive mode. The valid value is true or false, and the default value is false.
  • AUTO_REMOVE - If this is set to true, the LEMPer Stack will automatically remove existing software stack during installation and in unattended uninstallation mode, otherwise you will be prompted to uninstall or keep the existing software. The valid value is true or false, and the default value is true.
  • FORCE_REMOVE - If this is set to true, the LEMPer Stack will completely remove all files and configs related to uninstalled existing software stack during installation and in unattended uninstallation mode, otherwise you will be prompted to remove or keep them. The valid value is true or false, and the default value is true.
  • DRYRUN - If this is set to true, the LEMPer Stack will not actually install or uninstall software stack, but will show the installation or uninstallation process. The valid value is true or false, and the default value is false.
  • FIX_BROKEN - If this is set to true, the LEMPer Stack will try to fix broken software packages during installation and in unattended uninstallation mode. The valid value is true or false, and the default value is false.
  • ENABLE_SWAP - If this is set to true, the LEMPer Stack will enable swap space on the server. The valid value is true or false, and the default value is true.
  • DEBUG - If this is set to true, the LEMPer Stack will output debug information during installation. The valid value is true or false, and the default value is false.
  • LOGGING - If this is set to true, the LEMPer Stack will output log information during installation to log file. The valid value is true or false, and the default value is true.
  • LOG_FILE - The path to the installer log file. The default value is ./install.log.
  • BUILD_DIR - The path to the directory where the software stack will be built during installation. The default value is /usr/local/src/lemper. This build directory will be deleted after installation.

LEMPer Stack Variables [lemper]

  • ENVIRONMENT - This is the name of the environment that you want to install. The valid values are development and production, the default value is development. The development environment is used for development purposes, while production environment is used for production purposes.
  • SERVER_HOSTNAME - The hostname of the server that you want to install. The default value is localhost.localdomain. In production environment, server hostname must be valid FQDN format (e.g. hostname.example.com).
  • SERVER_IP - The IP address of the server that you want to install. The default value is 127.0.0.1.
  • TIMEZONE - The timezone of the server that you want to install. The default value is UTC. For detailed timezon format reference, please refer to timezone database.
  • LEMPER_USERNAME - The default username used by LEMPer Stack. The default value is lemper. This username will be created if it doesn't exist.
  • LEMPER_PASSWORD - The password used by LEMPer Stack user. If not set (empty), the password will be created automatically during installation process.
  • LEMPER_ADMIN_EMAIL - The email address of the LEMPer Stack admin. You must set the value to valid email address. It is used for Let's Encrypt certificates and email notifications.

SSH Variables [ssh]

  • SSH_PORT - The port number of the SSH server. For security reasons, avoid using default SSH port 22. The default LEMPer Stack ssh port is 2269 and it is recommended that you change it to a different port number. If your server instance behind firewalls, you must allow inbound connections on the firewall to the SSH port.
  • SSH_ALLOW_ROOT_LOGIN - If this is set to true, the LEMPer Stack will allow SSH login with root user. To prevent brute-force SSH attacks that targeting root account, by default the value is set to false.
  • SSH_PASSWORDLESS_LOGIN - If this is set to true, the LEMPer Stack will allow SSH login without password. SSH passwordless login requires public-private key pairs generated from ssh-keygen.
  • RSA_PUB_KEY - The strings value of the RSA public key file generated from ssh_keygen. Follow this tutorial SSH Passwordless Login Using SSH Keygen Authentication to setup public-private key pairs.
  • KEY_HASH_LENGTH - The length of the hash value of the RSA public key. The valid value is 2048 or 4096, and the default value is 2048.

For further reading

Nginx Variables [nginx]

  • INSTALL_NGINX - If this is set to true, the LEMPer Stack will install Nginx HTTP server. The valid value is true or false, and the default value is true.
  • NGINX_INSTALLER - Nginx installer to use. The valid values are repo and source, and the default value is source.
  • NGINX_VERSION - The version of Nginx to install. The valid values are stable or lts, latest or mainline, and version number e.g. 1.20.1 (only if Nginx build from source), and the default value is stable.
  • NGINX_EXTRA_MODULES - If set to true, LEMPer Stack will install Nginx extra modules. The valid values are true or false, and the default value is true.
  • NGINX_DYNAMIC_MODULE - If set to true, the Nginx extra modules will be build as dynamic module. The valid values are true and false, and the default value is true.

PHP Variables [php]

  • INSTALL_PHP - If this is set to true, the LEMPer Stack will install PHP. The valid value is true or false, and the default value is true.
  • PHP_VERSIONS - The version of PHP to install, currently supported version are 7.3, 7.4, 8.0. Installing multiple versions is supported, separate version by space, e.g. the default value is PHP_VERSIONS="7.4 8.0".
  • PHP_EXTENSIONS - Additional PHP modules (extensions) to install. Installing multiple extension is supported, separate version by space, e.g. PHP_EXTENSIONS="php7.4-curl php7.4-mbstring".

MySQL/MariaDB Variables [mysql]

  • INSTALL_MYSQL - If this is set to true, the LEMPer Stack will install MySQL/MariaDB. The valid value is true or false, and the default value is true.
  • MYSQL_SERVER - The MySQL/MariaDB server to install. Currently supported value is mariadb.
  • MYSQL_VERSION - The version of MySQL/MariaDB to install. The valid version number e.g. 10.6, and the default value is 10.6.
  • MYSQL_SECURE_INSTALL - If this is set to true, the LEMPer Stack will perform MySQL/MariaDB with secure installation. The valid value is true or false, and the default value is true.
  • MYSQL_ROOT_PASSWORD - The password of MySQL/MariaDB root user. The default value is blank, and it will be created automatically during installation process.
  • MYSQL_ALLOW_REMOTE - If this is set to true, the LEMPer Stack will allow remote connection to MySQL/MariaDB server. The valid value is true or false, and the default value is false.

Memcahed Variables [memcached]

  • INSTALL_MEMCACHED - If this is set to true, the LEMPer Stack will install Memcached. The valid value is true or false, and the default value is false.
  • MEMCACHED_INSTALLER - Memcached installer to use. The valid values are repo and source, and the default value is repo.
  • MEMCACHED_VERSION - The version of Memcached to install. The valid values are latest and version number e.g 1.6.0, and the default value is latest.
  • MEMCACHED_SASL - If this is set to true, the LEMPer Stack will install Memcached with SASL support. The valid value is true or false, and the default value is false.
  • MEMCACHED_USERNAME - The username of SASL-enabled Memcached user. The default value is lempermc.
  • MEMCACHED_PASSWORD - The password of SASL-enabled Memcached user. The default value is blank, and it will be created automatically during installation process.

MongoDB Variables [mongodb]

  • INSTALL_MONGODB - If this is set to true, the LEMPer Stack will install MongoDB. The valid value is true or false, and the default value is false.
  • MONGODB_VERSION - The version of MongoDB to install. The valid values are 4.2, 4.3, 4.4, and 5.0. The default value is 5.0, only available for Debian stretch and buster, or Ubuntu bionic and focal.
  • MONGODB_ADMIN_USER - The default username of MongoDB admin user. The default value is lemperdb.
  • MONGODB_ADMIN_PASSWORD - The default password of MongoDB admin user. The default value is blank, and it will be created automatically during installation process.

Redis Variables [redis]

  • INSTALL_REDIS - If this is set to true, the LEMPer Stack will install Redis. The valid value is true or false, and the default value is false.
  • REDIS_INSTALLER - Redis installer to use. The valid values are repo and source, and the default value is repo.
  • REDIS_VERSION - The version of Redis to install. The valid values are stable and version number e.g 6.2.5, and the default value is stable.
  • REDIS_REQUIRE_PASSWORD - If this is set to true, the LEMPer Stack will install Redis with password. The valid value is true or false, and the default value is false.
  • REDIS_PASSWORD - The password of Redis user. The default value is blank, and it will be created automatically during installation process.

DNS Variables [dns]

  • Not implemented yet.

Mail Variables [mail]

  • Experimental, not fully tested.

Certbot Variables [certbot]

  • INSTALL_CERTBOT - If this is set to true, the LEMPer Stack will install Certbot. The valid value is true or false, and the default value is true. It is hihgly recommended to set this parameter to true because LEMPer Stack uses Certbot to manage SSL Certificates from Let's Encrypt.

Firewall Variables [firewall]

  • INSTALL_FW - If this is set to true, the LEMPer Stack will install firewall rules. The valid value is true or false, and the default value is true.
  • FW_CONFIGURATOR - The firewall configurator engine to use. The valid values are ufw, csf, and apf, and the default value is ufw.

Fail2Ban Variables [fail2ban]

  • INSTALL_FAIL2BAN - If this is set to true, the LEMPer Stack will install fail2ban. The valid value is true or false, and the default value is true.
  • FAIL2BAN_INSTALLER - Fail2ban installer to use. The valid values are repo and source, and the default value is source.
  • FAIL2BAN_VERSION - The version of Fail2ban to install. The valid version number e.g. 0.11.2 (only if Fail2ban installed from source), and the default value is 0.11.2.