Perhaps it’s useful as a starting point for anyone interested in deploying apps with the open source server. If any interest is expressed here, I’ll write some tutorials and perform a few video walk-throughs which demonstrate all the details of setting up production apps to run on the open source platform (in-house, or on cheap unmanaged VPS hosting accounts, in managed IT environments, etc.).
I made a video run-through demonstrating how to install anvil-app-server on A2 unmanaged VPS, using SSH and tmux. I suggest watching at 1.5x speed:
This video runs through how to install an app dependency (in this case anvil extras):
This video runs through how to interact with the embedded Postgres database that ships with anvil-app-server, using SQL in psql-anvil-app-server:
This video walks through installing and running an Anvil app on Windows 11:
This video walks through using a separate install of postgres (as opposed to the embedded version that comes packaged with anvil-app-server), on a very old machine (originally Windows XP, manufactured 15-20 years ago, now with Q4OS Linux):
Explanations of all the anvil-app-server command line options, psql guidelines, etc. are in the official anvil-app-server Git repo:
Please keep in mind that anvil.works does not provide any support for the open source anvil-app-server, but they do offer a commercial version which is supported.
There’s more to add, especially for systems which have trouble using the embedded Postgres database, and for example, for situations in which the Java server can’t be downloaded properly. I’ve been swamped lately, so haven’t been as active on the forum. At some point want to share literally hundreds of application examples containing interesting solutions to what I think are likely common problems - just need to take a vacation to collect them all…
A vacation of any kind sounds awesome right now! Anything you do eventually share will be super valuable, as the app-server is such a powerful reason to use Anvil and it’ll act as a draw.
Why this error please
anvil.server.RuntimeUnavailableError: Server resources not available for ‘python3-full’. If this error persists for more than a few minutes, please contact support@anvil.works.
This thread is about the open source anvil-app-server. Are you experiencing that error with an application running on the hosted anvil.works platform, or with a self-hosted app running on your own server with anvil-app-server? (If it’s related to the hosted service, that question should be posted in a separate thread on the forum (be sure to search existing topics on the forum, since there are likely dozens of threads related to that sort of error already)).
Hi @nickantonaccio
I do not have much experience with setting this on Windows and I was not able to find anything related in the github repo.
I am facing this issue:
@nickantonaccio thanks for the tutorials! It is very helpful! And I love a2hosting. I am struggling to deploy my app using https. I think you mentioned in your first vid that you would show how to do it. Can you please point me to the resource?
I’ll make a video detailing exactly how I set it up, as soon as I return from the holiday rounds In the meantime, if you have a single Anvil application, and an open port 443, in a Linux environment, the easiest way is to let Anvil’s embedded Traefik binary do it all for you automatically. Just run your application with an https:// origin.
If you want to run on a port other than 443, or if you have multiple applications that you want to terminate at different ports, you can apt install caddy then:
On the command line where you run your Anvil application, set the origin URL to the https port which you’ve defined in the caddy file. Set the --port value to the http port you’ve defined in the caddy file. For example, this caddy file setting:
@nickantonaccio I appreciate your response! Am also looking forward to the video. I was actually getting an error about Traefik; perhaps, the port was not open, will give it another shot. Happy Holidays!
Hi @nickantonaccio, thanks for your guide, I followed it and installed my app.
However, whenever my app tries to call server side code, I have this error:
AppOfflineError: Connection to server failed (error)
Looking with the browser inspector I see it tries to call:
(XX.XX.XX.XX is the public IP of the host)
This request resolves in a OK 200 response, but with an empty response.
The APP is using the Users and Data Tables services only, and some server-side code.
Do you know what the cause of this error could be?
Should the host have some other ports open to make the anvil.server.call(....) calls work?