question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTPS doesn't seem to be working...?

See original GitHub issue

Okay, this is probably just me personally and not a bug, but I just can’t get HTTPS to work. My app keeps going straight to HTTP instead even though I’ve set the few environment variables mentioned on some issues and the docs… Is there something obvious that I’m missing?

Here are the 3 environment variables I set in the .env file:

CSRF_TRUSTED_ORIGINS="https://[redacted]"
SECURE_PROXY_SSL_HEADER=True
DEBUG=1

And my docker-compose:

version: "3.9"
services:
  babybuddy:
    image: ghcr.io/linuxserver/babybuddy:latest
    container_name: babybuddy
    volumes:
      - ./appdata:/config
    ports:
      - 8000:8000
    restart: unless-stopped
    env_file: .env

I’ve tried to also have these environment variables under environment: in the docker-compose but that didn’t make any difference. Am I missing something obvious? Last few logs in docker logs babybuddy:

[2022-02-27 05:07:28 +0000] [300] [INFO] Starting gunicorn 20.1.0
[2022-02-27 05:07:28 +0000] [300] [INFO] Listening at: http://0.0.0.0:8000 (300)
[2022-02-27 05:07:28 +0000] [300] [INFO] Using worker: gthread
[2022-02-27 05:07:28 +0000] [316] [INFO] Booting worker with pid: 316
[2022-02-27 05:07:28 +0000] [317] [INFO] Booting worker with pid: 317

^ As can be seen here, it’s doing http instead of https.

Any guidance or clarification would be appreciated. I’m working on trying to make this externally accessible for us and don’t want to do so until I know I can make sure it’s setup over https 😃

Oh and in case it’s needed, the version in the dropdown on the UI shows v1.10.1 👍

Thank you!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
cdubzcommented, Feb 27, 2022

Well you made me curious and caught me at a good time with the little ones napping so I think I got this all documented!

https://docs.baby-buddy.net/setup/ssl/

Give it a go and let me know if you have any trouble/suggestions/additions/etc. There are lots of other ways to do this but this a pattern I am most familiar with. It can also be done all within the docker-compose.yml but that seemed a bit too complicated for me. If anyone ever does that and reports back I’ll add it to the documentation as well 😄

1reaction
cdubzcommented, Feb 27, 2022

Ok so backtracking again… I’m pretty sure this is expected (: Gunicorn is only going to serve up the app over an unencrypted connection so you’ll need a proxy like NGINX in front of it to handle SSL and redirect the traffic appropriately.

I’m going to see if I can cook up some quick documentation on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is SSL/HTTPS not working on my site? - Support | one.com
There can be several reasons why SSL/HTTPS is not working on your site. Please see if one of the causes listed below helps...
Read more >
HTTPS sites not opening in any browser on Windows computer
HTTPS sites not opening in any browser · 1] Change time · 2] Clear SSL cache · 3] Verify SSL certificates · 4]...
Read more >
iis - HTTPS not working; binding set, certificate installed
I've looked at all the settings but everything seems correct. I've restarted the server numerous times. The certificate is stored on the local...
Read more >
How to Fix the HTTPS Not Secure Error - Seer Interactive
HTTPS stands for “Hypertext Transfer Protocol Secure”. ... missing, or invalid SSL certificate, that would appear here as well.
Read more >
HTTP sites are not working while HTTPS sites are ... - Quora
HTTP sites are not working while HTTPS sites are working in Google Chrome? What are some solutions?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found