How to run one Meteor app on multiple domains?

Hi guys,

Is it possible to host multiple domain names with same app and database?

  • Allow same login to be used on multiple domains
  • Host them on same app with same database

Btw, my use case is: my app serves some agency clients, so I need to allow them use their own domains.

Really need this ASAP. Thanks a lot for all your helps!

You could spin up a separate deployment of the same app for those custom domains. So the app itself (i.e. your code) would remain unchanged and all deployments would point to the same DB, but some would run on different domains.

Benefits: easy to achieve, does not require any modifications to the code. Also you’re able to control server resources on a per-domain basis.

Disadvantages: more difficult to manage if number of clients/domains rises. Also might affect price, if you’re deploying to a PaaS where cost depends on the number of containers, such as Galaxy.

Will the app need to serve different front ends?
Or just be the same thing accessible from different domains?

If it’s the latter, just point all the domains at the same server and you’re good to go

1 Like

Yeah, my bad. From distant memories thought that at least in Galaxy it wasn’t straightforward. But indeed, it actually very much is: https://galaxy-guide.meteor.com/custom-domains.html#add-domain

Very easy to do with nginx as proxy.

Thanks guys. Yes, just simply setup domain DNS settings solved the problem