This blog will walk you through installing the Bagisto application on AWS EC2 using the Bagisto AMI, which comes pre-installed with Bagisto code.
Bagisto simplifies online store setup and management as an open-source eCommerce platform. It offers a user-friendly admin panel, secure architecture, and seamless deployment on AWS.
Prerequisites For Bagisto AMI Installer
Complete the prerequisites to ensure a smooth and secure AWS EC2 deployment.
- Allow port 22 (SSH) from your IP in your EC2 Security Group. Ensure 80/443 are open for SSL and the Bagisto app.
- Use a t3.medium or higher EC2 instance to ensure your server runs smoothly with sufficient CPU and memory for optimal performance.
- Assign an Elastic IP to your EC2 instance to maintain a static public IP address, ensuring consistent DNS configuration and uninterrupted access to your server.
- In your domain registrar’s DNS settings, Create an A record pointing to your EC2 Elastic IP. This ensures your domain correctly resolves to your server.
Installation Steps
Step 1: Launch The EC2 Instance
- First, launch the EC2 instance from the Bagisto AMI.
- Wait for the EC2 instance’s status to become “running”.
Step 2: Access Your EC2 Instance
SSH into EC2 using your PEM key with proper permissions.
1. Set the PEM File Permission:
The PEM file should be readable only by you. Run the command to set the correct permissions:
1 |
chmod 400 your-key-file.pem |
2. Connect to Your EC2 Instance via SSH:
After setting the permission, connect to your instance using:
1 |
ssh -i your-key-file.pem ubuntu@your-instance-ip |
Replace your-key-file.pem with your actual key filename, and your-instance-ip with your EC2 instance’s public (Elastic) IP address.

Step 3: Execute the Setup.sh Script.
Execute the shell script setup.sh to provide the database name, username, password, Domain and Email by running the command:
Configure your domain’s A record to the EC2 IP first.
1 |
sudo bash setup.sh |
This script will:
- Create a database and a database user in MySQL.
- Validate your domain’s DNS points to this EC2’s IP.
- Obtain a Free Let’s Encrypt SSL certificate.
- Configure Apache to serve the Bagisto site over HTTPS.

Wait for a few minutes.

Step 4: Start Using Bagisto
Access the application by visiting https://yourdomain.com/ in your preferred web browser.

Step 5: Access the Bagisto Admin panel.
The Admin password is stored in Adminpasswd.txt file , run this command to get it.
1 |
sudo cat Adminpasswd.txt |

To access the Admin Panel, open your web browser and visit: https://yourdomain.com/admin/
Then, log in using the email and password stored in the Adminpasswd.txt
file.


Need Support?
Thank you for reading this Blog!
To stay updated, keep in touch with us for our latest blogs. If you need any kind of support, simply raise a ticket at https://webkul.uvdesk.com/en/.
If you need assistance, you can alternatively raise a ticket Or contact us directly.
Be the first to comment.