Skip to main content
You can easily use Traefik to loadbalance an application between:
  • 2+ servers
  • 2+ containers in one server

2+ servers

Prerequisites

  1. Make sure you set the right DNS record for your domain. Your loadbalanced domain should point to the server’s IP address where you are setting up the loadbalancer.
  2. You must deploy your application to more than one servers: read more here.
  3. Make sure Traefik is running on all servers.
  4. Set your fqdn to the fqdn you would like to use to reach your application.
  5. After your application are deployed on all servers, you need to make a dynamic configuration for Traefik to loadbalance between your servers in the /data/coolify/proxy/dynamic directory.

Dynamic Configuration

On your Coolify’s UI, you can go the your Server settings / Proxy tab where you can add the dynamic configuration. The following configuration is valid if you would like to use https.
The following configuration is valid if you would like to use http.

2+ containers in one server

Prerequisites

  1. Make sure you set the right DNS record for your domain. Your loadbalanced domain should point to the server’s IP address where you are setting up the loadbalancer.
  2. You must deploy your application to more than one containers in one server.
  3. Make sure Traefik is running on the server.

Dynamic Configuration

The following configuration is valid if you would like to use https.
The following configuration is valid if you would like to use http.