WPCloudDeploy Documentation

Custom Servers (Bring Your Own Server)

The Bring Your Own Server add-on allow you to use any server at any cloud provider – even if we don’t directly support the provider.  You can even use bare-metal servers.

However, the servers must  meet our requirements and you might need to exercise a little of your command-line skills in order to initialize the connection to WPCloudDeploy.

Note: even though the add-on is named “Bring Your Own Server”, all the screen elements use “Custom Server” as the label for this feature set.

Using a custom server is a three step process:

  1. Prepare your server
  2. Connect your server to WPCD
  3. Deploy your server

Here’s a quick video overview:

Installation

The Bring Your Own Server add-on is just a regular WordPress plugin – upload and activate it from the WordPress PLUGINS screen.

Server Requirements (Preparing Your Server)

Your custom server must meet the following requirements:

  • Have a basic installation of Ubuntu 20.04 LTS or Ubuntu 22.04 LTS (no other software such as nginx, php etc. should be installed.)
  • The “root” user must have an SSH certificate installed and you should be in possession of the related private key.
  • The server must be publicly accessible across the internet and you must know its public IP.
  • It must have its SSH port open (port 22)
  • HTTP and HTTPS ports (80 and 443 respectively) must be opened as well.

The most difficult aspect of these requirements is making sure that the “root” user is configured with an SSH key-pair.  If you’re using a cloud-provider such as UpCloud, they can automatically install a key-pair for you (after you’ve uploaded the key-pair to their dashboard).  Otherwise you will need to install the key-pair yourself (this article discusses how to install a public key for your root user.)

Once your server meets these requirements, you can follow the section below to connect it to WPCD.

Connecting The Server To WPCloudDeploy

A custom server is treated as if it is it’s own cloud service.  When you installed the add-on it added a single new cloud provider in the Cloud Settings screen titled “Custom Server”.

  • Go to the WPCLOUDDEPLOY → SETTINGS → CLOUD PROVIDERS tab.
  • Click on the CUSTOM SERVER Tab.
  • Enter the IP address of your server.
  • Enter any value into the API key field
  • Enter the user id of the root user – this is usually “root”.
  • Enter some descriptive text for the region, server size and the SSH key – these take the place of similar data we would normally be pulling from a real cloud service.
  • Click the SAVE SETTINGS button.
  • Click the SAVE SETTINGS button Again.
  • You should now see the section requesting your PRIVATE SSH key for the root user so fill that in.
  • Click the SAVE SETTINGS button.

Deploying Your Custom Server

After following the Connecting The Server To WPCloudDeploy section above, you can finally deploy the server.  This is done just like any other server.

  • Go to the WPCLOUDDEPLOY → ALL CLOUD SERVERS.
  • Click the DEPLOY A NEW WORDPRESS SERVER button at the top of the screen.
  • In the PROVIDER drop-down you should see Custom Server as an option – choose that.
  • Give the server a name.
  • Click the DEPLOY button.

As long as the server meets the restrictions set out in the Server Requirements section above, the server should be provisioned just like any other cloud server.

Deploying Additional Custom Servers

To deploy additional custom servers you need to create a virtual cloud provider for each server.  Do not try to reuse or change the data in the CUSTOM SERVER provider that you’ve already used – that will break the link to the existing server.  Each custom server is treated as if it were a separate and unique cloud provider.

Notes

  • As you might expect, certain functions that work on real cloud services do not work on custom servers because there is no API available for your custom server.  For example, the UPDATE REMOTE STATE link in the server list will always return the server as being active even though you might have powered down the server.
  • Depending on how your server provider configured the default UBUNTU installation, automatic security updates may not be available.

Common Errors

sudo: unable to resolve host

When deploying a custom server, you might see messages such as sudo: unable to resolve host ….

This is usually because the machine name is not set in the Linux configuration files.  Assuming your machine name is something like ssdnodes-5ff4a61dd6ce4, you should check the following:

  • That the /etc/hostname file contains just the name of the machine.
  • That /etc/hosts has an entry for localhost. It should have something like:
127.0.0.1 localhost
127.0.1.1 ssdnodes-5ff4a61dd6ce4

Certain Providers (especially low-end providers) such as ssdnodes and pacificrack do not set some of these entries so you must add them yourself.


 

Share: