Does anyone have experience deploying a Xojo web app to a DigitalOcean droplet?

Hi all,

While Xojo Cloud is great and extremely easy to use, there are some snags.

Other than the subscription cost, the issue is SSL - only one certificate can be applied per server apparently, which means that to deploy 2 apps, either I’d need to use a wildcard SSL, at least doubling the cost of a basic Xojo Cloud server but then all apps would need to share the root domain (although could have infinite subdomains), or I’d need to get a new server for each app, which for non-profit stuff isn’t great when you consider the recent price-hikes.

Looking at other options for deployment it seems CPanel based hosting looks like a non-starter, and that I should use a VPS instead.

DigitalOcean with a Linux based droplet and linked MySQL server would seem to fit the bill and come in at $21/month (SSL could then be free). Does anyone have experience using DigitalOcean? My web app would be uploading and reading files on the VPS (which I currently do with Xojo Cloud), but not sure how commands like SpecialFolder would work, since the basic folder structure would be absence (there would literally just be an ext4 formatted volume)?

To have a good experience, you’re going to need to know something about launching binary applications using a systemd daemon. Otherwise, if your app ever quits or the server restarts, you’ll need to log back in via ssh and relaunch the app.

You’ll also need to configure Apache or nginx as a reverse-proxy / load-balancer.

Hi Stam,

You might want to check out Lifeboat from forum member @Tim_Parnell

I think it might be what you’re looking for?

Anthony

8 Likes

It is! I use it myself to deploy to Digital Ocean.

You also don’t need to pay for a MySQL server, Lifeboat can install MariaDB on the same VPS which should save some money.

The paths that SpecialFolder will return are in the Xojo documentation, but an easy lazy way to port from Xojo Cloud to any other server would be to find and replace all SpecialFolder.Documents with SpecialFolder.ApplicationData.Child("My app")

(Lifeboat got its name because it was built to help people sail the digital ocean)

5 Likes

Very pleased with Lifeboat deploying to Digital Ocean, great value droplets and Lifeboat did all the hard work.

2 Likes

Yes I’d seen LiveBoat in my travels, but was unaware it would install a MariaDB instance, which sounds pretty amazing as that would drop the cost significantly!
I’m leaning towards this quite heavily - very impressive Tim!

Does anyone have any recommendations for what kind of droplet/which OS to create?

I was going to go with the lowest spec’d one to start with and I think I saw a lot mentioned about CentOS in documentation and online posts - is that the OS to go for? or should I go for Debian (or Ubuntu)?

Deploying with Lifeboat is almost as easy as deploying with Xojo cloud. I deploy almost daily at the moment.

The initial setup only takes a few minutes and all further deployments are done within 10 seconds:

  • Select server in Lifeboat
  • Select App name
  • Click on Upload App
  • Drag & drop the files
  • Upload

Be sure to take at least a 2-CPU droplet because running the web app + nginx does require some resources.

Debian, 2-CPU, 2GB Ram is a good start.

Lifeboat Help

Server Requirements

  • 64-bit Xojo Web Build

Operating Systems

  • Debian 11 “Bullseye”

  • Debian 12 “Bookworm”

  • Debian 13 “Trixie”

  • Ubuntu 20.04

  • Ubuntu 22.04

  • Ubuntu 24.04

Tested Service Providers

  • AWS Lightsail

  • DigitalOcean

  • Raspberry Pi

Debian systems are highly recommended.

2 Likes

Resources mentioning CentOS are outdated, as the last usable version reached End of Life some time ago.

On a 2-CPU droplet, should you limit your LifeBoat NginX to 2 instances or can it be higher?

Using an instance count higher than the number of CPUs you have risks process starvation and can actually hurt performance in heavy loads.

So is the guideline to set the max instances as the number of CPUs, or one less that the number of CPUs?

OK I’ve got as far as setting up the droplet and installing LIveBoat and MariaDB, but I’m a bit stuck on being able to login remotely to the MariaDB/MySQL instance.

I normally use Valentina studio for things like this - I entered the correct IP address, created a username/password for the database, and enabled external access - but the attempt to login is rejected.

Any advice?

=================
Edit: ignore - had made the mistake of changing the field from ‘%’ to ‘localhost’, changing that fixed everything. Really keen to put it to the test now!

With web apps you can set the instances to the number of CPUs.

I’m glad you got that sorted :smiley:

My other suggestions would have been to make sure that “Enable external access” was enabled and that any optional external firewalls allowed access to the port.

People should be using an SSH tunnel to access that, not directly connecting to the database port.

2 Likes

Yes, that is the more secure way to connect. Lifeboat is meant to make things easier and some users prefer direct access :person_shrugging:

On the multiple cert part of the question, on a digital ocean ubuntu droplet the following commands get a wildcard cert that covers the entire domain and one level under it. You can serve as many domains on one IP as you like. This assumes you are using DO for your DNS. Create an an api key that at least allows DNS control. Install doctl (the digital command line tool) and give it the api key. Then install the certbot interface and do this onetime setup:

apt-get install certbot python3-certbot-dns-digitalocean
certbot register
your-email

Set your ~/.certbot.ini to have the DO api key and be protected chmod 600 ~/.certbot*

cat ~/.certbot.ini
dns_digitalocean_token = dop_v1_your-secret-key

end of one time setup, rest is done every 3 months to renew. normally done as root so can write cert to /etc/letsconnect

Change wohl below to be your linux user.

Change awohl.com to be your domain

certbot certonly
–dns-digitalocean
–dns-digitalocean-credentials ~wohl/.certbot.ini
-d ‘awohl.com
-d ‘*.awohl.com’

The official DO documentation on how to do this : How To Create Let's Encrypt Wildcard Certificates with Certbot | DigitalOcean

On dealing with SSL certs these scripts are useful 1) show expiration of a domain 2) show the list of hostnames the SSL cert can serve

x
wohl@awohl5:~/bin$ show_dates awohl.com
notBefore=Nov 18 10:07:48 2025 GMT
notAfter=Feb 16 10:07:47 2026 GMT
wohl@awohl5:~/bin$ show_name awohl.com
                DNS:awohl.com, DNS:www.awohl.com
x


x
wohl@awohl5:~/bin$ cat show_dates 
#!/usr/bin/bash

echo | openssl s_client -connect $1:443 2> /dev/null | openssl x509 -noout -dates
wohl@awohl5:~/bin$ cat show_name 
#!/bin/bash

echo | openssl s_client -connect $1:443 2> /dev/null | openssl x509 -text |grep 'DNS:\|: CN = 'x





Really, you want to use Lifeboat, also to free yourself from the hassle of managing SSL certificates for your webapps.

Lifeboat is securing the connection to your webapps with FREE Letsencrypt certificates, and its just a click away. As many SSL certificates as you like.

I use Lifeboat together with Webmin to manage a free Oracle Ubuntu 24.04 instance, 4 cpu - 24GB Ram - 200 GB diskspace - at no cost!

Deployment of webapps is easypeasy.

4 Likes