Configuring Docker-hosted Typesense with Let's Encrypt SSL Certificates
TLDR Ian asked for help with setting up SSL certificates in a Docker-hosted Typesense. Jason provided suggestions but the issue remains unresolved due to port conflict.
Apr 05, 2023 (6 months ago)
Ian
08:44 PMdocker run \
-p 8108:8108 -v/tmp:/data \
typesense/typesense:0.24.1 \
--data-dir /data —-api-address --api-key= --api-port 443 —-ssl-certificate /etc/letsencrypt/live/website.com/fullchain.pem —-ssl-certificate-key /etc/letsencrypt/live/website.com/privkey.pem
I am able to access typesense only using http on port 8108. If I use https on port 443 I get an xml error message that I don't think is coming from typesense.
Ian
09:00 PMNow I get these errors:
http_server.cpp:1065] An error occurred while trying to load server certificate file: /etc/letsencrypt/live/website.com/fullchain.pem
E20230405 20:59:30.382263 1 http_server.cpp:175] Failed to listen on - No such file or directory
Ian
09:19 PMApr 06, 2023 (6 months ago)
Jason
01:48 AMIan
01:02 PMhttp_server.cpp:175] Failed to listen on ip.address:443 - Cannot assign requested address
typesense_server_utils.cpp:511] Typesense API service has quit.
Jason
02:36 PMJason
02:37 PMIan
03:09 PMIan
04:11 PMJason
05:34 PMSo instead of
docker run -p 8108:8108 ...
, you’d use docker run -p 443:443 ...
Ian
05:53 PMIan
07:35 PMError starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use.
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Typesense Certificate Error in Docker Compose
Suraj encountered an issue with typesense not finding SSL certificates in docker compose, even though certs were mounted successfully. After several suggestions by Jason, the issue was resolved by Suraj by mounting the correct folder in the docker compose file.
Troubleshooting Typesense Launch with HTTPS Protocol via Docker
Gines struggled to launch Typesense with HTTPS, initially failing to mount the certificate directory in Docker. Even after addressing this, Gines hit an SSL error, to which Kishore Nallan confirmed that an actual hostname, not an IP address, was needed.
Setting up DNS Records for Typesense Servers and SSL Configuration
michtio needed assistance in setting up DNS records for Typesense servers in AWS and configuring SSL. Jason shared steps on how to set up A Records and fetch an SSL cert for HTTPS on port 443. The user later solved his issue with Jason's help.
Typesense Search Functionality Issue on CentOS Client Server
Shabber is facing an issue with Typesense search functionality on a CentOS client server. The curl request works, but not from JS. The issue remains unresolved, and Shabber will request the public IP of the server and enable port 8108.
Server IP Address and Port Issues with Typesense
Alex encountered problems with Typesense server configuration when setting IP and port using --api-address and --api-port, facing additional problems with CORS and version inequities. Kishore Nallan addressed each point, ultimately finding a bug with the command line parser affecting subsequent commands. The advised workaround was to use `--enable-cors=true`.