Opencart 4

One-Click Installation

OpenCart Initialization:

Overview:

This guide walks you through initializing OpenCart on your AWS instance in one command. There is no setup wizard to complete. When the script finishes, your shop is installed, your administrator account exists, and you can log in straight away.

Applies to EGL Build 260908.2 and later.

Step 1: Access Your AWS Instance

1. Launch Your AWS EC2 Instance:

  • Choose your instance type. Recommended: t3a.small or t3.small.
  • Open ports 22, 80 and 443 in the security group. Nothing else is needed.
  • Assign an Elastic IP before you associate a domain. An ordinary public address changes when the instance is stopped and started.

2. Connect to the Instance:

  • Open your terminal, or an SSH client such as PuTTY on Windows, and run:
ssh ec2-user@<your-aws-public-ip>
  • Then become root:
sudo -i

3. Run the Initialization Script:

dnf -y update
/usr/local/bin/egl_init.sh.x
  • Keep the session open while it runs. It takes about a minute on a fresh instance, most of which is downloading the application.
  • The script generates new credentials every time it runs. Run it once.

Step 2: Save What the Script Tells You

  • When it finishes you will see a summary. Two things in it cannot be recovered from anywhere else, so copy them now:
Your shop: http://<your-public-ip>/
Your admin: http://<your-public-ip>/ocadmin7391/

++++++++++++ Administrator login +++++++++++++++++++
Username: ocadmin
Password: <generated for your instance>

Why the admin address looks unusual

  • Your administration area is not at /admin. Automated scanners try that address on every shop on the internet. Yours is given a different name on every instance, in the form ocadmin followed by four digits.
  • This is a feature OpenCart supports itself, and you can change the name again later under System > Users > Security.
  • If you lose it, you can find it again on the instance:
sudo grep admin_dir /var/www/log/egl_init.log

Step 3: Log In

  • Open the shop address in a browser. You should see the OpenCart storefront with its default theme.
  • Open the admin address and log in with the username and password from the summary.
  • There is nothing to install and no wizard to complete. The database, the administrator account and the sample catalogue are already in place.

Step 4: Before You Take Orders

1. Change the store email address

  • The store email is set to a placeholder, [email protected], because there is no real address available when the instance is created. It is used as the sender for order confirmations.
  • Change it under System > Settings > edit your store > Store.

2. Set up outgoing mail

  • This instance cannot send email until you configure it. The image does not include a local mail server, which is deliberate: mail sent from a new cloud address is usually treated as spam.
  • Under System > Settings > edit your store > Mail, choose SMTP and enter the details of your own mail provider.
  • Until this is done, order confirmations and password resets will not reach your customers.

3. Change the administrator password

  • The generated password is strong, but it was displayed in your terminal. Change it under System > Users.

Next Step: Use Your Own Domain with a Free SSL Certificate

  • Your shop is served over plain HTTP at its IP address. To use your own domain with a free Let’s Encrypt certificate, see Associating Your Domain.
  • A certificate authority will not issue a certificate for a bare IP address, so HTTPS begins when you associate a domain and not before.
  • Your admin address moves with the domain. The tool prints the new full address when it finishes.

Important Notes:

  • Do not run the initialization script twice. Each run generates new database credentials, and an existing database keeps the ones it was created with. The second run will not match and the shop will stop working.
  • Your data is kept in Docker volumes, separately from the application, so an application update does not touch your catalogue, orders or uploaded images.
  • AWS restricts outbound email on new accounts by default. If your provider is rejected, request removal of the restriction through the AWS console.
CONTENTS