How to Provision a Website With aaPanel and LetsEncrypt

choubertsprojects

VPN offers!

1. NordVPN

2. Surfshark

3. ExpressVPN

A guide on how to easily get your website ready for hosting with LetsEncrypt.com and aaPanel’s Auto Provisioning System.

How to Provision a Website With aaPanel and LetsEncrypt

You’ve just finished a lovely website but have no idea how to get it online? It might be difficult to get your website up and running. There are so many alternatives and services to choose from that it’s difficult to know where to begin. But don’t despair! For you, aaPanel is the ideal answer!

This post will show you how to get your first website up and operating over HTTPS using free Let’s Encrypt SSL certificates.

Continue reading and get ready to launch your website!

Prerequisites

This will be an interactive presentation. If you want to follow along, make sure you have these items:

  • A Linux system – Ubuntu 20.04 LTS is used in this demonstration, although any Debian distribution will work.
  • A non-root user who has sudo access.
  • A domain name that points to your server.

aaPanel Download and Installation

By default, aaPanel is not installed on your Ubuntu machine, so the first step is aaPanel Download and Installation with the wget command.

To update your package index, use the apt update command. This command guarantees that just the relevant packages are installed and that you receive the software you need.

Keeping your package index current Keeping your package index current

2. Download the install-ubuntu 6.0 en.sh file from the aaPanel website (http://www.aapanel.com/script/) using the wget command below. The -O parameter instructs wget to save and rename the downloaded file install.sh (shell script).

The program automatically runs the shell script (sudo bash install.sh) to install aaPanel after the download is complete.

You’ll download the most recent stable version, which is currently 6.8.19. Always check the official website for the most up-to-date version. To update your panel to the newest version, click the update button in the top-right corner, as shown below.

Update your control panel to the most recent versionUpdate your control panel to the most recent version

wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && sudo bash install.sh

The prompt below will appear throughout the installation procedure. To accept the prompt and continue the installation, type Y and click Enter.

aaPanel Download and Installation aaPanel Download and Installation

The following output will appear after the installation is complete. Take note of the created URL access page, username, and password. These are the login credentials you’ll need to manage your website on aaPanel.

Your aaPanel instance is now up and running.

Viewing the login information Viewing the login information

3. Use the ss command to see a list of open ports (-antpl) and verify that your aaPanel is listening on port 8888.

examining port 8888 examining port 8888

4. Finally, execute the ufw command below to check the status of your system’s firewall and see whether port 8888 is allowed.

How to Configure the UFW Firewall on Linux

Any inbound traffic from Anywhere is permitted on port 8888, as seen below.

If port 8888 is not yet open, use the following command to establish a rule on the firewall to let incoming traffic through: ufw allow 8888/tcp sudo

Status of the firewall Status of the firewall

If your server is protected by a firewall, communication to port 8888 may be blocked. To utilize your aaPanel, you’ll need to open this port on your firewall. Fortunately, the installation script (install.sh) opens port 8888 for you automatically.

Putting Together the LEMP Stack

It’s time to construct the LEMP stack for your server now that you’ve installed aaPanel. The LEMP Stack is a set of free, open-source software (FOSS) for running dynamic web pages, such as a blog or website.

aaPanel runs on top of your Ubuntu Linux operating system and serves its panels to users using NGINX as a webserver. Because your website may serve a huge number of people, you’ll need a web server that can manage a high number of simultaneous connections. NGINX is one of the greatest web servers for this purpose.

How to Serve Multiple Domains or NGINX Subdomains

1. Open your favorite browser, navigate to the URL of the aaPanel panel you noted in the “aaPanel Download and Installation” section (step two), and log in. This action redirects your browser to the aaPanel Linux login panel, as shown below.

Google Chrome is the preferred browser, and adblocking should be turned off when configuring the server. The network inspector in Google Chrome is fantastic. It allows you to observe what is going on between your client and server.

Logging into your aaPanel panel's URL Logging into your aaPanel panel’s URL

2. On the following screen, choose One Click to utilize the LNMP(Recommended) option on the left for your website.

The LNMP(Recommended) option is selected. The LNMP(Recommended) option is selected.

You will get the following output while Putting Together the LEMP Stack.

Putting Together the LEMP Stack Putting Together the LEMP Stack

After Putting Together the LEMP Stack, view the PHP extensions you’ll need for your website with the following:

  • To access the App Store, go to the left panel’s App Store menu.
  • To display installed programs, choose Installed.
  • Look for PHP-7.4, then click Settings on the right-hand side to see what other extensions you may want to install.

Obtaining Extensions for Installation Obtaining Extensions for Installation

Finally, in the Manage pop-up box, select Install extensions and then Install to the right of the extension you need for your website.

PHP extensions are files that provide functionality to the PHP language. They also allow you to create new functions or adjust existing ones in PHP without having to edit the core scripts.

The PHP extensions are installed. The PHP extensions are installed.

Using Let’s Encrypt to Secure a Website

You already have a web server up and running, but it accomplishes nothing until you create a website. So you’ll make a website and use a Let’s Encrypt SSL certificate to protect it. Let’s Encrypt is a free, open, and automated Certificate Authority (CA) that provides, maintains, and renews your certificates automatically.

How to Use CloudFlare to Set Up End-to-End SSL Encryption

Let’s Encrypt additionally secures your website connections with the best industry-standard encryption. All major current browsers and search engines accept Let’s Encrypt certificates. As a consequence, mistakes like the one below are more likely to occur on your website.

Connection error preview Connection error preview

To use Let’s Encrypt to construct and secure a website, follow these steps:

1. From your aaPanel dashboard, go to the Website menu in the left panel and choose Add site to create your first website.

The addition of a new webpage The addition of a new webpage

2. To construct your website, fill in the data in the form below and click Submit.

Adding information to your webpage Adding information to your webpage

If everything goes well, you’ll get a message like this: Successfully built site. On your aaPanel dashboard, your website will now appear in the list of websites (step two).

Viewing the site message that was successfully established Viewing the site message that was successfully established

3. Access the website’s settings by clicking on the URL, where you’ll set up SSL for your website.

Using the website's settings Using the website’s settings

4. Now, on the Site change pop-up window’s left side, choose SSL to setup Let’s Encrypt SSL for your website.

To protect your newly established website using Let’s Encrypt SSL, check the Select all option and click Apply.

Keeping your freshly launched website safe Keeping your freshly launched website safe

If everything goes as planned, you should receive something like this.

Seeing the SSL Certificate and Private Key in Action Seeing the SSL Certificate and Private Key in Action

5. Open a new browser tab and go to your website’s URL to test whether it’s operating properly.

You’ll see a screen similar to this one, indicating that your site is up and running.

Examining your website Examining your website

6. Finally, in the top-left, click the padlock. The output will be as follows. This output verifies that Let’s Encrypt is working properly and that your connection is safe.

Seeing your Let's Encrypt certificate in action Seeing your Let’s Encrypt certificate in action

Conclusion

You learnt how to install aaPanel and create the LEMP Stack for your server in this article. You’ve also mentioned using Let’s Encrypt’s free SSL certificate to secure server connections, which is a great value.

You may install over 100 different apps and services using aaPanel’s one-click installation procedure, including WordPress, Shopify, and Tumblr. And now you can manage and safeguard your website using the aaPanel dashboard.

How would you take your newfound knowledge to the next level? Set up a content management system (CMS) like WordPress and start your first blog.