Typhonragewind / meshcentral-docker

163 stars 46 forks source link

SSL_ERROR_UNRECOGNIZED_NAME_ALERT #28

Closed cacpmw closed 1 year ago

cacpmw commented 1 year ago

I installed Mesh Central via docker following the instructions and I run all my services through nginx proxy manager. I do not own a real world domain so I always use a local domain (i.e meshcentral.homeapps.local) and all my services run on the same machine as nginx proxy manager.

Here is my container config:

version: '3'
services:
    meshcentral:
        restart: always
        container_name: meshcentral
        image: typhonragewind/meshcentral
        ports:
            - 8086:443  #MeshCentral will moan and try everything not to use port 80, but you can also use it if you so desire, just change the config.json according to your needs
        environment:
            - HOSTNAME=meshcentral.homeapps.local     #your hostname
            - REVERSE_PROXY=192.168.88.241     #set to your reverse proxy IP if you want to put meshcentral behind a reverse proxy
            - REVERSE_PROXY_TLS_PORT=443
            - IFRAME=false    #set to true if you wish to enable iframe support
            - ALLOW_NEW_ACCOUNTS=false    #set to false if you want disable self-service creation of new accounts besides the first (admin)
            - WEBRTC=true  #set to true to enable WebRTC - per documentation it is not officially released with meshcentral, but is solid enough to work with. Use with caution
        volumes:
            - ./meshcentral/data:/opt/meshcentral/meshcentral-data    #config.json and other important files live here. A must for data persistence
            - ./meshcentral/user_files:/opt/meshcentral/meshcentral-files    #where file uploads for users live

Here is my NGINX PROXY MANAGER image

And after this I edit my hosts file to be able to resolve the local domain

127.0.0.1 meshcentral.homeapps.local

As my domains are no public I cant issue the certificate with lets encrypt (so it is said on nginx proxy manager logs)

This is what I am getting on my browser image

Docker logs:

2023-05-18T22:49:05.805822179Z MeshCentral Intel(R) AMT server running on meshcentral.homeapps.local:4433. (i dont understand why this port is being used)

2023-05-18T22:49:05.808565102Z Failed to load web certificate at: "https://192.168.88.241:443", host: "meshcentral.homeapps.local"

2023-05-18T22:49:05.819408358Z MeshCentral HTTPS server running on meshcentral.homeapps.local:443.

This process has always worked for me. I really dont get what it wrong I can access is through https://127.0.0.1:8086 though

Typhonragewind commented 1 year ago

I'm not very well versed in using a reverse-proxy using local domains and neither with NPM, but I think your problem lies in the fact that you defined the "https" protocol in the proxy manager, instead of regular "http". If you want to define a https between meshcentral and the reverse-proxy, you must also provide meshcentral with the appropriate certificates.

cacpmw commented 1 year ago

I'm not very well versed in using a reverse-proxy using local domains and neither with NPM, but I think your problem lies in the fact that you defined the "https" protocol in the proxy manager, instead of regular "http". If you want to define a https between meshcentral and the reverse-proxy, you must also provide meshcentral with the appropriate certificates.

I chose HTTPS because meshcentral uses port 443 I will try changing it to http

cacpmw commented 1 year ago

Update: I did everything again from scratch but now using a duckdns.org domain which allowed me to get https and it worked! Closing the issue.