Hosting 3CX on Google Cloud
On this topic
Setting up Google Cloud
In order to be able to create virtual machines hosted by Google a Google Cloud Platform account needs to be created:
- Login to your Gmail Account
- Go to https://cloud.google.com
- Enter the “Try it Free” program and complete the registration.
Installing the Google Cloud SDK
Now you need to Install the Google Cloud SDK on a Windows machine. This enables you to run scripts against your Google Cloud account:
- Download the SDK from here https://cloud.google.com/sdk/docs/quickstart-windows
- Complete the setup and first time initialization of the SDK.
- IMPORTANT: during the “init” you set the default “project” to the account you created above. The “project ID” is shown in the dashboard of the Google Cloud Platform. Double check that this is the one that has been pre-populated.
Verifying your Google Cloud SDK setup
Now check that all is installed and working:
- Open a CMD and enter: gcloud auth login
- A browser window will open and you will be prompted to choose the associated google account. This must be an administrator or owner of the above project!
- After this, the machine is authenticated and the Google Cloud SDK can perform actions in the Google Cloud Service on behalf of your account.
Enabling Compute Engine API
In order to programmatically create instances the “Compute Engine API” must be enabled.
From the Dashboard, select the API Manager -> Library -> Compute Engine API -> Enable
Once enabled the API state should look like this.
Creating the Google Cloud instance
You are now ready to run the script that will create the Google Cloud instance for 3CX. This script will create a debian vm in your google cloud account.
- Download this sample script and extract the ZIP content into a folder.
- Run createinstance.bat
- The script will ask for a name for the VM.
- Select in which location to create the instance. Select the closest location to you:
- USA Central
- USA East
- USA West
- Europe (West)
- Asia (East)
- Select what size of VM you want. Small is sufficient for up to 8/16 sim calls, standard for up to 32 sim calls, high for larger.
- The script will now create the VM, assign a public IP, boot the machine, validate/update firewall rules and install 3CX. This should take between 2 and 4 minutes.
- When ready, the script will automatically launch your browser. You can now proceed to configure 3CX using the configuration tool documented here.
Within the ZIP we have also included a script “createinstance24h.bat” which creates a VM for 24 hours only. Note that the public ordered IP address will not be deleted with the VM and will be billed while not in use!
Outbound Mail (SMTP)
Google Compute Engine does not allow outbound connections on ports 25, 465, and 587. In order to allow outbound mails from 3CX (while hosted on Google Compute Engine) a mail server is requiered to relaying mails for your domain on a non standard SMTP port. More information can be found here: https://cloud.google.com/compute/docs/tutorials/sending-mail/
- Read here how to Set up 3CX on OVH
- Follow the steps to Install 3CX on Debian Linux 8 (Jessie)
- Learn more V15 Administration Manual
- For useful guides visit the 3CX Configuration Guides and Important Help Docs