Error No Available Server

When accessing one of your applications, you might see the No Available Server error.

Coolify No Available Server Error Message

This error indicates that Traefik (Coolify’s proxy) is unable to route the request to your application.

This can happen for several reasons, such as misconfigured Traefik labels, incorrect Cloudflare settings (if you were using Cloudflare), failing application health checks, or an incorrect port configuration.

Before jumping into troubleshooting, it’s important to understand how Traefik works and routes requests to your application.

What is Traefik and How Does It Work?

Traefik is an open-source reverse proxy and load balancer that directs incoming requests to your applications running on Coolify.

It has four main components:

Traefik four important components

  • Entrypoints: The ports where Traefik listens (usually port 80 for HTTP and 443 for HTTPS).
  • Routers: They determine how requests are forwarded based on rules (such as host names).
  • Middlewares: These modify requests (adding authentication, logging, or rate limiting).
  • Services (Servers): Your applications that process the requests.

Tip

When you see the error “No Available Server”, it means Traefik cannot find the application (service) to forward the request to.


Troubleshooting Guide

Several issues can cause the "No Available Server" error. Here are the most common causes and how to fix them:

  1. Failing Health Checks: Your application isn't passing its health checks.
  2. Incorrect Port: The port configured in Coolify doesn't match your application's port.
  3. Cloudflare Misconfiguration: Your Cloudflare TLS/SSL settings are incorrect.
  4. Traefik Labels Misconfiguration: Traefik labels are mismatched.

1. Failing Health Checks

A common reason for this error is that your application is failing its health checks. Coolify uses health checks to determine if your application is running correctly.

If the checks fail, Traefik will mark the application as unavailable and stop routing traffic to it.

Tip

Health checks are optional, so you can disable them if you don’t need them.

Disabling the health check will resolve the no available server error if it’s caused by a failing health check.

Coolify No Available Server Failing Health Check

To fix this:

  1. Check Application Logs: Go to your application's dashboard in Coolify and inspect the logs. Look for any error messages, crashes, or indications that the application isn't starting properly.

    Application logs provide valuable clues, such as database connection errors or missing environment variables, that can cause health checks to fail.

    Coolify No Available Server Application Logs

  2. Review Health Check Configuration: In your application's settings in Coolify, go to the Health Checks tab.

    Verify that the health check endpoint (e.g., /api/health) is correct and that your application is configured to respond with a successful status code (e.g., 200 OK) at that endpoint.

    Coolify No Available Server Health Check Setting

    Ensure the path is correct and doesn't return a redirect or an error. For example, if your health check endpoint is /health, make sure it doesn't redirect to /health/ (with a trailing slash), as this can cause the check to fail.

    If you are deplying a docker compose based application, ensure the health check is properly configured on the compose file.

    Tip

    One click services are compose based application.


2. Incorrect Application Port

Traefik needs to know the correct port to forward requests to your application.

If the port configured in Coolify doesn't match the port your application is listening on, or if the application is not listening on the correct network interface, Traefik won't be able to establish a connection.

To fix this:

  1. Identify the Application Port: Check your application's source code or its Dockerfile to find out which port it's configured to use.

    • In a Node.js application, this is often defined with process.env.PORT || 3000.
    • In a Dockerfile, look for the EXPOSE instruction (e.g., EXPOSE 8080). This line informs Docker that the container listens on the specified network ports at runtime.
  2. Ensure Application Listens on All Interfaces: For Traefik to connect to your application inside a Docker container, your application must listen on all network interfaces, which is specified as 0.0.0.0.

    If your application is configured to listen on localhost or 127.0.0.1, it will only accept connections from within the container itself, and Traefik's requests will be rejected.

    For example, in a Node.js application, ensure your server starts like this: Coolify No Available Server Application Listen Ports

  3. Update Coolify Configuration: In your application's settings in Coolify, ensure the Port field in the General tab matches the port your application is actually using.

    Coolify No Available Server Port Exposes

    You won’t see the Port Exposes option when deploying a one-click service or a Docker Compose app. In these cases, follow the steps below:

    • For one-click services: Check if the domain includes a port number. Some applications require it. If a port was present before you edited the domain, make sure not to remove it. Coolify No Available Server Compose Application

    • For Docker Compose apps: Ensure the ports exposed by your app in the configuration are correct and properly mapped.

