Automatic creation of sub-app, subdomain DNS, SSL

I originally sent this as an email to @emmanuel

Hey there!

I am not sure what the proper process is for submitting a sponsored feature request, so I will share it here.

We need the ability to allow a workflow that automates the process of creating a sub app as well as setting+verifying a sub-domain URL with SSL dynamically. We would generate the new sub-domain in Cloudflare using the API connector. I would imagine that because we have verified the same primary domain in Bubble previously with custom A Records it would be seamless to continue adding new subdomains dynamically without much delay.

More specifically the end user process would go as follows:

  1. Person hits landing page of primary app
  2. Signs up for an account
  3. Verifies customer payment info with Stripe
  4. Asked to set a custom subdomain at *******
  5. Workflow checks database if subdomain is taken -> if available, continue
  6. Sub-app is created from main branch
  7. Sub-app domain settings from earlier are applied
  8. Cloudflare API generates new A Record for *******
  9. SSL enabled and verified
  10. New user in sub-app is created based on user info and stripe settings created in step 2 (we want to collect payment from people before dynamically generating the suddomain, at least we prefer to. This is not mandatory and we can imagine a scenario where a person signs up for Stripe AFTER the subddomain is generated and SSL approved and new user account is generated in the subapp)
  11. Ability to start using the sub-app and can share a live URL for other people to access as soon as we manually create new API keys for the plugins in use

Looking forward to hearing more about this process. This is a critical step for us to enable a scalable sales process for our sub-app access.

As I mentioned above, I am interested in sponsoring this feature. My deadline for something like this is late March and am willing to pay right away to build this kind of solution and welcome anyone else to chip in to make it happen. I am also interested in hiring a Bubble developer for the Cloudflare API connector process if the Bubble team does not handle these types of requests.


Small Update:

I have completed the Cloudflare portion using the API Connector!

I sanitized an input box where a person can type in their choice of subdomain. Forced lowercase, strip all special characters and white space with this regex:

Edit: this is the correct regex

Then the custom plugin Action is applied upon button click:

It does not seem like a far fetch to support the dynamic creation of a subdomain on Bubble’s end. For us few subscribers planning on going to the Team level or already there, I think this combination of features would speed up client adoption and open up possibilities.


@philip do you have any update on this? I have a similar need.

Thanks Man

I was told by Emmanuel/Support that this would be a sponsored feature and would run a minimum cost of $15k-25k and time delay of 6-12 months. We are implementing as many automated workflows and scripts as we possibly can to speed up the process. Right now we can get a new sub-app running in under 10 minutes with SSL, SendGrid, custom API keys and custom domain.

Hi @philip I just asked a similar question and I was thinking that you could possibly automate the last manual steps with some browser automation software possibly. For example create a bit with imacros Not sure if that will help you with the last piece of the puzzle to full automation!

Thanks @chrislarge305 I’ll check it out!

I’m looking into sub apps for my app but do wonder a couple of things still. @philip you mentioned this in a closed thread:

So your users do have access to the app editor? To what extent do you expect them to access the editor?
Or do you just allow them a front-end with front-end access only and you manage the backend (editor) and when there are customization requests, you take care of that.

I still dont understand how you can update a main app and push to a sub app that has customizations that another sub app doesnt have?

I guess you would be building all the functionality in the primary app and have some sort of ‘system’ data type that stores certain app settings or app features and will tell the sub app which parts of the main app are available to the sub app. So essentially the sub app has all the main features but only shows a handful?

Reading through this thread, this is something I am trying to build out with my app. My goal is that when someone signs up they would be set up with their own sub account. Is there any documentation beyond what @philip has put together in the previous posts?


I wanted to continue this topic and ask if anyone has been able to fully automate the process of creating sub apps? I need to create separate domains in sub apps for various businesses with a master app cascading updates as a SaaS. Also, dumb question but are the sub apps capable of having a primary domain linked to them (from those businesses that want to create new domains) or does it have to be a sub domain?



Dear Philip,
Could you share your progress on this matter.
I know it has been a long time since you wrote it down, but I am currently considering it. So I would appreciate your information.

My question is how to manage sub-app subscriptions. If a client of mine decides to downgrade to the hobby plan, is there a way of doing this without the client having to log in to Bubble? Meaning, I am creating an account management page for my clients, and ideally, if they wanted to cancel, they could do it from this account management page, without having to log in to bubble. What I am hoping to avoid is a scenario where I wake up to receiving notifications that clients have cancelled and that I manually have to go into their sub-app and downgrade.

It also seems dangerous to have clients log in to Bubble as there are many things clients could break by mistake.

So it would be nice to have plan level subscriptions as something exposed by Bubble api endpoints, or some sort of simple account management page that allows a client to upgrade/downgrade without touching the database or editor etc.

Just thinking outloud here, but if the Stripe Subscription ID was exposed, maybe this would be all we need and a Stripe webhook could communicate with Bubble that the subscription is cancelled?

@emmanuel maybe you can please explain how the following scenario would be managed: 10,000 loan agents, each with their own sub-app/unique domain. If a hundred decided to cancel from personal down to hobby, can this be done without having to have some instructional video on how a loan agent logs in to bubble? I guess if I had a 100 clients cancel on me, theoretically it’s a good problem to have, because I must have gotten 1000 clients if 100 are cancelling, but I really am hoping to avoid messages from clients like “I have no clue how to unsubscribe from Bubble, help!” People must have figured out a solution to this already… @sridharan.s my eight ball says you may have some clue about this, or maybe i’m taking the wrong approach here, or just need to cross this bridge when it comes…

What’s the status of this?

Check this out… It’s a plugin that may get this done:

1 Like

Hi there !
Is it working well? Or under implemetation?

Hopping in here to see if anyone else has had success with a similar implementation. I would like to have the process of creating sub-apps for new subscriptions to be as automated as possible. It feels close but not quite possible with what is currently available.