Web App Deployment Overview
From Xojo Documentation
There are two ways to deploy web apps created with Xojo: Standalone and Xojo Cloud. You can deploy your web apps to Virtual Private Servers (VPS) with proper configuration. Shared Hosting typically does not work due to general lack of configurability. For the simplest hosting and deployment experience with built-in SSL, one-click deployment and database support, you should consider using Xojo Cloud.
Note: Deploying a web app as a CGI is no longer supported as of Xojo 2020r1.
Server Configuration Help
Xojo does not provide support for configuring your own web server to run Standalone Xojo web applications. If you require easy, one-click deployment of your Xojo web apps consider using Xojo Cloud. These topics give an overview of what is required, but many things can vary between web servers.
Launching Your App On Your Server
A Standalone web app is an app that you manually run on your server. Once you transfer the app to the server, you have to start the app (usually from the command line) and leave it running in order to people to access the web app. In addition, a Standalone web app is accessed through a port, which you specify when building the app. Essentially, a standalone web app consists of both the web server and your web app.
To start a web app, use the command line. In its simplest form, you can just type the name of the web app:
You can also change many setting using command-line options. This command starts the web app on a specific port:
For more information about command-line options, refer to the Deployment Details page.
A deployed web app would be accessed with a URL such as this that includes the port:
Xojo Cloud is for those that want the fastest and easiest way to deploy web applications. Xojo Cloud is a fully managed, highly secure hosting environment for your Xojo web apps and has these features:
- Excellent security with free SSL support
- One-click deployment directly from Xojo
- Automatic Load Balancing to support the more concurrent users
- Domain and Subdomain support
- Remote Server and Application Monitoring
- SFTP support
- Remote Database Access
- Unlimited app deployments (CPU, disk space and memory permitting)
Refer to the Xojo Cloud topic for more information.
If you decide not to use Xojo Cloud, your web app can be compiled for any of the OS platforms supported by Xojo. When it comes to web servers, Linux is the most commonly used operating system, followed by Windows and then macOS.
To build your web app, click the Build button in the toolbar. If it is not enabled, make sure you have also selected one of the platforms listed below. Build is disabled if only Xojo Cloud is selected.
In complete opposition of the situation on the desktop, the majority of web servers use some form of Linux. The two most common types of hosting are shared and VPS (Virtual Private Server). Shared hosting usually costs less, but is also often rather restricted. Most shared hosting providers work best with static web sites or pre-configured tools (such as WordPress) and do not allow general purpose apps to run on them. They are rarely a good choice for a Xojo web app.
Your best choice is to use a VPS (Virtual Private Server) to host your Xojo web apps. A VPS gives you your own server, usually running the Apache web server, with its own specs running inside of a Virtual Machine (VM). With a VPS you have complete control over the server and can configure it to run Xojo web apps.
Windows web servers primarily use IIS (Internet Information Server), but they can also run Apache. Windows servers are far less common than Linux servers. There are also fewer hosting companies offering Windows servers and they usually cost more. If you are using a Windows server, it is recommended that you run a standalone Xojo web app configured to start as a service. If you wish to use IIS, it is recommended you use IIS as a reverse proxy to a Xojo standalone web app.
Mac web servers typically use Apache and setup is mostly the same as it is for Linux. There are even fewer Mac servers in use than Windows, but Mac servers can be simpler to configure. There are no known hosting companies that offer Mac web server hosting, but there are several that offer colocation services for your own Mac hardware.
If you want to install a web server on macOS, consider using MAMP.
Test Apps for Deployment
To help you test deployment of Xojo apps on your web server, here are several versions of a simple compiled app for you to try. Use them to verify that your web server provider will be capable of running Xojo web apps. With both examples, connect on port 8080:
|OS Type||Operating Systems||Download|
|32-bit||Linux, Windows, Raspberry Pi||Download|
|64-bit||Linux, Windows, Mac||Download|
If you are having difficulty getting a web app running on your server, perhaps these tips will help:
- Verify that you compiled your web app for your Server OS and not your desktop OS.
- Check the permissions for the files and folders containing your web app.
- Ensure that the web app and the libraries in the Libs folder are all set to be executable.
- Always check your server logs to see if they have additional information.
Xojo does not provide support for configuring your web server for use with Xojo web apps. If you require easy, one-click deployment of your Xojo web apps consider using Xojo Cloud.
For more information about web app deployment: