How to set up VPS

How to set up Amazon Lightsail’s instance

Amazon Lightsail Configuration and Usage

Introduction

This page provides an introduction and explanation of setting up and using AWS’s VPS Lightsail.
For an explanation of the features, functions, and pricing of AWS Lightsail, please refer to the “AWS Lightsail features, functions, and pricing explanation page“.

Account Creation

https://aws.amazon.com/jp/lightsail/
Go to and first create an AWS account.

Although Amazon Lightsail offers a simplified selection compared to using AWS servers (ec2/ec3), there are various points to be aware of.

For an explanation of Amazon Lightsail’s plans, features, and performance, please refer to another article.

Instance Creation

Country Selection


If you’re offering services tailored to Japan, select Japan without hesitation.

Availability Zone Selection


Different zones mean different physical locations, which increases fault tolerance. However, communication between different data centers incurs charges and takes time, so be cautious.

Platform Selection


When choosing both an app and OS set, Ubuntu is selected for the OS by default.

If there’s no resistance to vendor lock-in and compatibility with the Amazon environment is important, Amazon Linux is optimized in that regard and would be the best choice.

Startup Script and SSH Key Setup


If you have a Shell script you want to execute when launching the instance, write it in the startup script.
Register the SSH key you’ll use to log in to the instance.

Instance Plan Selection


Consider the required specs and cost-effectiveness, then choose the appropriate instance.

Final Decision


Just press the create button to start.

Login via SSH

You can connect via SSH from your local terminal using the ec2-user for login and then obtain root permissions using sudo to perform tasks.

Scaling Up or Down

You need to stop the instance, create a snapshot, and then create a new instance from there.
Also, like EC2, if you stop the instance, the Public IP address assigned to it changes, so be careful.
Furthermore, unlike EC2, you’re still charged even when the instance is stopped.



Server Setup After Launch

Server setup after launch is generally common for all VPS, so please refer to the following article.


What is VPS?
  1. CPUs of VPS : How to judge whether it is good or not

OS & Virtual Environment
  1. How to switch to AlmaLinux from CentOS(RHE’s clone)
  2. How to upgrade to CentOS 8 from CentOS 7 and its merit
  3. Benchmark of performance degradation by Docker's overhead with knowhow of installation&usage of docker

Database
  1. MariaDB vs MySQL vs PostgreSQL: Flowchart to choose best RDB

Programming Language
  1. How to install PHP8