DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Set a Custom Domain in Coolify Docker Compose

A practical guide to connecting a custom domain to a Docker Compose resource in Coolify, including DNS records, internal port mapping, automatic Let’s Encrypt HTTPS, generated Compose checks, and troubleshooting.
WorldCoolify Docker Compose Length13 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To attach a custom domain to a Docker Compose application in Coolify, point the hostname’s DNS record at the server running the Coolify resource, add the hostname in the resource’s Domains page, select the web-facing Compose service, and enter that container’s internal listening port when necessary. Choose https:// to have Coolify’s reverse proxy obtain and renew a Let’s Encrypt certificate automatically. Save the change, redeploy, and test the hostname from outside the server.

The most common mistakes are directing DNS to the wrong machine, selecting a database or worker instead of the HTTP service, confusing a container port with a published host port, and testing before DNS or certificate issuance has completed.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before adding the domain

Have these items ready before opening Coolify:

  • A domain or subdomain, such as app.example.com.
  • Access to the DNS provider that manages the hostname.
  • A connected Coolify server on which the Docker Compose resource is deployed.
  • The name of the Compose service that serves browser traffic.
  • The port on which that service listens inside its container. A common example is 3000, but your application may use another value.
  • Public reachability to the Coolify server on TCP ports 80 and 443, with Coolify’s proxy enabled.

For a Compose stack, the receiving service is normally the web or API container. Do not attach a public domain to a database, queue, scheduled worker, or other component that does not accept HTTP requests.

Step 1: Point DNS to the Coolify resource server

DNS must resolve the custom hostname to the server where the Coolify resource is running. For app.example.com, create the appropriate record at your DNS provider so that requests for that hostname arrive at that server. Use the server’s correct address and account for both IPv4 and IPv6 when your deployment uses them.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

The record type depends on your DNS setup. An address record can point the hostname directly to the server; a provider-specific alias can be used when your DNS host offers one. The important condition is that the final answer for the hostname leads to the connected Coolify server, not to a different web host, an old server, or a private address.

Check the result from a machine outside the server:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dig +short app.example.com

Do not continue to certificate troubleshooting while this lookup still returns the wrong address. Coolify’s proxy can only route a request after the request reaches the machine that hosts the resource.

Check every address family you publish

If you publish both an A record and an AAAA record, both addresses must lead to the same Coolify server or to servers configured to serve the same route. A correct IPv4 answer does not compensate for an IPv6 answer that points elsewhere. Compare the DNS results with the server addresses used by your deployment before requesting a certificate.

Step 2: Open the Compose resource’s Domains page

  1. In Coolify, open the application or Docker Compose resource that should answer for the hostname.
  2. Open its Domains page.
  3. Choose Add domain.
  4. Select http:// or https://.
  5. Enter the complete hostname, such as app.example.com.
  6. For a Compose resource, select the non-database service or component that receives web traffic.
  7. Enter the service’s internal target port if it is not the default expected by the resource.
  8. Save the domain configuration.

The domain entry identifies both the hostname and the destination inside the Compose network. Selecting the wrong service can produce a valid certificate and a reachable hostname that nevertheless displays an error or an unrelated response.

Choose the component that owns browser traffic

Multi-service Compose files often contain an edge service, an API, a database, and one or more workers. The domain should be attached to the component that accepts the incoming HTTP request. A worker can be healthy without listening for HTTP, and a database can be reachable on its own protocol while still being an invalid web destination. If the stack has separate front-end and API services, create the hostname route for the one intended to receive that public URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 3: Set the correct internal target port

The optional port in Coolify’s domain configuration is the port inside the selected container. If the web process listens on port 3000, enter 3000 as the domain target. Coolify’s proxy receives the public request on ports 80 or 443 and forwards it across the attached Docker network to that internal port.

This setting is not a request to expose port 3000 on the server. Visitors continue to use the normal URL without a port suffix:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
https://app.example.com

Inside the container, the application must actually be listening on the port you entered and on an interface reachable through the container network. A process bound only to a loopback interface can be running yet remain inaccessible to the proxy. Confirm the application’s own listen setting and its container logs before changing Coolify’s domain entry.

Internal target port versus published host port

Configuration What it controls How a visitor reaches the app Operational effect
Domain target port The listening port inside the selected container Through the proxy on public ports 80 or 443 Preserves Coolify’s hostname routing and network-based deployment model
Compose ports: mapping A port published directly on the host server By addressing the server and published port directly Exposes the service separately and can interfere with normal rolling replacement behavior

Use the domain target for ordinary web access. Add a host-port mapping only when you deliberately need direct server-port access for a separate reason; it is not required to make a custom domain work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What if the Compose file already publishes a port?

An existing ports: entry does not change what you enter in the Coolify domain form. Read the listening port from the selected container and use that as the target. Publishing a host port creates a second access path; it does not tell the proxy which container port to route to. Keeping the proxy path and the direct host path conceptually separate makes deployment changes easier to reason about.

