LEARN HOW TO CREATE A IMAGE HOSTING WEBSITE USING THE CHEVERETO IMAGE HOSTING APP ON LINUX UBUNTU 20.04 lts in the cloud on amazon web services (aws lightsail)
In the easy how to guide, you will learn how to create an image hosting website using the chevereto self-hosted image hosting software on Linux Ubuntu 20.04 LTS, in the cloud on Amazon Web Services (AWS). Chevereto is an application which allows you to setup your own image sharing website and allows anyone in the world to host their own image sharing platform. First you will learn how to setup a Linux Ubuntu 20.04 LTS instance on Amazon Lightsail, then you will learn how to install the Apache web server, MariaDB and finally you will learn how to create a apache virtualhost configuration file and also how to setup the Chevereto image hosting web app. You will also learn how to point an A record in Amazon Route53 and point it to the Chevereto Ubuntu server.
REQUIREMENTS
In order to complete this tutorial, the following is a list of items that may be needed or required. Please ensure to have these items available before taking implementation action on this tutorial to ensure success:
1) A desktop or laptop with a dual core processor, 4GB of RAM and atleast 50GB of free disk space
2) An Amazon Web Services account, click HERE to sign up for a FREE tier account
3) A terminal emulation program such as PUTTY (for windows)
4) A registered domain name on Amazon Route53 or any other DNS name registrar (e.g namecheap or godaddy
5) A linux ubuntu instance hosted on Amazon Lightsail, EC2 or any other cloud / vps hosting provider
OVERVIEW
1) Log into your Amazon Web Services account and create a new Lightsail Linux Ubuntu 20.04 instance
2) Download system and package updates, set a custom hostname, DNS A record and reboot the instance
3) Install the Apache or Litespeed Enterprise Web Server, MariaDB, PHP 7.4 and create a database for the Chevereto web app.
4) Create an Apache or Litespeed virtualhost configuration file and download the Chevereto web application files from GITHUB
5) Configure file permissions on the Chevereto web app and complete the post installation setup process
STEP 1: Log into your Amazon Web Services account and create a new Lightsail Linux Ubuntu 20.04 instance
- The first step in completing this setup is to log into you amazon account and open the Lightsail service. Simply use the search bar at the top pf the page to search for “Lightsail” then click on the AWS LIGHTSAIL search result to open the console. Proceed by click on the CREATE INSTANCE button to start the LINUX UBUNTU 20.04 instance creation process.

2. On the CREATE INSTANCE page, set the PLATFORM to UNIX / LINUX and on the SELECT A BLUE PRINT section click on the OS ONLY button. Scroll down and select the LINUX UBUNTU 20.04 LTS option and choose the $5Us, $10US or any other higher monthly plan that you would like.
Scroll down to the IDENTIFY YOUR INSTANCE input field and type in a descriptive name to identify the instance that you are creating. Once you are done click on the CREATE INSTANCE button.

STEP 2: Download system and package updates, set a custom hostname, DNS A record and reboot the instance
3) Once the Linux Ubuntu instance has been deployed, we recommend that you first set a static IP address on the instance. Please note that in AWS Lightsail you can allocate upto 5 static IP address to your instances and AWS will start charging you if you require more than 5. Click HERE to learn how to set a static IP address on your instance.
Once you have set your static IP address, copy the IP address and open the Route53 service. Click on HOSTED ZONES and click on any of the hosted zones that you would like to use for this project. Click on the CREATE RECORD button and paste the IP address into the value field. Ensure that the record type is set to A RECORD. If you would like to point your main domain i.e www.yourdomain.com to the instance then leave the name field blank. If you would like to set a custom subdomain to your instance i.e yourserver.yourdomain.com then type in the hostname of your Linux Ubuntu instance in the NAME field
Once you have made the changes specified above, click on the CREATE RECORDS button.

4) The next step is to connect to the instance via SSH. Go to the Lightsail dashboard and click o the name for the Chevereto Linux Ubuntu instance. On the CONNECT tab, scroll down and click on the DOWNLOAD DEFAULT KEY button. Go to your downloads directory and you can rename the key pair file to something easy to remember i.e CHEVERETOKEY.pem. Open up your terminal program and change your working directory to the downloads directory. Run the following commands to set the key pair file to read only and to connect to the instance via SSH:

In the hosst file type in 127.0.0.1 yourhostname.yourdomainname.com yourhostname the press CNTRL +O, press ENTER and press CNTRL + X

STEP 3: Install the Apache or Litespeed Enterprise Web Server, MariaDB, PHP 7.4 AND CREATE A DATABASE FOR THE CHEVERETO WEB APP
6) Since Chevereto is a web based application, the next step is to install a web server. You can either use APACHE, NGINX, OPEN LITESPEED WEB SERVER or the super fast LITESPEED ENTERPRISE WEB SERVER. Click HERE to learn more about the LITESPEED ENTERPRISE WEB SERVER. You will also need to instance a database engine (MARIADB) as well as the PHP hypertext processor. For this demonstration we will install APACHE, MARIADB and PHP. Copy and paste the commands shown below in to your terminal window to install them:

7) You now need to secure the mysql installation by running the mysql secure installation command. When you run the command you will be prompted to set a password for the MYSQL root user, type in Y and press ENTER. Type in a secure password on each prompt and press ENTER.. You will also be asked a series of questions that help to secure the MYSQL database server, type in Y on each prompt and press ENTER.

8) The next step, is to create a database for the Chevereto web app.Run the following commands to connect to the MARIADB MYSQL database shell and create a new database:

STEP 4: Create an Apache or Litespeed virtualhost configuration file and download the Chevereto web application files from GITHUB
9) Proceed by creating a virtualhost configuration file that will tell the web server where and how to load the Chevereto web application. Also the command below will also help you to create the directory on the Linux Ubuntu server for the Chevereto web application as well as setting the right user and file permissions. Run the commands below one at a time.

10) Next, enable the chevereto.conf virtual host configuration file and enable the APACHE SSL functionality by running the following commands

STEP 5: COMPLETE THE POST INSTALLATION SETUP PROCESS
11) To complete the post installation setup, open up a new web browser tab and type in the URL that is pointing to the Chevereto linux ubuntu instance. You will be greeted with a database setup page. Type in your database username, database password and database name on the appropriate spaces provided and click on CONTINUE.

12) Next, type in your administrator username , password, email address, from email address and incoming email address, se the website mode to COMMUNITY and click on INSTALL CHEVERETO

13) You should now see dashboard that looks like this. Here you can install system updates, upload your image work, add users and basically manage your image hosting website.

14) The default front end of the Chevereto website looks like this

15) If you would like to install a FREE LETSENCRYPT SSL certificate, reconnect to the ssh terminal window for the ubuntu instance and run the following commands.
Reload web browser to check SSL if its now secure. Also ensure that HTTPS port 443 is open on your IPV4 and server firewall.