Install web-server on Ubuntu 20.04 server

We will show you how to install a web-server with EHCP Force Edition and Webmin control panel. 

NOTE:  Your ISP might block ports needed to run a Webserver, check with them first to see if they block ports, also your will need a public IP address. 

( EHCP Force Edition supports dynamic IP addresses by installing EHCP Force Edition on your home server, and then use Dynamix & its client software on your server to setup and use dynamic DNS. )

Your will also need to open ports on the rougher and port forward them to the IP address you are going to use for the server.  (You need to open ports 20,21,22,25,53,80,110,143,443,10000 on your server and on your modem/firewall/router. If you have no firewall on your server, you don’t need to do anything on your server.)

We are assuming you have followed the instructions on “Installing Ubuntu 20.04 server on VirtualBox” and this is a follow on from that post.

SSH into your server and go to the root dir using sudo -i

Installing webmin

First you will need to add need to add the Webmin repository so that we can install and update Webmin using our package manager.  To do this you will need to edit the Sources.list

Open the file in your preferred editor. We will use nano

  • sudo nano /etc/apt/sources.list

Then add this line to the bottom of the file to add the new repository:

  • deb sarge contrib

Save the file and exit the editor. If you used nano, do so by pressing CTRL+X, Y, then ENTER.

Next, you’ll add the Webmin PGP key so that your system will trust the new repository. 

Following that, download the Webmin PGP key with wget and add it to your system’s list of keys:

  • wget -q -O- | sudo apt-key add

Now to update and install

  • sudo apt update
  • sudo apt install webmin
Once the installation finishes, you’ll be presented with the following output:
Webmin install complete. You can now login to https://your_server:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
I have always had to use the server IP address and not the server name so change the name to the IP address of the server.
Note: If you installed and enabled ufw during the prerequisite step, you will need to run the following command in order to allow Webmin through the firewall:
  • sudo ufw allow 10000
 For extra security, you may want to configure your firewall to only allow access to this port from certain IP ranges.

Installing Easy Hosting Control Panel - Force Edition

1st your will need to change the IP address to a Static configuration, to do this we will use Webmin.

Login to webmin by typing in HTTPS://YOUR_SERVER IP_ADDRESS:10000,

go to Networking – Network Configuration – Network Interfaces

click on the Bootup Interface and change it to a  Static configuration. Add the IP Address you would like to use (E.g. 192.168.??.??), and the netmask of

Now Save and go to Routing and Gateways, change the Gateway to you rougher address.

Now go to Hostname and DNS Client change the DNS to and

Save and Apply Configuration, Clicking the button to activate the current boot-time interface and routing settings, as they normally would be after a reboot. 

Be careful if you have a different IP address then the one in the address field, this may make your system inaccessible via the network,  and cut off access to Webmin.


Install EHCP

Download & Install EHCP Force Edition (Stable)

To download and install the latest “stable” version of EHCP Force Edition, use the following commands at the terminal prompt:

  • wget -O “ehcpforce_stable_snapshot.tar.gz” -N
  • tar -zxvf “ehcpforce_stable_snapshot.tar.gz”
  • cd ehcp
  • sudo bash

You can Install EHCP Force Edition in unattended mode (installs all software without prompts and generates passwords) you will need to make note of the passwords if you use this, I personally don’t like this mode as I like to use password I can remember, but if you use passwords you generate make sure they’re strong. 

Add a working email – this is needed to send warnings etc…

Install extra software in addition to EHCP Force Edition – you may choose to do this but it will take extra space, time to install, and can slow down your server. I don’t install them.

Now sit back and wait…

After the install, you will have a working web server, you can access by adding your server IP in the address line of the web browser, but there are still some things you need to do finish the webserver off. 

Let’s look at that now….

  • EHCP Setup

Installing Ubuntu 20.04 server on VirtualBox

  • VirtualBox installed
  • Download Ubuntu 20.04 server

Downloading Ubuntu 20.04 server

