aaP_usanuman this works for me i am using cloudflare what i did is below and 100% working.

  1. Create A record in cloudflare input server IP
  2. Generate Client certificate in cloudflare then copy (Key & Certificate (in pem format))
  3. Go to AAPANEL enable cloudflare supported PORT as written above.
  4. AAPANEL> setting enter domain or subdomain address
    5.Enable SSL select i have certificate and paste the cloudflare in step2 and save.

Hope this will help others who bump into this kind of situation.

10 days later

I have the same problem. I did all of the above solutions but it doesn't work for me. Unable to set domain for accessing panel

    10 days later

    aaP_agilsetiawan772
    me too, actually I've been trying for couple years already 😄
    I tried everything with no luck.

    I wonder how important is to set the domain and SSL for the panel if I'm the only one using it,,, any thoughts?
    Thanks.

      aaPanel_Kern
      Wow!! that's a very detailed guide!
      I will try it out and get back.
      Thanks a lot for all your great work with this panel!

      aaPanel_Kern
      I tried with let's encrypt (created in a website), cloudflare, and also self certificate.
      In all of them I get this error

      Any clues?
      Thanks!

        aaPanel_Kern
        Thanks as usual!
        I tried and get this message

        Should I use this command?

        /www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip

          aaPanel_Kern
          Wow!!! it's working now!!
          Thanks!!!!!!
          one last question... I use this server for one site only example.com
          Is it safe to make anther site panel.example.com, and use the same cloudflare ssl certificate?
          or is it better to make a lets encrypt sll different from the main domain?
          By the way I'm using IP, not domain name on my panel

          Thanks again!

            2 months later

            aaP_danielit
            The domain name can be bound in the settings, please use the new subdomain as the exclusive domain of the panel
            The A record of the subdomain must point to the ip of the server, proxy and cdn cannot be used