Anvil-app-server cheatsheet

I put the following together for an IT department, to document steps used to install and interact with production apps running on anvil-app-server:

https://pythonanvil.com/anvil_app_server_install_instructions.txt

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.).

11 Likes

Hi - a typo?
you have (in a few places)

python3 -m venv anvildir
cd anvildir
source /bin/activate

where it should be (change the /bin → bin)

python3 -m venv anvildir
cd anvildir
source bin/activate

1 Like

Thank you, good eye :slight_smile: The text is updated

(hopefully, anyone installing anvil-app-server knows enough Linux and Python, that environment configuration is understood).

2 Likes

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.

2 Likes

EDIT: I updated the video links above to much better versions.

EDIT 2: Added a walk-through video of installing and running an Anvil app on Windows.

EDIT 3: Added walk-through video of running anvil-app-server on a 2 decade old PC, without embedded postgres.

2 Likes

I remembered seeing this and now need it! Awesome work!

1 Like

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…

2 Likes

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.

Thank you thank you thank you

Every time I attempt this I struggle, figure it out, and then forget what I did a few months later.

2 Likes

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.

thank you for your help.

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:


Does it mean it will not work on Windows Server 2019 Operating System?
Or there is some workaround available?

You can ignore the question. Stupid me as I did not search Anvil forum :slight_smile:
What worked for me was found in this thread:

There was an example of that in one of the videos above. You can install your own postgres server, and connect Anvil to it.

1 Like