This guide explains how to map your custom domain (myn8n.com and its subdomains) to your Google Cloud Run service.
- A domain name (e.g., myn8n.com) registered with a domain registrar
- Access to your domain's DNS settings
- A deployed Cloud Run service
- Google Cloud SDK installed and configured
Before you can map a custom domain to your Cloud Run service, you need to verify that you own the domain.
# Add your domain to Google Cloud
gcloud domains verify myn8n.comFollow the instructions to add a TXT record to your domain's DNS settings.
Once your domain is verified, you can map it to your Cloud Run service. You'll need to map each subdomain separately.
# Map the main domain and subdomains to your Cloud Run service
gcloud beta run domain-mappings create --service=dev-stack --domain=llm.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=chat.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=n8n.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=s3-console.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=s3.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=db.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=monitor.myn8n.com --region=us-central1
gcloud beta run domain-mappings create --service=dev-stack --domain=metrics.myn8n.com --region=us-central1After creating the domain mappings, Google Cloud will provide you with the necessary DNS records to add to your domain's DNS settings.
For each subdomain, you'll need to add a CNAME record pointing to the provided Google-managed domain. For example:
llm.myn8n.com CNAME ghs.googlehosted.com.
chat.myn8n.com CNAME ghs.googlehosted.com.
# ... and so on for each subdomain
Alternatively, you can add an A record for the apex domain (myn8n.com) pointing to the IP addresses provided by Google Cloud.
Google Cloud Run automatically provisions and manages SSL certificates for your custom domains. Once the DNS records have propagated, SSL certificates will be issued automatically.
You can check the status of your domain mappings with:
gcloud beta run domain-mappings list --region=us-central1After the DNS records have propagated (which can take up to 48 hours, but usually happens within a few hours), you can test your custom domains by visiting them in a web browser.
https://llm.myn8n.com
https://chat.myn8n.com
# ... and so on for each subdomain
If your custom domains are not working, it might be because the DNS records have not yet propagated. You can check the propagation status using online tools like dnschecker.org.
If you're seeing SSL certificate errors, it might be because the certificates have not yet been provisioned. This can take some time after the DNS records have propagated. You can check the status of your SSL certificates with:
gcloud beta run domain-mappings describe --domain=llm.myn8n.com --region=us-central1If your service is not accessible through the custom domains, check that:
- The Cloud Run service is running and accessible through its default URL
- The domain mappings have been created successfully
- The DNS records have been configured correctly
- The service is configured to allow unauthenticated access (if applicable)