[GH-ISSUE #725] [QUESTION] How to enable HTTPS #466

Closed
opened 2026-02-25 20:35:49 +03:00 by kerem · 3 comments
Owner

Originally created by @ASNosal on GitHub (Apr 15, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/725

I have followed the directions in the readme, and acquired certificates for my domain with certbot. However, I cannot seem to get the whoogle server to pull the certs and serve https. It remains accessible through HTTP, but HTTPS always fails. I am using docker-compose to run the sever.

Is there something I need to change in the .env, or yml to call out where the certs should be located? What am I missing here?

Originally created by @ASNosal on GitHub (Apr 15, 2022). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/725 I have followed the directions in the readme, and acquired certificates for my domain with certbot. However, I cannot seem to get the whoogle server to pull the certs and serve https. It remains accessible through HTTP, but HTTPS always fails. I am using docker-compose to run the sever. Is there something I need to change in the .env, or yml to call out where the certs should be located? What am I missing here?
kerem 2026-02-25 20:35:49 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@BluishHumility commented on GitHub (Apr 20, 2022):

I've been stumped on the exact same issue. I was able to get the certbot certification set up just fine, but I can't figure out how to get the docker-compose to incorporate it into the Whoogle deployment. Whoogle has been working fine over HTTP, but HTTPS fails.

I can connect to the instance externally by IP address only because my DDNS service only supports HTTPS. I am hoping for a clue how to get it correctly configured so I can use the DDNS domain for Whoogle.

<!-- gh-comment-id:1104039851 --> @BluishHumility commented on GitHub (Apr 20, 2022): I've been stumped on the exact same issue. I was able to get the certbot certification set up just fine, but I can't figure out how to get the docker-compose to incorporate it into the Whoogle deployment. Whoogle has been working fine over HTTP, but HTTPS fails. I can connect to the instance externally by IP address only because my DDNS service only supports HTTPS. I am hoping for a clue how to get it correctly configured so I can use the DDNS domain for Whoogle.
Author
Owner

@nakoo commented on GitHub (Apr 30, 2022):

If you want to use HTTPS, you must use reverse proxy like nginx.

<!-- gh-comment-id:1113898310 --> @nakoo commented on GitHub (Apr 30, 2022): If you want to use HTTPS, you must use reverse proxy like nginx.
Author
Owner

@benbusby commented on GitHub (May 16, 2022):

^ correct. If you want to serve your Whoogle instance over HTTPS, you'll need to use something like nginx to handle that for you. If you used certbot, it should look something like this:

server {
	server_name <your domain name>;
	location / {
		proxy_set_header X-Forwarded-For $remote_addr;
		proxy_set_header Host $host;
		proxy_pass http://localhost:5000;
	}

	listen 443 ssl; # managed by Certbot
	ssl_certificate /etc/letsencrypt/live/<your domain>/fullchain.pem; # managed by Certbot
	ssl_certificate_key /etc/letsencrypt/live/<your domain>/privkey.pem; # managed by Certbot
	include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
	ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
	if ($host = <your domain>) {
		return 301 https://$host$request_uri;
	} # managed by Certbot


	listen 80;
	server_name <your domain>;
	return 404; # managed by Certbot
}

Note that certbot actually handles a lot of these details for you if you tell it to. If you have your nginx server config defined (the above config without anything annotated with # managed by Certbot) then running something like sudo certbot --nginx -d <your domain> should fill out the rest for you.

<!-- gh-comment-id:1127855154 --> @benbusby commented on GitHub (May 16, 2022): ^ correct. If you want to serve your Whoogle instance over HTTPS, you'll need to use something like nginx to handle that for you. If you used certbot, it should look something like this: ``` server { server_name <your domain name>; location / { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://localhost:5000; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/<your domain>/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/<your domain>/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = <your domain>) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name <your domain>; return 404; # managed by Certbot } ``` Note that certbot actually handles a lot of these details for you if you tell it to. If you have your nginx server config defined (the above config without anything annotated with `# managed by Certbot`) then running something like `sudo certbot --nginx -d <your domain>` should fill out the rest for you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#466
No description provided.