Amazon Lightsail is an easy-to-use cloud platform from Amazon Web Service (AWS) that offers you everything needed to build an application or website, plus a predictable pricing, monthly plan.
It is one of the top choices to host your website. If you want to host your website using AWS infrastructure without having to deal with the complexity of Amazon Elastic Cloud Compute (Adobe EC2), then Amazon Lightsail is the answer for you.
For example, for $5 / month, you can get a VPS with 1 GB Memory, 1 Core Processor, 40GB SSD Disk, and 2TB Transfer. Actually, this latest pricing makes it better compare to DigitalOcean, Linode, Vultr, and Upcloud which give 25GB SSD and 1TB Transfer for the $5 / month plan. Even better, Amazon Lighsail also has $3.5 / month with 512MB Memory. You should try it!
Currently, Amazon Lightsail has many regions (datacenters), including Ohio, Virginia, Montreal, Oregon, Ireland, London, Paris, Frankfurt, Tokyo, Sydney, Seoul, Mumbai, and Singapore. You can choose the server location that is close to you or your customers. The closer your instance (server) is to your users, the less latency they will experience.
In this post, we will discuss how to set up Amazon Lightsail server to host your websites (web applications).
Note: If you want to use Amazon EC2, please check the other tutorial, how to setup Amazon EC2 (AWS) to host your websites.
Table Of Contents
- Choosing RunCloud To Setup Your Amazon Lightsail Server
- Method 1. Amazon Lightsail Server Provisioning (Recommended)
- Tips – Create Static IP Address For Amazon Lightsail
- Method 2. Setup Amazon Lightsail With Manual Server Installation.
Choosing RunCloud To Setup Your Amazon Lightsail Server
Amazon Lightsail has many tutorials about how to host your website using Amazon Lightsail, for example:
- Launch and configure a LAMP instance in Amazon Lightsail
- Launch and configure a WordPress instance with Amazon Lightsail
Then why should you use RunCloud to set up your Amazon Lightsail server?
- RunCloud simplifies server management experience. Either using Amazon Lightsailor other providers, you only need to master RunCloud once for all cloud server providers. You don’t need to be a Linux expert to build a website powered by Amazon Lightsail.
- You can easily manage multiple servers (Amazon Lightsail and others) from one single RunCloud dashboard.
- You can manage multiple web applications (websites) in one server using RunCloud.
- You can easily change the web application stack from native Nginx to Nginx-Apache2 hybrid and vice versa for each web application in your server. No need to spin a new server only to try to use Nginx or Apache.
- You can easily change the PHP version (7.0, 7.1, 7.2, 7.3, 7.4) of each web application in your server anytime. A different web application may require a different PHP version and no need to spin a new server to host another website with a different PHP version.
- You can easily set up Let’s Encrypt SSL/TLS (https) to secure every web application in your server. RunCloud also supports wildcard Let’s Encrypt SSL and custom certificate.
- You can easily clone your web application in the same server or to other servers in your RunCloud dashboard.
- You can get notification from RunCloud server health monitoring when server load is high, RAM memory is nearly full, and disk space is low, directly to your email, telegram, or slack.
- RunCloud supports many web applications, including WordPress (one-click install), Laravel, and any PHP web applications.
- For WordPress users, you can use RunCloud Hub to optimize your website with server-side page caching and Redis object cache.
- For professional WordPress developers, you can use the one-click WordPress Staging feature to create a staging version of your website easily.
- For professional developers, you can use Git deployment from Github, BitBucket, Gitlab, to deploy your web application easily.
- For power users, you can use the Custom Nginx Config feature to customize Nginx easily from the RunCloud dashboard, without having to edit it manually.
- For agencies, you can use our Team feature to assign a different team member to a different server with separate permission.
If you still do not have a RunCloud account, please register for 5 days free trial, no credit required.
Connecting your Amazon Lightsail server to RunCloud is very easy. RunCloud provides two different methods for Amazon Lightsail.
- Server Provisioning using Amazon Lightsail API key
- Manual Server Installation via IP Address
Method 1. Amazon Lightsail Server Provisioning (Recommended)
With our Server Provisioning feature, you can set up a server in Amazon Lightsail directly from the RunCloud dashboard by providing an API key from Amazon Lightsail to RunCloud.
You only need to leave the RunCloud dashboard once to get this key and add it to RunCloud 3rd Party API Key Settings.
Within the RunCloud dashboard, for any future server creations, you will be able to add new servers without having to leave your dashboard.
Video Tutorial: Setup Amazon Lightsail Server
Create Amazon Lightsail API Key
For Amazon Lightsail, the API key is an Access Key (Access Key ID and Secret Access Key). You can create it here,
You will be taken to a screen where you can generate your token. Click the “Create New Access Key” button to get your Access Key ID and Secret Access Key.
Add Amazon Lightsail API Key to RunCloud
There are two ways to add Amazon Lightsail API key in RunCloud.
You can use “Add a new key” shortcut when you try to build a server using RunCloud and choose Amazon Lightsail.
Or you can go to the “3rd Party API Key” menu by clicking your profile (top right), then click the Settings menu. You can see the list of all server provider API keys that you have added to RunCloud.
Once you have added your API key, you can start building the Amazon Lightsail server directly from the RunCloud dashboard.
Build Your Amazon Lightsail Server
To get started, click on the “Let’s get started” button to set up your first server.
A screen will pop up showing you a list of available server providers.
Select Amazon Lightsail server provider, click “Build Server” provision type, and select the API key from the list.
You can build a server from all available data center regions and instances from your Amazon Lightsail account.
Choose OS Image, select the data center region, select an instance, and click on “Add this server” to start building your server.
After clicking the “Add This Server” button, RunCloud will begin provisioning your server automatically.
Once the provision is complete, you will land on the RunCloud dashboard.
If successful, data about your server will appear, and you have successfully set up your server with RunCloud.
Tips – Create Static IP Address For Amazon Lightsail
When creating an Amazon Lightsail instance, you will get a private IP and public IP for each server. You can use the public IP to connect to your instance from the Internet, including set up your server using RunCloud.
Unfortunately, it is not a static IP address. Which means this public IP will be changed automatically when you stop and restart your Amazon Lightsail server.
If you use Amazon Lightsail to host your website, it is highly recommended to use the static IP address for your server. This static IP is dedicated for you will not be changed when you stop and restart your server.
Please check this video to learn how to setup static IP address for your Amazon Lightsail server.
Static IP Address is free as long as your Amazon Lightsail is active. It is maximum 5 static IP addresses per account, but you can contact Amazon Lightsail support if you have many servers and need more static IP addresses.
Method 2. Setup Amazon Lightsail With Manual Server Installation.
If you do not want to use our Server Provisioning feature to set up your Amazon Lightsail server easily and quickly, you can use our manual server installation.
Using the manual server installation method, you have to go to your Amazon Lightsail dashboard, create a new server using Ubuntu 16.04 / 18.04 / 20.04 LTS OS image.
Then, you can log in as root user to your server, run the RunCloud installation script, and our manual server installation will set up your server in minutes.
Step 1. Create Amazon Lightsail Instance
Log in to your Amazon Lightsail dashboard and click the “Create Instance” button.
Select instance location, Linux platform, blueprint (OS Only), and then select Ubuntu 18.04 LTS. When this article is published, Amazon Lightsail still does not have Ubuntu 20.04 LTS.
Choose your instance plan and click the “Create Instance” button.
Step 2: Create Static IP Address
We have explained why you should use a static IP address above for your Amazon Lightsail instance. It is a necessary step to do when using manual server installation with RunCloud, to save your time.
You can click your instance, open the Networking tab, and click the “Create Static IP” button.
Note: A static IP address is free when it is associated with an Amazon Lightsail instance. If you delete your instance, then please do not forget to delete the static IP also.
Step 3: Open Required Ports (22, 80, 443, 34210)
To host your website using Amazon Lightsail and RunCloud, you will need to open the following ports
- 22 (SSH)
- 80 (HTTP)
- 443 (HTTPS)
- 34210 (RunCloud Agent)
From the networking tab of your instance, you can see the Firewall section where you can click the “Add Rule” button to open a port.
Step 4: Connect Your Instance To RunCloud
You can log in to the RunCloud dashboard and click the “Connect a new server” button. Select Amazon Lightsail from the Server Provider list, and select “Connect via IP Address” provision type.
Please add a server name and static IP address that you have created on Step 2. Click the “Add this server” button.
On the next screen, you can choose “Manual Installation” and you will see the script that you have to run on your Amazon Lightsail instance.
Step 5: Login To Your Server and Run Installation Script
Instead of using your own SSH client to connect to your server, you can use the “Connect using SSH” button to connect to your server easily from your browser.
We need to run the RunCloud installer script command as “root” user. Please run the command below to start a “root” shell.
Then, paste and run the RunCloud installer script command. The RunCloud installation will take a few minutes to complete. You can check the installer progress at the RunCloud panel too.
Amazon Lightsail is the easiest way to get started with Amazon Web Service (AWS) infrastructure for developers who need a simple virtual private server (VPS) solution with predictable pricing, starts from $3.5 / month. You can set up your Amazon Lightsail servers easily using RunCloud with two different methods that have been explained in this post.
After set up your server, you can continue to,