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
- Login to our billing client portal
- Click on the Products tab
- Click on the relevant license
- Click on the Reissue button as displayed in the image below