Step 4: Choose HTTP or HTTPS

Choice Traffic behavior Certificate behavior When it fits
http:// Requests arrive without transport encryption unless another layer handles it No automatic HTTPS certificate is requested for that entry Temporary diagnostics or a deliberately HTTP-only endpoint
https:// Requests use encrypted HTTPS through Coolify’s reverse proxy Coolify requests and installs a Let’s Encrypt certificate, then renews it before expiry when DNS and reachability remain valid Public applications and normal production access

For automatic TLS, enter the domain with the https:// scheme. Certificate issuance requires the hostname to resolve to the Coolify server and the proxy to be reachable. If DNS is still propagating, wait until external lookups consistently return the resource server before treating a certificate error as a configuration failure.

Choosing HTTPS does not move the application to a different container port. TLS terminates at the proxy, while the proxy continues forwarding to the internal target port you selected. This is why a service listening on 3000 can be available at the standard HTTPS URL without publishing port 3000.

Step 5: Redeploy and inspect the generated configuration

After saving the domain, redeploy or restart the resource so Coolify applies the route to the running stack. Then open Show Deployable Compose. This view is useful for checking the runtime definition that Coolify generated from your source Compose file.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The deployable definition can include normalized runtime settings, attached networks, proxy labels, and domain-related configuration. Your source Compose definition remains the file you edit; the generated definition is the result Coolify prepares for deployment. If a route does not behave as expected, inspect the generated networks and labels before rewriting the source file.

Once deployment completes, make an external request:

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
curl -I https://app.example.com

Run the request from outside the Coolify server or its private network. Confirm that the response belongs to the intended Compose service, not merely that a TCP connection succeeds. An HTTPS response from the wrong application usually indicates an incorrect hostname route or service selection rather than a DNS outage.

How Coolify routes a custom domain

Coolify’s reverse proxy listens publicly on ports 80 and 443. When a request arrives, the proxy examines the hostname and any configured path, selects the matching route, and forwards the request over an attached Docker network to the selected container. The Coolify control plane does not relay the application’s traffic; the proxy and the resource network handle the request path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a Docker Compose resource, Coolify starts with the Compose definition you provide and produces a deployable definition with the runtime networking and proxy metadata it needs. That distinction explains why editing a generated view does not replace edits to the source Compose file, and why the generated view is the right place to verify what will actually run.

Hostname routing and path routing

Routing style Selector used by the proxy Typical arrangement
Single hostname The requested host, such as app.example.com One hostname routes to one selected Compose service
Path-based routing The hostname plus a configured URL path Different paths can be mapped to separate routes when the Domains settings support them

Use separate hostnames when each service should have a clear, independent public address. Use a path when the application and proxy configuration are designed to share a hostname and the selected services correctly handle that path. A path entry does not change the container’s listening port; it only adds another routing condition.

Paths and redirects in Domains

Coolify’s Domains settings can include optional paths and redirects in addition to a hostname. A path lets the proxy distinguish requests by both host and URL path, while a redirect rule changes where the client is sent instead of forwarding the request to the container as-is. Keep the hostname, path, and destination service aligned: a route can be syntactically valid yet still fail if the selected component does not serve that path. Test the exact URL, including its path, from outside the server after deployment.

Troubleshooting a domain that shows no route

DNS resolves to the wrong machine

Run dig +short app.example.com from an external network and compare the result with the address of the Coolify server hosting the resource. Correct the A, AAAA, alias, or provider-specific record as appropriate. Also check for an outdated record at the apex or a conflicting IPv6 record: a client that prefers IPv6 can reach a different machine even when the IPv4 result is correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The wrong Compose service is selected

Return to the resource’s Domains page and inspect the component attached to the hostname. Select the web-facing service that actually accepts HTTP requests. A database or background worker may be healthy and still have no route capable of returning a web response.

The internal port does not match the process

Check the application configuration and container logs for the port on which the process listens. Compare that value with the port in the domain entry. Remember that the value is internal to the container; changing a host-side ports: mapping does not automatically correct a mismatched domain target.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

The process listens only on loopback

A service bound to 127.0.0.1 inside its container may reject requests arriving through the Docker network. Configure the application to listen on the container interface expected by the image, then redeploy. The exact setting is application-specific, so verify it in that service’s runtime configuration rather than adding a random public port.

The proxy or firewall is unavailable

Confirm that Coolify’s proxy is enabled and that inbound ports 80 and 443 are reachable at the server firewall, cloud firewall, and any upstream network firewall. The proxy also needs to attach to the resource’s Docker network. If the proxy cannot join that network, the hostname may resolve correctly while still producing a gateway or routing failure.

TLS issuance has not completed

Test only after DNS points to the correct server and the proxy is reachable. If certificate issuance fails, inspect the proxy logs and verify that the hostname is publicly reachable on the expected port. Correct DNS or firewall problems first, then redeploy or retry the domain so the automatic certificate flow can run again.

