Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Trouble Setting Up Subdomain-Based Proxy Forwarding with Code-Server on Fly.io#7373

Unanswered
dev-tarala asked this question inGeneral
Discussion options

I'm runningcode-server on a Fly.io VM using a custom Docker image. The image includes all necessary setup to launchcode-server, and it works as expected on a direct root route.

To enable per-port preview for services (e.g.,3000,5173), I initially tried using code-server’s built-in proxy forwarding via/proxy/:port. While this works locally to some extent, it fails on remote environments (Fly.io), particularly with module resolution and static asset loading in some frameworks (like older CRA apps). I explored workarounds (such as rewriting paths in nginx or using absproxy), but these were unreliable or framework-specific.

As an alternative, I attempted to follow thecode-server documentation for subdomain-based proxying. Here's what I did:

  • Created wildcard DNS records via Cloudflare (e.g.,*.myapp.domain.com)
  • Programmatically issued certificates via Fly.io GraphQL API for these subdomains
  • Passed the--proxy-domain flag tocode-server inside the VM
  • Confirmed that CNAME records point to the correct Fly app hostname

However, I’m encountering persistent SSL handshake failures (ERR_SSL_VERSION_OR_CIPHER_MISMATCH) and DNS resolution errors (e.g.,CNAME not resolving or TLS alerts duringcurl). The certificate verification step on Fly’s end also seems stuck due to failed domain ownership validation.

I'd appreciate any guidance or clarification on:

  • Correct usage of--proxy-domain with Fly.io and code-server
  • Best practices for wildcard certificate setup with Fly.io and Cloudflare
  • Required configuration on Fly.io for HTTPS subdomain routing per port

Thanks in advance for your support!

You must be logged in to vote

Replies: 1 comment

Comment options

As far as code-server is concerned, I can say that--proxy-domain *.myapp.domain.com and a CNAME on*.myapp.domain.com that points tomyapp.domain.com should work.

I am not familiar with fly.io though, so I am not sure what is going on there. If it has trouble with the CNAME maybe an A record on the wildcard host will work better?

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
2 participants
@dev-tarala@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp