Did you manage to fix this? I am trying exactly the same thing and I got to the point that overleaf is up and running locally, but when I try to create the admin account I cannot set a password, I get the coockie error. And I cannot access through the external IP adress (I think it is correctly pointing to the server, but I am not so sure of how to configure it in cloudflare).