Nginx Proxy Manager + Coolify

How to use Coolify together with the Nginx Proxy Manager(NPM).

Coolify is a very neat new PAAS out there, which allows to automate a lot. For me it automates a little bit to much. Therefor instead of using it together with a buildin Traeffik, i would like to use it with NPM so that gaining certificates are seperated an it is easy to add different services wich do not interact with coolify on the same Host.

To Proceed you need a server probabaly a vps and two (sub)domains pointing at the ip of your server.
I refer to the domains as npm.domain.com and coolify.domain.com

lets start:

Install Coolify

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

Coolify is now installed as docker all persistant data lives under
/data/coolify

sudo su #root account is needed to change Coolify volume folders
cd /data/coolify/proxy
docker compose down # or docker-compose down

Now traeffik is not runnig anymore

Install NPM

mkdir nginx-proxy-manger #decide where that folder should live
cd nginx-proxy-manager
write the follwoing to a new docker-compose.yml

version: '3.8'
services:
  app:
    container_name: nginx-proxy-manager
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    networks:
      - coolify

networks:
   coolify:
    name: coolify
    external: true

sudo docker compose up -d #or sudo docker-compose up -d

now head over to to npm.domain.de:81 and login to the nginx proxy manager.
login credentials are:

Email:    admin@example.com
Password: changeme

Then change the account setting and as the connection is not secure now choose a temporary password first.

when logged in set up a new proxy host:


and dont forget to add a ssl certificate (see tab SSL) before save.

the go to https://npm.domain.com log in and change your password again.
Please afterwards remove the line 11 (- 81:81) from the docker compose file.

Now you are safe.

Afterwards add another Proxy Host:

add SSL an the following advanced configuration:

Now you can connect savely to coolify.domain.com and proceed there.

Cleanup