Xojo Cloud details

Statistics

../../_images/xojo_cloud_details_xojo_cloud_server_statistics.png

You can get statistics for your Xojo Cloud Server and its running apps from the Xojo IDE (2018r1 or later). To display the Statistics window, open any Web project, select Xojo Cloud in the Build Settings, select your Server and then click the Show button next to the Statistics property.

Use the drop-down in the window to show stats for the apps you have running on the server.

You may need to first deploy an app to Xojo Cloud before statistics will be available.

Firewall

When using classes that have to communicate outside the server (database or socket classes, for example), you need to use the XojoCloud.FirewallPort class to first open the port.

Var fwp As New XojoCloud.FirewallPort(587, XojoCloud.FirewallPort.Direction.Outgoing)
fwp.Open() // This call is synchronous
If fwp.isOpen() Then
  // Do what you need to do
  fwp.Close() // Close port when done
End If

Installing fonts

To install your own fonts, use SFTP to copy them to the Fonts folder of the home directory.

Using a XojoCloud.net subdomain

If you would like to provide your users with a simple URL to use to access your app, you can use a subdomain of the xojocloud.net domain. To do this: 1. In the Xojo IDE, Click on Xojo Cloud in the Build Settings section of the Navigator.

  1. In the Inspector, enter a name in the Domain Name field.

What you enter will be a subdomain of xojocloud.net. For example, if you enter "MyApp", the URL you would then give to your users to access your app would be myapp.xojocloud.net.

Subdomains must be unique so should the name you choose already be taken, Xojo will indicate this and ask you to choose another name.

Pointing your domain or subdomain at a specific Xojo Cloud app

As with using a xojocloud.net subdomain, enter the full domain name or subdomain and full domain name into the Domain Name field in the Inspector to point that domain or subdomain at your app.

Domain name redirection

When you sign up for a Xojo Cloud account, you are assigned an IP address for your server. To point a domain at it, you have to go to the registrar for you domain and add an "A" record to the DNS settings and point it to your server's IP address. The specific steps for this vary depending on your registrar.

Once this change propagates (which can take several hours depending on a variety of factors), you'll be able to access your server using your domain name. Currently Xojo Cloud web apps require the directory of the web app in the URL. This means that the even after mapping the domain name, the actual URL will have to look like something like this:

But with a little bit of HTML, you can redirect the main domain to a specific web app.

For example, say you want https://demos.xojo.com to automatically display the EEWeb app. You can create an index.html file with this HTML:

<head><meta http-equiv="refresh" content="0; url=https://demos.xojo.com/EEWeb"></head>

Use SFTP to upload it to the "Web Applications" location on your Xojo Cloud server.

Now, the url https://demos.xojo.com automatically displays the EEWeb example. Note that after the redirect, the full URL (including the directory) will appear in the browser address bar.

Alternatively, you can use JavaScript in an index.html page to redirect similarly:

<SCRIPT language="JavaScript">
     window.location="https://app1.mydomain.com/red";
</SCRIPT>

You can only use this technique to redirect to a single web app.

Server date and time

All Xojo cloud servers are GMT 0 and do not use daylight savings time.

Available memory

You can check the available memory for a Xojo Cloud server in the Xojo Cloud Statistics window.

Xojo Cloud specific code

You can use the TargetXojoCloud constant to isolate code that should only run when the web app is running on Xojo Cloud. For example:

#If TargetXojoCloud Then
  // Running on Xojo Cloud
#Else
  // Not on Xojo Cloud
#End If

File access

Use the SpecialFolder module to get access to specific folders in Xojo Cloud. These are the valid methods (all others return Nil on Xojo Cloud):

  • Fonts

  • SharedDocuments: The web server Shared_Documents folder.

  • Documents: The Documents folder within the web app folder.

  • Temporary: The web server tmp folder.

For example, to get to a file in the Shared_Documents folder:

Var myFile As FolderItem = SpecialFolder.SharedDocuments.Child("MyFile.txt")

Using external apps and libraries

If you have an external (command-line) app that you'd like to use with your deployed web app, you can copy it to the Shared_Documents folder (SpecialFolder.SharedDocuments) using SFTP, set its permissions to "execute" and then launch it using a Shell from your Xojo web app. This external app must be compiled to work with 32-bit CentOS and must be self-contained in order for it to run on Xojo Cloud.

You can also install Linux libraries (32-bit, CentOS) into the Shared_Documents folder so that you can call them using the Declare command.

Static content

Xojo Cloud uses the Apache web server so it can also serve up static content such as images and HTML. Any static content should be placed in the web folder on the Xojo Cloud server in order for it to be accessible.

Updates

Xojo Cloud is a transparent maintenance service. There is a support and SLA policy, but all security updates, firewall configuration, etc. are done for you. Upstream providers are white labeled, and may change in the future. As a transparent maintenance service, Xojo Cloud does not offer a general change log or upstream provider communication chain.