After correcting the port and restarting the app, Traefik should be able to connect to your application successfully.


3. Cloudflare Misconfiguration

If your domain is being proxied through Cloudflare, ensure your TLS Encryption settings are configured correctly.

You probably be using one of the following options:

Cloudflare SSL/TLS Encryption Settings

  • Full (Strict): Cloudflare expects a valid SSL certificate from your server and communicates over HTTPS.
  • Full: Cloudflare does not verify the SSL certificate's validity but still communicates over HTTPS.
  • Flexible: Cloudflare communicates with your server over HTTP only.

If Cloudflare is set to Full or Full (Strict) while Traefik is only listening on HTTP (port 80), Cloudflare will forward all requests to the HTTPS port.

Traefik will then be unable to find any server listening on port 443 for the given hostname (e.g., shadow.com), resulting in the "No Available Server" error.

Changing your TLS encryption settings in Cloudflare will resolve this issue.

Alternatively, if you prefer to use a higher encryption method on Cloudflare but Traefik is showing the error, you should configure Traefik to listen on port 443 as well.


4. Traefik Misconfiguration

If the issue persists, the problem might be a misconfiguration in your Traefik labels. The Traefik dashboard is a helpful tool for debugging this.

Set Up the Traefik Dashboard

By default, the dashboard is disabled. Follow these steps to enable it without restarting the proxy (ensuring no downtime):

  1. Add Dynamic Configuration on Coolify for Traefik

    Set Up the Traefik Dashboard on Coolify

    • Go to your Coolify dashboard and navigate to the proxy page.
    • You will see an option to add a dynamic configuration.
  2. Copy the Dashboard Dynamic Config

    Copy the dynamic configuration below and paste it into the popup on Coolify. Name the file with a .yaml extension:

    traefik-dashboard.yaml
    http:
      routers:
        dashboard:
          rule: 'Host(`traefik.shadow.com`) && (PathPrefix(`/`))'
          service: api@internal
          tls:
            certResolver: letsencrypt
          middlewares:
            - auth
      middlewares:
        auth:
          basicAuth:
            users:
              - '<ENTER_HASHED_USER_PASSWORD>'

    Note

    Replace the traefik.shadow.com with the domain you intend to use for accessing the dashboard.

  3. Configure Authentication

    Since the Traefik dashboard does not have a built-in login page, you must add an authentication middleware to protect it.

    In the above configuration, replace <ENTER_HASHED_USER_PASSWORD> with your hashed user password (keeping the quotes). You can generate a hash using this tool.

  4. Save and Access the Dashboard

    After saving the dynamic configuration, visit the domain you specified for the Traefik dashboard.

    Log in using the username and password corresponding to the hashed password you generated.

Diagnose and Fix Label Mismatches

Access Traefik Dashboard on Coolify

If you notice a router error on the dashboard, follow these steps:

  1. Click on the router that displays the error.

    Traefik Dashboard Routers

  2. In the Router details, check the error message.

    Traefik Dashboard Router Error

    Error

    For me it shows nginx-shadowx doesn't exist.

  3. Open your application configuration on Coolify and review the labels.

    Coolify incorrect traefik label

    In this example, having both nginx-shadowx and nginx-shadow indicates a mismatch.

    Change them to be consistent (for example, use only nginx-shadow in both places) and then restart your application.

  4. Revisit the Traefik dashboard. The router should now appear without any error messages.

    If the error persists, try accessing your application website to verify that it is functioning correctly.

Caution

If you are using Docker Compose, you won’t see container labels because Compose-based projects typically run multiple containers.

In this case, you'll need to create a new application and deploy it. Coolify automatically adds labels that may still reference old settings after you make changes.

To fix this, you can either manually override the labels by adding a labels directive in your Compose file or redeploy it as a completely new app.




On this page