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 https://yourwebsite.com/ 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 https://www.ssllabs.com/ssltest/.

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: mycooldomain.com 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: ns.mycooldomain.com and point it to our host external IP, do the same for ns1.mycooldomain.com & ns2.mycooldomain.com

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 (mycooldomain.com) and add our own name servers we have created so add ns.mycoolserver.com & ns1.mycoolserver.com & ns2.mycooldomain.com

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

IMPORTANT! MAKE SURE THAT PORT 53 IN YOUR ROUTER IS REDIRECTED TO YOUR LOCAL IP WHERE YOUR SERVER IS RUNNING.

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 www.ehcp.net.

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.

Themes

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 http://www.ehcp.net/ehcp_latest.tgz

  • Next, extract the ehcp source tarball using following tar command.
# tar -zxvf ehcp_latest.tgz
  • Change to ehcp directory, then execute install.sh script.
# cd ehcp
# ./install.sh
  • 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.