Setting up VirtualBox

1st Create a Virtual Machine by going to Machine – New or press crtl N

Add the Name of the Machine E.g. server, change the type to Linux and Version to Ubuntu (64-bit)


MEMORY SIZE  – Set the Memory size, for now,use 1024MB you can change it later if you need to. 


HARD DISK –  again use the default, Create a virtual hard disk now and click on Create. 


Now we or going to use Dynamically allocated – A dynamically allocated hard disk file will only use space on your physical hard disk as it fills up (up to a maximum fixed size). – NEXT

Set it to 60 GB – click on Create.

Now it will appear on the right hand side of the main interface.



Click on your server which should change color to indicate that you have selected it. Click on the Setting button, on the top of the main interface on the left-hand side. 

Go to Network and change the Attached to: to Bridged Adapter.

Now click on Storage under the Controller: IDE you should see an Empty disk, select it, and now on the right hand-side  you should see Attributes – Optical Drive:  click on the Disk Icon on the right and choose a disk file.  Navigate to the Ubuntu-20.04 File select it and Open. Now the Controller: IDE should show the Ubuntu 20.04 file.

Click on OK


Start your server

Now you should be able to start your server.  Press Start, it will open a box to run the server in, (you will need to use the keyboard to navagate, the mouse will not work) now you should  boot to the welcome screen, select your language,  and [update to new installer].

When it’s finished the update click done. Now you should be on the Network connections page. Make a note of the DHCP IP address you will need it later, click Done.  If you use a Proxy set the address now, if your saying whats a Proxy leave it blank.  Click Done.

Ubuntu archive – Click Done

Storage Configuration – Use the tab button on your keyboard to highlight the Done button and click it.  and Done again on the next screen. tab button to highlight continue and press it.

Now answer the questions, 

for the server’s name use lower case and no spaces.  

Done when finished.  

SSH Setup

Now press your space bar to put an X in the Install OpenSSH server and tab to Done.

Featured Server Snaps

If you know you will need any on the list use tab and space to select, else go to Done.  

Now make a coffee and wait… 

When done Reboot

Using SSH to Access you server.

Now when your server has rebooted open a Terminal. We use Linux mint so we press Ctrl alt T, but if you use windows you will need to install third-party application called PuTTY.

For PuTTY – Type the host name or IP address of the SSH server into the “Host name (or IP address)” box. Ensure the port number in the “Port” box matches the port number the SSH server requires,  port 22 by default, Click “Open” to connect.

For Linux Terminal type the following.


For me that would be the following….

ssh -l myusername

Type yes for the fingerprint, and type in the password you setup for your server. 



Update the server

Update the server before installing  software, in the teminal type the following…

  • sudo -i
  • apt update
  • apt full-upgrade
This might take some time… 
When finished your ready to install the server software… 


  1. Install web-server

Certbot Commands

List All Certificats

  • certbot certificates

Delete a Certbot SSL Certificate

  • certbot delete –apache -d

This command will offer an index from which you can select the domain name

  • sudo certbot delete
  • To delete a Certbot certificate by including the domain name in the command like this:
  • certbot delete –cert-name

Issue or Renew an SSL certificate

The –force-renewal, –duplicate, and –expand options control Certbot’s behavior when re-creating a certificate with the same name as an existing certificate. If you don’t specify a requested behavior, Certbot may ask you what you intended.

–force-renewal tells Certbot to request a new certificate with the same domains as an existing certificate. Each domain must be explicitly specified via -d. If successful, this certificate is saved alongside the earlier one and symbolic links (the “live” reference) will be updated to point to the new certificate. This is a valid method of renewing a specific individual certificate.

–duplicate tells Certbot to create a separate, unrelated certificate with the same domains as an existing certificate. This certificate is saved completely separately from the prior one. Most users will not need to issue this command in normal circumstances.

