Skip to content

Install from One-Click Script

The OpenLiteSpeed (OLS) One-Click Script provides several options and supports all supported operating systems.

Supported Operating Systems

OpenLiteSpeed supports current and non-EOL versions of the following Linux distributions:

  • CentOS* 8, 9, 10
  • Debian 11, 12, 13
  • Ubuntu 22, 24, 26

* Includes RedHat Enterprise Linux and derivatives, AlmaLinux, CloudLinux, Oracle Linux, RockyLinux, VzLinux, etc.

./ols1clk.sh [options]

Common uses

The ols1clk script supports the following common installations.

Install the following:

  • OpenLiteSpeed
  • LSPHP
  • MariaDB
  • WordPress
  • LiteSpeed Cache
bash <(curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh) -W

Install only the following:

  • OpenLiteSpeed
  • LSPHP
bash <(curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh)

Options

Essential Options

Opt Options Description
--adminuser <username> Sets the WebAdmin Console username instead of using admin.
-A --adminpassword <password> Sets the WebAdmin Console password instead of generating a random password.
--adminport <port> Sets the WebAdmin Console port instead of using 7080.
-E --email <email> Sets the administrator email address.

PHP Configuration

Opt Options Description
--lsphp <version> Sets the LSPHP version, such as 84. Supported versions are 74, 80, 81, 82, 83, 84, and 85.

DataBase Options

Opt Options Description
--mariadbver <version> Sets the MariaDB version. Supported versions are 10.6, 10.11, 11.4, and 11.8.
-R --dbrootpassword <password> Sets the database root password.
--dbname <database-name> Sets the database name for WordPress.
--dbuser <database-username> Sets the WordPress database username.
--dbpassword <password> Sets the WordPress database-user password.
--prefix <prefix> Sets the WordPress database-table prefix.
--pure-mariadb Installs OpenLiteSpeed and MariaDB.
--pure-mysql Installs OpenLiteSpeed and MySQL.
--pure-percona Installs OpenLiteSpeed and Percona Server for MySQL.
--with-mysql Installs OpenLiteSpeed and the selected application with MySQL.
--with-percona Installs OpenLiteSpeed and the selected application with Percona Server for MySQL.

Application Options

Opt Options Description
-W --wordpress Installs WordPress. You must complete the WordPress setup in a browser.
--wordpressplus <site-domain> Installs, sets up, and configures WordPress. It also enables LiteSpeed Cache.
--wordpresspath <path> Specifies the WordPress installation location or an existing WordPress installation.
--wpuser <username> Sets the WordPress administrator username for WordPress Dashboard login.
--wppassword <password> Sets the WordPress administrator password for WordPress Dashboard login.
--wplang <language> Sets the WordPress language. The default value is en_US for English.
--sitetitle <title> Sets the WordPress site title. The default value is mySite.

System Configuration

Opt Options Description
--listenport <port> Sets the HTTP listener port. The default is 80.
--ssllistenport <port> Sets the HTTPS listener port. The default is 443.
--sitedomain <site-domain> Sets the domain mapping at the listener level. The default is *.
--autocert Installs ACME and enables Automatic SSL Certificates at the server level.
--proxy-r Configures a proxy that uses rewrite rules.
--proxy-c Configures a proxy that uses server configuration.
--proxy-s Configures a Web Socket Proxy.
--proxy-port <port> Sets the proxy port. The default is 8080.

Security Configuration

Opt Options Description
--owasp-enable Enables ModSecurity with OWASP rules. If OpenLiteSpeed is already installed, this option enables the rules directly.
--owasp-disable Disables ModSecurity with OWASP rules.
--fail2ban-enable Enables Fail2Ban protection for WebAdmin Console and WordPress login pages.

Control

Opt Options Description
-U --uninstall Uninstalls OpenLiteSpeed and removes the installation directory.
-P --purgeall Uninstalls OpenLiteSpeed, removes the installation directory, and purges all MySQL data.
-Q --quiet Uses quiet mode and does not prompt for input.
-V --version Displays script version information.
-v --verbose Displays additional installation messages.
--update Updates ols1clk from GitHub.
-H --help Displays help information.

Usage Examples

Web Server with PHP

# Install OpenLiteSpeed with the default PHP version.
./ols1clk.sh

WordPress with PHP

# Install OpenLiteSpeed with WordPress and MariaDB.
./ols1clk.sh -W

WordPress with Mysql

# Install OpenLiteSpeed with WordPress and MySQL.
./ols1clk.sh -W --with-mysql

OWASP

# Enable OWASP rules. This option can be used after OpenLiteSpeed is installed.
./ols1clk.sh --owasp-enable

Autocert

Make sure that your domain points to the server.

Then run:

./ols1clk.sh --sitedomain www.example.com --autocert

Proxy custom port

./ols1clk.sh --proxy-r --proxy-port 7860

Next Step

Configure OpenLiteSpeed