r/coolify•
hlassiege

Multi-tenant SaaS on Coolify: handling dynamic subdomains, wildcard SSL, and custom domains

I've been building a multi-tenant SaaS on Coolify and had to figure out a few things around dynamic subdomains and SSL. Thought I'd share what I learned in case it helps others.

The goal:

  • Each user gets their own subdomain (e.g., user1.myapp.com, user2.myapp.com)
  • Wildcard SSL via Let's Encrypt
  • Optional custom domains with automatic SSL provisioning

Key takeaways:

  1. Dynamic subdomains — Using a catch-all HostRegexp rule in Traefik labels, your app handles tenant routing internally
  2. Wildcard SSL — Requires DNS challenge (not HTTP). Worked well with Bunny.net
  3. Custom domains — This one's trickier. Traefik's File Provider lets you drop .yml configs that get picked up hot. Your app can generate these files programmatically when users add their domain.

I wrote up the details in 3 posts if you want the full config examples:

Happy to answer questions

Posted Dec 17, 2025, 9:21 AM UTC

136

Comments aren't archived yet

This post had 6 comments on Reddit. Comments for this period haven't been loaded into the archive yet.