–expand tells Certbot to update an existing certificate with a new certificate that contains all of the old domains and one or more additional new domains. With the –expand option, use the -d option to specify all existing domains and one or more new domains.

  • certbot –expand -d,,
  • certbot –apache -d

Revoking certificates

If your account key has been compromised or you otherwise need to revoke a certificate, use the revoke command to do so. Note that the revoke command takes the certificate path (ending in cert.pem), not a certificate name or domain.

  • certbot revoke –cert-path /etc/letsencrypt/live/CERTNAME/cert.pem

You can also specify the reason for revoking your certificate by using the reason flag. Reasons include unspecified which is the default, as well as keycompromise, affiliationchanged, superseded, and cessationofoperation:

  • ertbot revoke –cert-path /etc/letsencrypt/live/CERTNAME/cert.pem –reason keycompromise

Additionally, if a certificate is a test certificate obtained via the –staging or –test-cert flag, that flag must be passed to the revoke subcommand. Once a certificate is revoked (or for other certificate management tasks), all of a certificate’s relevant files can be removed from the system with the delete subcommand.


If you don’t use delete to remove the certificate completely, it will be renewed automatically at the next renewal event.

This site works only in browsers with SNI support


If you have a shared hosting, a cloud or virtual or dedicated server or service hosting multiple domains, it is normal to face the message.

This site works only in browsers with SNI support.

It’s not an error, it’s a warning message.

It is a thing related to IPv4 and initial days with TLS. We are trying to explain the implication of the error message and in very short, for ordinary websites like a personal website such error in general has no negative impact.

Number of IPv4 is limited and IPv6 unfortunately not so much popular yet. 

Server With SNI, can enable multiple SSL certificates on a single IP.

Some websites have one IP = Website, you can imagen that will use limeted IP address fast,  so we use SNI. SNI stands for server name indication, this means that one IP on a server can open multiple domains, then obviously the IP will not open one website.

So if you see this warning message it means that your website is on a server that is using SNI.


Installing Certbot on Ubuntu 20.04

  • Step 1 – Installing Certbot

Certbot is a tool to obtain certificates from Let’s Encrypt and configure on your web server. Snap package is the easist way for installing certbot on Ubuntu system.

You might have to run this first…

  • sudo apt update
  • sudo apt install snapd
  • sudo snap install snap-store

Open a terminal and execute below command to install certbot:

  • sudo snap install --classic certbot

if you get an error you can try

  • sudo apt install fuse squashfuse

Snaps rely on certain Linux kernel features which are not available under containerized servers like those running under openvz, so if you get an error use,  sudo apt install certbot

Step 2 – Generate SSL Certificate

Now, You can request SSL certificates from Let’s encrypt based on the web server.

  1. Apache – The systems running Apache web server, execute the following command. This will list all the domains/sub-domains configured on your web server. Select appropriate numbers to request certificate.
    sudo certbot --apache 

    We also use the following to install on a domain.

    sudo certbot - apache -d
  2. Nginx – For the systems running Nginx web server, use below command to request for the SSL certificates.
    sudo certbot --nginx 
  3. Other Web Server – For the system having any other web servers running except Apache or Nginx. Then you can get the certificate only and configure them manually.

    This command will ask you for domain name and document root for the domain.

    sudo certbot certonly --webroot 
  4. No Web Server – The systems have no web server running, can also request a ssl certificate. Below command will ask your for the domain name and start a temporary web server on port 80 to complete the verification.
    sudo certbot certonly --standalone 

In all of the above cases, the domain must be pointed to your server from dns. Also insure that /.well-known/acme-challenge are served by the webserver.

Step 3 – Test SSL

Once the SSL certificate is installed on the web server, visit in a web browser and look for the SSL lock icon in the URL bar. You can also do a security scan for the SSL setup on


Step 4 – Renew SSL Certificate

Let’s encrypt certificates are issues for 3 months only. You can renew certificate before 30 days of expiry. Certbot allows you a hassle free renewal just by running a single command.

Run the below command to renew all the certificates on that system.

