Change MediaCP Domain Name

It is possible to change the domain name of the MediaCP by following the procedures below.

1. Disable AutoSSL

Firstly it is required to disable SSL services for the existing domain name.

Run the following via SSH as root user:

/root/init autossl-disable

Now also delete the letsencrypt folder to ensure there are no issues reinstalling the new certificate:

rm -rf /usr/local/mediacp/letsencrypt/;

2. Update Domain Name

2.1 Change via User Interface (recommended)

2.1.1 Login to the MediaCP via your new domain name (through HTTP), for example http://newdomain.com:2020/

2.1.2 Navigate to System Config on the left side menu

2.1.3 Change the MediaCP Full URL to http://newdomain.com:2020/ (make sure it is http:// and not https://)

2.2 Change via database (advanced user)

2.2.1 Login to your SSH service as root user.

2.2.2 Change "newdomain.com" from the below to your actual domain name, then run the line in the SSH terminal:

echo "UPDATE settings SET value='http://newdomain.com:2020/' WHERE setting='panel_url'" | /usr/local/mediacp/mysql/bin/mysql --protocol=SOCKET --socket=/usr/local/mediacp/mysql/data/mysql.sock --user=root --password= mediacp >/dev/null 2>&1

2.2.3 Change "newdomain.com" from the below to your actual domain name, then run the line in the SSH terminal:

echo "UPDATE settings SET value='newdomain.com' WHERE setting='host_add'" | /usr/local/mediacp/mysql/bin/mysql --protocol=SOCKET --socket=/usr/local/mediacp/mysql/data/mysql.sock --user=root --password= mediacp >/dev/null 2>&1

3. Install SSL

You can now configure SSL services on this domain using AutoSSL:

/root/init autossl

4. Reissue license key

  1. Login to our billing client portal
  2. Click on the Products tab
  3. Click on the relevant license
  4. Click on the Reissue button as displayed in the image below
  • domain, url, address, ssl
  • 14033 Users Found This Useful
Was this answer helpful?

Related Articles

Upgrade MySQL database from 5.6 to 8.0

There is a significant performance advantage by upgrading the MySQL service running on the...

OpenVZ virtualization

During the installation or upgrade of MediaCP you might receive the following notice: ERROR:...

Capture log files for troubleshooting

MediaCP log files for core application services are stored at /usr/local/mediacp/log/ and are...

There is not enough space on this disk to backup the MediaCP and contents

While performing a backup (either automatic or manual) you may encounter the error message below:...