Make Your App Public with an HTTPS URL
Your Docker host does not accept connections from the internet. To put an app online, give one of its host ports a public URL. Visitors connect to the nearest CDNShark edge over HTTPS, and only the edge connects to your host.
Add a URL
- Open your Docker host and scroll to Public URLs.
- Name: lowercase letters, numbers and inner dashes, up to 30 characters, for example
myapp. - Host port: the host side of your container's port mapping. For an image deployed with
8080 → 80, enter8080. - Leave WebSockets ticked if your app uses them.
- Click Add public URL.
Your app is reachable straight away at an address like https://myapp-abcdefg.cdnshark.app. The seven random letters are added so nobody can guess your URL or create a look-alike of it.
How requests reach your app
- The certificate is issued and renewed for you. Visitors using
http://are redirected tohttps://. - Your app receives the request as plain HTTP on its container port, with the
Hostheader set to your URL. - The visitor's IP address is in the
X-Forwarded-Forheader. - Responses are not cached, and they stream as your app writes them, so Server-Sent Events and long downloads work.
- Your app's own CORS headers are passed through unchanged.
Limits
- Up to 10 URLs per host, one per host port.
- HTTP and HTTPS only. Raw TCP ports and your own domain names are not available yet.
- Your app must listen on all interfaces inside the container (
0.0.0.0), not only on127.0.0.1; otherwise the URL shows an error. See Docker Hosting Troubleshooting.
Remove a URL
Click the remove button next to it. Visitors get an error at that address straight away; your container keeps running. A new URL for the same port gets a different random part.