sudo certbot renew 

You can also run a dry run without actual renewal. This will help you to test if SSL renewal perform well.

sudo certbot renew --dry-run 

Certbot not installing ssl certificate with “sudo certbot renew”

If Certbot fails when using “sudo certbot renew”

And you get this….

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.

Try make the changes to your Apache configuration by hand, and run this command.

sudo certbot certonly --apache

This has work for us 99% of the time.

SSL Will not renew with EHCP – let’s encrypt

If the auto renew is not working on EHCP, to renew your SSL certificates you are best using certbot.

Certbot Instructions for Apache on Ubuntu 18.04 LTS (bionic)

  1. SSH into the server

    SSH into the server running your HTTP website as a user with sudo privileges.

  2. Add Certbot PPA

    You’ll need to add the Certbot PPA to your list of repositories. To do so, run the following commands on the command line on the machine:

    1. sudo apt-get update
    2. sudo apt-get install software-properties-common
    3. sudo add-apt-repository universe
    4. sudo add-apt-repository ppa:certbot/certbot
    5. sudo apt-get update
  3. Install Certbot

    Run this command on the command line on the machine to install Certbot.

    sudo apt-get install certbot python3-certbot-apache
  4. Choose how you’d like to run Certbot
    • Either get and install your certificates…

      Run this command to get a certificate and have Certbot edit your Apache configuration automatically to serve it, turning on HTTPS access in a single step.

      sudo certbot --apache
    • Or, just get a certificate

      If you’re feeling more conservative and would like to make the changes to your Apache configuration by hand, run this command.

      sudo certbot certonly --apache
  5. Test automatic renewal

    The Certbot packages on your system come with a cron job or systemd timer that will renew your certificates automatically before they expire. You will not need to run Certbot again, unless you change your configuration. You can test automatic renewal for your certificates by running this command:

    sudo certbot renew --dry-run

    The command to renew certbot is installed in one of the following locations:

    • /etc/crontab/
    • /etc/cron.*/*
    • systemctl list-timers
  6. Confirm that Certbot worked

    To confirm that your site is set up properly, visit in your browser and look for the lock icon in the URL bar. If you want to check that you have the top-of-the-line installation, you can head to

Step by step setup of DNS Nameservers for EHCP with Godaddy registrar.

Register or use an existing domain at GoDaddy account and then go to our domains list, select the DNS for that domain you are going to use Example: Scrole down to the bottom of the page and click on Host names.

Click on add and a popup will appear we create the first Host name: and point it to our host external IP, do the same for &

For .com domains godaddy says it takes 5-6 hours to process and up to 24h for .net so be patient.

Now we can go to the name servers section of the domain ( and add our own name servers we have created so add & &

Third, config EHCP
Login admin account to EHCP and go to “Add DNS only” here we add the [domainname] we have setup at Godaddy “” and [serverip] our external IP then we save/send query.


BASIC PORTS we need to forward to our local IP:

– 20 TCP FTP – data transfer
– 21 TCP FTP – control (command)
– 25 TCP Simple Mail Transfer Protocol (SMTP)—used for e-mail routing between mail servers
– 53 TCP/UDP Domain Name System (DNS)
– 80 TCP/UDP Hypertext Transfer Protocol (HTTP)
– 143 TCP-UDP Imap protocol – Imap on port 143 is the newer of the two popular protocols used to retrieve eMail from remote mail servers.
– 443 TCP Hypertext Transfer Protocol (HTTPS)

Now we can register a domain from any registrar and add the name servers we provide: NS.MYCOOLDOMAIN.COM ECT then add the domain in the EHCP panel and that’s it!

EHCP Force Edition

EHCP Force Edition is a forked version of the original EHCP.  The original version can be downloaded and installed from

The Force Edition slightly differs from the original version.  In fact, both the lead developer of the original EHCP release and  the  developer of Force Edition collaborate on updating EHCP and fixing bugs.  In this version, custom FTP accounts to a custom file path can be created.  Also, php chmod and FTP chmod should both work out-of-the-box since the Apache user has been changed.  The code is managed and maintained within SVN (it is not in the original EHCP).  As new versions of Ubuntu are released, the Force Edition is quickly updated to work with the latest versions of packaged software within the main repositories.


EHCP Force Edition Easy Hosting Control Panel Main Theme Screenshot
(Epic V2 Theme)

The EHCP control panel comes with many graphical themes that users of the control panel can switch between and use.  The Force Edition’s default theme is picante, created and easily maintained.

EHCP – Easy Hosting Control Panel

EHCP (Easy Hosting Control Panel) is an open source and very effective Hosting Control Panel that offers you to host any websitescreate ftp accountsemail accountssub domains and so on. Ehcp is the only first hosting control panel was written using PHP programming language and available for free.

It offers all major hosting control panel features such FTP AccountsMySQL DatabasesPanel UsersResellersMailBox with Squirrelmail and Round Cube etc. It is the only first control panel that provides built in support for Nginx and PHP-FPM with completely throw out Apache and gives better performance for low end servers or VPS.

EHCP Features

  1. Complete php, free opensource, easily customizable and more free templaes.
  2. Unlimited resllers, user accounts, ftp accounts, email accounts, mysql and domains.
  3. Management of DNS, domains, subdomains, ftp, mysql, email etc.
  4. Domains password protected, Email forwarding, autoreply etc.
  5. Website analytics with webalizer and ftp with net2ftp.
  6. One click third party script install.
  7. User Disk quota control, SSL suport, custom http redirects, domain aliases, domain redirect.
  8. Different langauge support and template supports with few languages.
  9. Server backup and restore including files and databases.

This article will help you to install and setup Easy Hosting Control Panel on RHELCentOSFedoraUbuntuLinux Mint and Debian systems. Please note ehcp can be installed on a fresh installation of Linux. The ehcp installation is quite simple and easy, a new user won’t face any issues while installing it at the first time.

How to Install EHCP (Easy Hosting Control Panel)?

  • First, login as root user using ssh and download the latest EHCP (current available version is 0.32) source tarball package using wget command.
# wget

  • Next, extract the ehcp source tarball using following tar command.
# tar -zxvf ehcp_latest.tgz
  • Change to ehcp directory, then execute script.
# cd ehcp
# ./
  • Go through the installation setup and read the instructions carefully. The install script will install all needed packages including ApacheMySQLPHPPostfix and so on. During installation it will ask you to enter some information to configure services and set ehcp admin passwords. The installation setup takes up-to 50-60mins, depending upon the internet speed.
  • It is highly, recommended you to set a MySQL ‘root‘ password for MySQL administration.
  • Repeat MySQL password for ‘root‘ user.
  • Please select the best mail server configuration that suits your needs. We  selected ‘Internet site‘, mails are sent and receive using SMTP service.
  • Set the system mail domain name.
  • Create directories for web-based mail administration. Click on ‘Yes‘.
  • Create SSL certificate for POP and IMAP. Click on ‘Ok‘.
  • Please select your web server that automatically configured to run phpMyAdmin.
  • Configure phpMyAdmin database.
  • Set MySQL ‘root‘ password for phpMyAdmin.
  • Please give a phpMyAdmin password to register with database server.
  • Password confirmation.
  • Next, configure roundcube database.
  • Please select the database type that used by roundcube. In my scenario, I’ve selected MySQL database for roundcube.
  • Please provide MySQL password for roundcube.
  • That’s it, installation finished.
  • Now navigate to the Web browser window and enter IP address of your server.
  • Click on the link that says ‘Click here for the control panel on your server‘.
  • Enter ehcp login details, default admin username is ‘admin‘ and default admin password is ‘1234‘. If you’ve set new admin password during installation enter that password.
  • Ehcp Control Panel Dashboard.
WordPress Appliance - Powered by TurnKey Linux