Hosting panel on your own domain¶
In this article
The control panel can be hosted on your server instead of being called from the HOSTKEY domain.
Note
Customize the panel layout to your liking by editing its HTML file.
Easy placement of the Panel file on your domain¶
-
Download the panel code and place it on your server:
Note
The latest version of the control panel can be downloaded from the GitHub repository.
-
Set the API path using one of the following methods:
- Call the panel using the predefined API path passed through the
base
variable
or
- Replace the variable
g_base_url
in the filecontrolpanel.html
with
- Call the panel using the predefined API path passed through the
Proxy access through nginx¶
To hide HOSTKEY server information from the user while the control panel is running, position the panel as follows:
-
Download the panel code and place it on your server:
mkdir /opt/panel cd /opt/panel curl -L -o controlpanel.html https://invapi.hostkey.com/controlpanel.html
Note
The latest version of the control panel can be downloaded from the GitHub repository.
-
Create a configuration file named
hostkeycp.conf
in the/etc/nginx/conf.d
directory. The file should contain the following information, replacing<your-domain>
with the name of the domain bound to your server: -
Add a line to the
http
section of the/etc/nginx/nginx.conf
file: -
If the
/etc/nginx/nginx.conf
file is missing theinclude /etc/nginx/conf.d/*.conf;
line, add a line to thehttp
section: -
Verify that the configuration is accurate and reload the nginx configuration:
After configuring these settings, accessing the URL https://<your-domain>/controlpanel.html?key=<API server key>
will open the control panel for the specified server.