UpCloud is a reliable cloud platform that enables you to deploy high performance cloud servers quickly and easily. Thanks to UpCloud integration with HostBill you can sell VPS Hosting by reselling UpCloud instances. With HostBill various billing models and flexible product configuration options you can charge your customers for OS templates, locations or VM plans. The whole account lifecycle is automated by HostBill. Clients are able to control and manage their resources from the client area. The access to client area functions is controled by the admin. Client can create, restart, start and stop their virtual machines, inject SSH keys, manage virtual machine’s firewall and access noVNC console. Admin area provides access and allows to manage billing details and account lifecycle.
4. Verify entered credentials by clicking Test Connection to check if HostBill can connect
5. Save Changes
HostBill module for upCloud provide optional noVNC console for your clients. Since upCloud does not provide websocket, but novnc console through API it's important to setup a Websockify on server where HostBill resides.
Namely: https://github.com/novnc/websockify with configured https://github.com/novnc/websockify/wiki/Token-based-target-selection
Guide below provides sample websockify installation on CentOS 7:
Start by installing fortran & git:
yum -y install numpy python-devel gcc-gfortran git |
Create new system user, clone websockify and grant permissions.
Replace {$path} with the value set in the "Path to put websockify tokens" in HostBill connection details. In this sample we've used: /home/websockify/target.conf.d)
adduser websockify cd /home/websockify git clone https://github.com/novnc/websockify.git cd /home/websockify/websockify python setup.py install --force mkdir {$path} chmod 0777 {$path} chown -R websockify: /home/websockify |
Create cronjob as websockify user (crontab -e -u websockify), with following line replacing variables:
*/5 * * * * /home/websockify/websockify/run {$console_port} --token-plugin TokenFile --token-source {$path} |
On server running websockify ensure to open TCP out ports 20000-65535 (as its being used by actual console) |
If your HostBill is installed using enterprise install script, or you're using Nginx in your setup:
Create file: /etc/nginx/conf.d/websockify.conf
with contents:
upstream websocket { server 127.0.0.1:{$console_port}; } server { listen {$port} ssl; server_name {$hostname}; server_tokens off; charset utf-8; sendfile on; tcp_nopush on; tcp_nodelay off; reset_timedout_connection on; include /etc/nginx/ssl.conf; location / { proxy_http_version 1.1; proxy_pass http://websocket; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-NginX-Proxy true; proxy_buffers 8 32k; proxy_buffer_size 64k; proxy_redirect off; proxy_read_timeout 61s; } ssl_certificate /etc/letsencrypt/live/{$hostname}/fullchain.pem; # replace with path to actual certificate your installation is using ssl_certificate_key /etc/letsencrypt/live/{$hostname}/privkey.pem; # replace with path to actual certificate key your installation is using } |
Ensure to restart nginx afterwards (systemctl restart nginx)
In your apache configuration file:
<VirtualHost *:{$port}> ServerName {$hostname} ProxyPass / ws://127.0.0.1:{$console_port}/ ProxyPassReverse / ws://127.0.0.1:{$console_port}/ SSLEngine on </VirtualHost> |
Restart/reload webserver
If your HostBill is installed on cPanel server:
Create custom apache file (replace username and hostbill.domain with your actual username/domain) /etc/apache2/conf.d/userdata/ssl/2_4/username/hostbill.domain/custom.conf:
ProxyPass /wss ws://127.0.0.1:{$console.port}/ ProxyPassReverse /wss ws://127.0.0.1:{$console.port}/ |
You can optionally use "Allow to select by client during checkout" checkbox. |
For more generic product configuration details including price, automation, emails settings refer to Product Configuration article.
In Products & Services → Your Order Page → Your Product → Client Functions you can control what features customer will have access to in client portal, by clicking Enable/Disable next to the given option.
Use Edit button to adjust function appearance in the client portal.
For UpCloud you can enable a number of standard client functions: