Magento 2 Open Source
Magento 2 Open Source
by Eltrino

Version 1.3

OS Ubuntu 20.04 (LTS)



Magento is a flexible, endlessly customizable eCommerce platform that allows merchants to quickly bring to market the innovative, differentiated experiences that customers demand. As merchants retain full control over their Magento environment they can enrich their web store with new features at any time.

Software Included

Getting started after deploying Magento 2 Open Source

In addition to the package installation, the One-Click also:

● Enables the Apache rewrite module so the Magento 2 permalink feature will work.

● Enables the UFW firewall to allow only SSH (port 22, rate limited), HTTP (port 80), and HTTPS (port 443) access.

● Creates a Magento Mysql user with the necessary permissions, creates Magento database. Note, the Droplet root user will not be prompted for the MySQL password.

● Download and install Magento 2 with Sample Data (optional) instance on your entered domain.

● Enable and configure Varnish (port 80) for your Magento 2 instance.

● Configure Postfix SMTP server. It’s a free and open-source mail transfer agent that routes and delivers electronic mail to your Magento 2 Admin email address

After you create a Magento One-Click Droplet, you’ll need to log into the Droplet via SSH to finish the Magento setup. This prevents the setup wizard from being visible to the internet until you’re ready to complete it. If you try to visit the Droplet’s IP address before logging into the Droplet, you’ll see a DigitalOcean landing page.

From a terminal on your local computer, connect to the Droplet as root.

Make sure to substitute the Droplet’s IP address.

ssh root@use_your_droplet_ip

If you didn't add an SSH key when you created the Droplet, you’ll first be prompted to reset your root password.

Then, the interactive script that runs will first prompt you for your domain or subdomain. Note, before entering your domain or subdomain name, it must be configured through DigitalOcean Control Panel or through any other DNS provider.

To cancel setup, press Ctrl+C. This script will run again on your next login
Enter the domain name for your new Magento 2 site.
(ex. or do not include www or http/s
Domain/Subdomain name:

Further, you will be asked to enter the proposed data to create a new

admin account for Magento 2.

Now we will create your new admin user account for Magento.
Your Email Address:
Password: (Note! Your password must include both numeric and alphabetic characters)

Further, you will be asked to enter the proposed data to create an admin account for Magento 2. The next prompt asks if you want to use SSL for your website via Let’s Encrypt.

Note, before use SSL for your website your domain name must be propagated by DNS, otherwise Let’s Encrypt doesn’t validate it.

You will see the following message:

Next, you have the option of configuring LetsEncrypt to secure your new site.
Before doing this, be sure that you have pointed your domain or subdomain to
this server's IP address. You can also run Let's Encrypt certbot later with the
command 'certbot --apache'
Would you like to use LetsEncrypt (certbot) to configure SSL(https) for your
new site? (y/n):

Note. You can not configure SSL certificate later just using command 'certbot --apache' because Varnish using default 80 port. You must open file in /opt/digitalocean/ directory and find section with configure LetsEncrypt certificate to secure your site and run the commands described there to configure the SSL certificate.

Before installation process, you will be asked to enter your authentication keys from Magento Marketplace.

Authentication required (

To get your Public and Private key, you must follow instruction How to get your authentication keys. Use the Public key as your Username and the Private key as your Password.

Then you’ll see the installation process of Magento 2, where you can choose to install the sample data or not.

In the next section, you have to enter y to add data in env.php file for correct Varnish cache cleaning for your Magento 2 instance.

Overwrite the existing configuration for db-ssl-verify?[Y/n]
Overwrite the existing configuration for allow-parallel-generation?[Y/n]

After success installation, you will see the following message:

Installation complete. Access your new Magento site in a browser to continue.

After that, you can use the Magento 2 Admin Dashboard. For reference:

● The MySQL Magento user password is in /root/.digitalocean_password.

Note, the Droplet root user will not be prompted for the MySQL password.

● The web root is /var/www/html.

● You can get information about the PHP installation by logging into the Droplet and running php -i.

● For access Magento admin panel using “Username” and “Password”, which were introduced earlier.

Also, you can use phpmyadmin interface, just add /phpmyadmin to your domain name. For access use Magento MySql user name and password, that be kept in /root/.digitalocean_password.

Creating an Apache virtual hosts file for each site maintains the default configuration as the fallback, as intended, and makes it easier to manage changes when hosting multiple sites.

To do so, you’ll need to create two things for each domain: a new directory in /var/www for that domain’s content, and a new virtual host file in /etc/apache2/sites-available for that domain’s configuration. For a detailed walkthrough, you can follow How to Set Up Apache Virtual Hosts.

If you didn’t enable HTTPS during the initial setup script, you can enable it manually at any time after the fact.

Setting up an SSL certificate enables HTTPS on the web server, which secures the traffic between the server and the clients connecting to it. Certbot is a free and automated way to set up SSL certificates on a server. It’s included as part of the Magento 2 One-Click to make securing the Droplet easier.

To use Certbot, you’ll need a registered domain name and two DNS records:

● An A record from the domain (e.g., to the server’s IP address

● An A record from the domain prefaced with www (e.g., to the server’s IP addressAdditionally, if you’re using a virtual hosts file, you’ll need to make sure the server name directive in the VirtualHost block (e.g., ServerName is correctly set to the domain.

HTTPS traffic on port 443 is already allowed through the firewall. After you set up HTTPS, Varnish configuration will automatically redirect your site to your secure 'https' url.

For a more detailed walkthrough, you can follow How to Secure Apache with Let’s Encrypt or view Certbot’s official documentation.

You can serve files from the web server by adding them to the web root

(/var/www/html) using SFTP or other tools.

API Creation

In addition to creating a Droplet from the Magento 2 Open Source 1-Click App via the control panel, you can also use the DigitalOcean API.

As an example, to create a 4GB Magento 2 Open Source Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

  curl -X POST -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer '$TOKEN'' -d \
      '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"eltrino-magento2opensour-18-04"}' \

Support Details

Supported By:Eltrino
Hours:10 am to 10 pm
Support URL:

More DigitalOcean Links

DigitalOcean Community

Developers supporting developers

Ask a Question

Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.

List your 1-Click App in the DigitalOcean Marketplace

Partner with us to build traction for your open source project or software company