kamal icon indicating copy to clipboard operation
kamal copied to clipboard

Wildcard for 3rd level domains

Open Wolwer1nE opened this issue 1 year ago • 6 comments

Hi! Here is what I got

Current Setup

  • Rails application with implemented user subdomain functionality
  • Kamal 2 deployment with Thruster reverse proxy
  • DNS records configured for wildcard domain
  • Current deploy.yml configuration:
proxy: 
  ssl: true
  host: mysite.com

Goal Enable support for user-specific subdomains in the format:

name.mysite.com
another_name.mysite.com

What is the correct approach to handle wildcard subdomains with Kamal/Thruster?

Option 1: Remove host from deploy.yml completely (concerns about SSL certificate compatibility) Option 2: Use wildcard notation '*.mysite.com' Option 3: There is no such possibility, go back to nginx/traefik and suffer.

Kamal version: 2.2.2 Rails version: 8.0.0.beta1 Thruster version: 0.1.8

Wolwer1nE avatar Nov 04 '24 12:11 Wolwer1nE

Related to https://github.com/basecamp/kamal/pull/969.

viktorianer avatar Nov 24 '24 19:11 viktorianer

@Wolwer1nE Can I know what you did in the end?

patrickfeeney03 avatar Jan 16 '25 22:01 patrickfeeney03

+1

crmne avatar Mar 04 '25 14:03 crmne

Would be very nice if automatic ssl provisioning for arbitrary subdomains would work with kamal. Works out of the box with traefik and my current docker compose setup.

tschuehly avatar Jul 12 '25 19:07 tschuehly

Option 2 works well for me. ssl: false in my case. My app is configured with Hetzner servers, a load balancer, and a Cloudflare certificate.

hiendinhngoc avatar Jul 17 '25 02:07 hiendinhngoc

In that case traffic leaves your server unencrypted @hiendinhngoc , right?

sevos avatar Sep 23 '25 16:09 sevos