Amazon LightSail - how to create an instance to run Xojo web apps?

I have created an instance of Amazon’s Linux OS + App - LAMP - and am trying to get my apps up and running - I am trying a Standalone build because their cgi-bin is just utterly inaccessible.

Anyone running on LightSail who can kibbutz in with what they did to get Xojo apps up and running?

In my desperation, I am also trying to hack out Xojo app hosting on their 2019 server edition.

I am sadly new to this and have even considered building my own Pi based server.

I very much so had you in mind as I’ve been working on Lifeboat.

I would be honored to have your input.

2 Likes

What I did was the following:

a. I use Transmit to connect to the Lightsail instance via SSH. I upload the Linux executable folder to the main folder. Let’s say the app is called xyz and is in a folder with the same name.
b. I created a folder called “bin” and made it executable.
c. I created a file called “launch” in the bin folder and edited in the following text:

#!/bin/bash
pkill -9 $1
cd ~/$1
./$1 &
disown -h %1
cd ~

save the file and make it executable.

d. Do the same for a file called “unlaunch”, containing:

#!/bin/bash
pkill -9 $1

e. To launch the web app, use the Lightsail terminal feature, and type “launch xyz”.
f. To kill the web app in order to replace it with a new version, use the Lightsail terminal feature, and type “unlaunch xyz”.

The above works for me. YMMV.

1 Like

How does one make a folder executable?

And I am building on a Windows box, so Cyberduck and FileZilla are my FTP / SFTP apps that I use. Not sure how to make anything executable, tbh.

  • I am new to this.

I just use the Transmit UI, but I believe you can use

chmod u+x launch

terminal command to make the “launch” file executable, etc.

I’m also not an expert in UNIX/Linux, and it took me a lot of web searches to figure out a solution.

Where can I download it to test? I am building on a Windows box.

UPDATE: I created a CentOS 7 instance and installed a number of libs / dependencies that were reported to be necessary on the system requirements page. Then I installed apache and used the chown command to change ownership of the html and cgi-bin directories… and finally became able to upload files to both directories.

Now I need to get my apps to actually work. -_____-

standalone apps just cause me to download the executable file…
cgi apps kick out an Internal Server Error.

Totally do not know what to do to get these brand-new installations to work.

I use FileZilla for Windows too.
To set permissions on a folder (or individual files), I right-click on the folder (or file) and a context menu pops up. In that menu, you should see an option “file permissions…” - click that, then you should see a popup with a grid of permissions that you can check (or uncheck) - or you can enter a numerical code at the bottom of the popup (my Xojo app folder is set to 755), which provides the correct set of permissions.

This sounds like an Apache configuration issue. I might suggest getting a web app running first and then adding layers like a reverse proxy. There’s a lot to learn.

First, an empty CentOS image will need a couple libraries for Xojo Web apps to run, you can use yum to install them.

yum install libsoup
yum install libunwind8

Then, you can upload your app with a SFTP tool, ensure the app is executable, and run it.

/path/to/my/app --port=80

You’ll see your app running at your server IP address now. This command leaves the process attached so if you cmd-c you’ll actually end the app. You can send it off on it’s own by putting an & at the end of the command, but you’ll have to retrieve the process ID to end it.

If you have Apache active, Apache gets the port 80 for it. If you don’t need a web server in your installation, don’t have it installed and port 80 will be free.

But thanks for trying to correct me instead of help OP.

I’m trying to help. No need to feel offended.

1 Like

This is the version that CentOS will install re: libunwind – libunwind-1.2-2.el7.x86_64

As for libunwind8 - I do not see that directly and I get an error when trying to specifically mention libunwind8.

On CentOS it is libunwind not libunwind8

2 Likes

Thanks :slight_smile:
Should have looked at my own source code, memory is throwing numbers in there!

2 Likes

Heh. Just found that out.

I am trying this now on a Bitnami Nginx, Debian, and Ubuntu to see which will actually work without throwing errors or just not working.

*LightSail will only allow two instances before you have to contact support to have one’s limit increased.

Lifeboat WORKS!!!

I am successfully running my app using nginx on CentOS 7 instance in LightSail.
(Apache does not work with Lifeboat)

:raised_hands:t2: :raised_hands:t2: :raised_hands:t2:

1 Like

Great. Will it support Ubuntu at launch or will start with just CentOS, Tim? @Tim_Parnell