The generated runtime differs from expectations

Open Show Deployable Compose and inspect the generated network attachments, labels, and domain settings. This can reveal that a service was omitted from the proxy network, that a label targets another component, or that the runtime port differs from the value you intended. Change the source Compose definition when a source-level correction is required, then redeploy and inspect the generated result again.

The hostname reaches the wrong application

A response from another application proves that the server is reachable but does not prove that the intended route matched. Recheck the exact hostname in the Domains entry, look for another route using the same host, and verify the selected Compose component. Confirm the result with an external HTTPS request after each correction.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verification checklist after deployment

  1. External DNS lookup returns the address of the Coolify server running the resource.
  2. The domain entry uses the intended hostname and scheme.
  3. The selected component is the HTTP-serving Compose service.
  4. The target port matches the process’s internal listening port.
  5. The process listens on an interface reachable from the attached Docker network.
  6. Coolify’s proxy is enabled and ports 80 and 443 are reachable.
  7. Show Deployable Compose contains the expected networks, labels, and domain route.
  8. An HTTPS request made from outside the server returns the intended application response.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Safe operating patterns for Compose domains

Keep public routing at the proxy

Let the proxy terminate HTTP or HTTPS and route to the internal service. This keeps public access on the standard ports and avoids coupling the application to a host-port number that may change during deployment.

Reserve host ports for intentional direct access

A published host port is a separate access method, not a prerequisite for domain routing. Publishing one unnecessarily increases the number of reachable entry points and can conflict with replacement behavior when Coolify brings up a new container alongside an old one.

Use the generated view as a deployment check

When a Compose stack behaves differently in Coolify than it does locally, compare the source definition with Show Deployable Compose. Focus on the service selected for the domain, its internal port, network membership, and proxy labels. This is more reliable than guessing at DNS or adding extra host mappings.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Change one layer at a time

When diagnosing a failure, verify DNS first, then the Coolify route, then the container listener and network, and finally TLS timing. Changing DNS, host ports, service selection, and application settings simultaneously makes it difficult to identify the actual cause. Redeploy after a configuration change and repeat the same external test.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Final deployment sequence

The dependable sequence is DNS first, route second, deployment third, verification last. Resolve the hostname to the correct resource server, add it under Domains, select the web service and its internal port, choose https:// for automatic TLS, redeploy, inspect the generated Compose configuration, and verify with an external HTTPS request. If the result fails, troubleshoot in that same order: DNS, service selection, internal port and listener, proxy and firewall, certificate timing, then generated networking.

Frequently Asked Questions

Which DNS record should point to Coolify?

Create the address record appropriate for your DNS provider so the hostname resolves to the server running the Coolify resource. This is commonly an A record for IPv4, an AAAA record for IPv6, or a provider-specific alias. Verify the final lookup externally and make sure any published IPv4 and IPv6 addresses lead to the correct server.

Do I need to publish the Compose port on the host?

No. The port entered in Coolify’s Domains form is the selected container’s internal listening port. Coolify’s proxy accepts public traffic on ports 80 and 443 and forwards it over the Docker network. A Compose ports: mapping publishes a separate host entry point and is not required for domain routing.

What port should I enter for a web container listening on 3000?

Enter 3000 as the domain target port, provided the process really listens on that port inside the container and is reachable through the container network. Visitors still use https://app.example.com without adding :3000.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does the domain show no route even though DNS is correct?

Check that the Domains entry selects the web-facing Compose service, that its internal target port matches the process, and that the process is not bound only to 127.0.0.1. Then confirm the proxy is enabled, ports 80 and 443 are reachable, and the proxy can attach to the resource network.

How does Coolify obtain the HTTPS certificate?

When you add the hostname with https://, Coolify’s reverse proxy requests and installs a Let’s Encrypt certificate and renews it before expiry when DNS and public reachability remain valid. DNS must resolve to the resource server and the proxy must be reachable for issuance to succeed.

Can multiple Compose services share one hostname?

They can use path-based routes when the Domains settings support paths and each selected service is configured to handle its route. Use separate hostnames when services need independent public addresses. A path changes the proxy’s matching condition; it does not change the container port.

Should I edit Show Deployable Compose directly?

No. Coolify generates that definition from the source Compose definition and runtime settings. Use it to inspect generated networks, labels, and domain configuration. Make source-level changes in the Compose definition, then redeploy and inspect the generated result again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How can I verify that the route reaches the intended service?

After redeployment, run an external request such as curl -I https://app.example.com and inspect the response. Test from outside the Coolify server or its private network. A response from the wrong application usually points to a hostname route or service-selection problem, not a basic DNS failure.

The Bottom Line

Point DNS to the Coolify server, add the hostname under the Compose resource’s Domains page, select the HTTP-serving service and its internal port, and use https:// for automatic Let’s Encrypt TLS. Redeploy, inspect Show Deployable Compose, and verify the result with an external HTTPS request before changing host-port mappings.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.