Weblutions Documentation
Weblutions Main Site Contact Us Our Discord
Some pages are still pending proper formatting, if required refer to the legacy documentation website.
Knowledgebase IconKnowledgebase

Weblutions Documentation / Knowledgebase / LEMN Stack Install

Updated

LEMN Stack Install

By Josh M. 2 mins 6

This guide covers how to install a LEMN stack to a Ubuntu machine. A LEMN stack is required for the majority of Weblutions products to operate.

A LEMN stack is a group of programs that will are the core dependencies for Weblutions products.

  • L inux

  • E ngine-X (or Nginx)

  • M ySQL Database

  • N odeJs

Table of Contents


Requirements

  • A terminal to SSH into the server with. We recommend Termius

  • A SFTP/FTP program like WinSCP


Before Starting

  • Know the server login details

  • Forward the desired domain to the servers IP address via an A Record


Installation

To install the the LEMN stack, login to the server via SSH/Termius

1. Install Nginx, MySQL & Certbot

  1. Update the servers package repository

apt-get -y update
  1. Install the items through the package manager

apt-get install nginx mysql-server certbot python3-certbot-nginx -y

This may take some time, a prompt to select yes or no is likely to appear during installation.

2. Install NVM & Node.js

Install Node and NVM by using our Node Version Manager install guide.

3. MySQL Configuration

It's recommended to complete the MySQL server configuration before using it to ensure it meets desired requirements and is secure.

Run the configuration command to begin

sudo mysql_secure_installation

Set the MySQL Password

  1. Login to MySQL

sudo mysql
  1. Alter the user to set the password

Be sure to replace the CHANGE_ME text to the desired password.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'CHANGE_ME';
  1. Reload the MySQL servers permissions, known as flushing

FLUSH PRIVILEGES;
  1. Exit the MySQL server console

exit

MySQL is now setup and functional.

4. Create an SSL Certificate for Domain

To allow a domain to function on SSL certbot can be used to generate the certificate. To create the certificate replace the example.com in the below command.

sudo certbot --nginx -d example.com

If directed select option 2 to redirect all traffic to the SSL connection.

Run the dry-run certbot command to have the certificate automatically renew itself when its due to be remade.

sudo certbot renew --dry-run

All content is now installed and configured. Refer to the specific product documentation if needed for more product specific setup steps.