FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Building Multi-Tenant SaaS with Rails 8, Caddy, and Kamal
How-ToWeb Development

Building Multi-Tenant SaaS with Rails 8, Caddy, and Kamal

via Dev.toMooktakim Ahmed4h ago

After publishing the Kamal deployment guide, the most common question was: "How do I handle multiple tenant domains with automatic SSL?" kamal-proxy can't do it — every new domain means editing deploy.yml and redeploying. So I wrote a guide that solves it end-to-end. What it covers: Why kamal-proxy's SSL doesn't scale for multi-tenant apps Running Caddy as a Kamal accessory for on-demand TLS The /internal/tls/verify endpoint — Caddy asks Rails before issuing any cert Subdomain data model, validation, and auto-generation Constraint-based routing ( TenantConstraint / MainConstraint ) Resolving the current tenant from the request hostname Custom domain model with DNS instructions for users Full Caddyfile and deploy.yml configuration Why config.hosts.clear is safe when Caddy gates traffic The architecture is based on a real production app ( Dinehere — AI restaurant website builder) where each tenant gets a subdomain and can connect their own domain. This is Part 2 of the series. Part 1: Th

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

The Real Cost of Abstractions in .NET
How-To

The Real Cost of Abstractions in .NET

Medium Programming • 15m ago

Stop Learning Frameworks — You’re Wasting Your Time
How-To

Stop Learning Frameworks — You’re Wasting Your Time

Medium Programming • 1h ago

How to Self-Host n8n in 2026: VPS vs Managed Hosting (Full Comparison)
How-To

How to Self-Host n8n in 2026: VPS vs Managed Hosting (Full Comparison)

Dev.to • 1h ago

I Built a Mac App to Fix Android File Transfer — Here’s What I Learned
How-To

I Built a Mac App to Fix Android File Transfer — Here’s What I Learned

Medium Programming • 1h ago

How-To

What I learned about X-HEEP by Benchmarking

Medium Programming • 3h ago

Discover More Articles