How to host multiple apps on single open source server

What I’m trying to do:
Learn whether it is possible to host multiple Anvil apps on a single Anvil open source server instance – and, if it is, learn how to do so.

What I’ve tried:
I’ve scoured the Anvil.works documentation, the open source server docs, and this forum.

It isn’t possible. The open source runtime serves a single app only.

3 Likes

Thank you Owen. I’d seen folks reference hosting multiple apps in-house, but the only way I could see to do so would be to run multiple instances of the open source server, with each instance using a different port.

It appears that using the Cloud Deployment Guides similarly will require a separate hosting instance for each Anvil app.

Do you (or anyone else who reads this) know whether the Anvil Team has a means of enabling multi-app hosting using a single server/port for those clients who pay for Anvil for Enterprise deployments – possibly using a non-open source version of Anvil?

The enterprise edition is an entirely different beast to the open source runtime and very definitely allows you to serve multiple apps.

1 Like

Understood – thanks again Owen, and have a great weekend!

1 Like

I guess Owen means you can’t run multiple apps on a single instance.
But you can install multiple instances on the same server, running on different ports. Then you can use Nginx or similar reverse proxy in order to publish them under different domain or subdomains.

1 Like

…so having multiple apps sharing users or other tables is impossible?

Or is it possible to setup one server per app and having all the servers use the same database?

You could use a single db and point each app server instance there.

2 Likes

I know this topic is old, but I am wondering if anyone has been successful at having multiple apps sharing users?
“how does a single user authenticate with the same credentials across multiple apps?”

The statement “Each Anvil app you run should have a separate database within your Postgres installation.” found here: GitHub - anvil-works/anvil-runtime: The runtime engine for hosting Anvil web apps
led me to believe the answer is no.

Specifically I am trying to do this on a Linode server.

how to fetch a data form data table ?

This topic was closed months ago. New questions will be more visible (and more properly titled!) to forum folk if you start new topics.

1 Like