SSL to selfhoste supabase postgress?

at first am working on coolify with caddy proxy

i have https setup for all domains

i have been trying to setup TLS for a few days where i wanted it to be terminated at the proxy level and then continues to the postgres db. but this doesn't seem to work ?

here is what i tried to do in caddy file


layer4 {
    :5432

    @postgres {
        tls
        sni supabasedb.domain.com
    }

    route @postgres {
        tls {
            connection_policy {
                alpn postgresql
            }
        }
        proxy {
            upstream {{upstreams 5432}}
        }
    }
}
Was this page helpful?