How to Secure Your Applications with HTTPS Using Docker, NGINX, and Let's Encrypt

Поделиться
HTML-код
  • Опубликовано: 15 янв 2025

Комментарии • 69

  • @thenetimp
    @thenetimp 9 месяцев назад +34

    nice video i like how you handled certbot however I recommend using "--keep-until-expiring" instead of "--force-renewal" that way if the server reboots it doesn't force renewing the certificate, but if it needs a renewal it'll happen.

  • @spachi116
    @spachi116 5 месяцев назад +2

    Thank you so much. Finally after 4 days of struggle.

  • @kevincodes674
    @kevincodes674 5 месяцев назад +2

    Wanted to say thanks for the video, it really helped me out on my project. It literally solves the exact problem I was facing.

  • @Schuleg1
    @Schuleg1 11 месяцев назад +2

    This is a very informative and well-structured video. It is easy to follow and even without a lot of theory I now know what a reverse proxy is, how domains work and how I can use them in practice.
    Keep it up ^^

  • @chaoslawine
    @chaoslawine 18 дней назад

    Thanks for this video! Super helpful and well explained.

  • @HosseinOjvar
    @HosseinOjvar 10 дней назад

    Very nice tutorial, thank you

  • @ShaunDePonte
    @ShaunDePonte Год назад +4

    It is a good video! definitely helped me. thank you

  • @tiZyJoshi
    @tiZyJoshi 3 месяца назад

    thats pretty much exactly what i wanted to do. thank you so much for this video.

  • @SunilChandel-x1j
    @SunilChandel-x1j 2 месяца назад

    Your video helped me a lot man, thank you so much.

  • @nimaxin0
    @nimaxin0 5 месяцев назад

    Thank you too much! It's working very well.

  • @khawan5534
    @khawan5534 Год назад

    well done, clear and simple

  • @santoshr25
    @santoshr25 Год назад

    Great first video! Thanks a ton!

  • @Dayogg
    @Dayogg 11 месяцев назад

    Thank you, this worked.

  • @julianmedina9370
    @julianmedina9370 2 месяца назад

    This video is gold

  • @briceweb
    @briceweb 3 месяца назад

    U saved my life ✨🙏

  • @zyedkhemakhem
    @zyedkhemakhem 6 месяцев назад

    not all hero wear capes
    thank you

  • @benschneider1234
    @benschneider1234 Год назад +1

    Can I use the cloudflare plugin with the certbot container? The cloudflare plugin works with the certbot which I both downloaded via apt.

    • @programonaut-yt
      @programonaut-yt  Год назад

      Hi Ben,
      Sadly I do not know the plugin or how it works, so I think you would just need to try it.

  • @nima.shokouhfar
    @nima.shokouhfar 6 месяцев назад

    It was a great video. thanks for sharing...!!!

  • @milosmilic1980
    @milosmilic1980 Год назад +2

    Thank you maestro! You saved my day! _o/🥳

  • @ניצןמגדל
    @ניצןמגדל Год назад

    Amazing video! very informative!

  • @stigharaldgustavsen
    @stigharaldgustavsen 6 месяцев назад

    Thanks and great video :)
    one thing i did additionally in the crontab was to add
    "1 5 1 */2 * /usr/bin/docker exec nginx nginx -s reload"
    aswell on the line below, to restart the nginx server to load it with the newly gotten certs :)
    I've used it also to add https to alot of c-records awell on the same nginx, with simmilar steps, but it is sometimes confusing when redirecting both not http and https when getting the first certificate for the c-record subdomain. but usually works in the end :)

  • @محمدرضاعابدینی-ش7ع
    @محمدرضاعابدینی-ش7ع 4 месяца назад

    Does SSL reception apply to the subdomains of the site?

  • @محمدرضاعابدینی-ش7ع
    @محمدرضاعابدینی-ش7ع 4 месяца назад

    great... tnx for information.

  • @shamlymackey376
    @shamlymackey376 Месяц назад

    Do I need to reload nginx after the certbot has renewed? Or will nginx already know it is renewed since the file is mounted?

  • @grimkasad4183
    @grimkasad4183 Год назад +1

    Awasome! Realy helpfull.

  • @Sealis04
    @Sealis04 7 месяцев назад

    Does this auto renew the ssl certificate? Or do I have to setup a separate cron job for that?

  • @mohammadfarooqi
    @mohammadfarooqi 8 месяцев назад

    Hey thanks for the awesome video. where can we find the next part as mentioned in the video (automation)

  • @eloytekila
    @eloytekila Год назад

    Man this help me a lot, tis

  • @khayyamq1
    @khayyamq1 3 месяца назад

    I am running on new container, On start I am getting error for certificate files not found then Challenge filed for domain , I presume this is because CA auth can not hit our serve is nginx is still down. Not sure what to do.

  • @sidilekhalifa7320
    @sidilekhalifa7320 10 месяцев назад

    thank you

  • @joeblack8843
    @joeblack8843 8 месяцев назад

    great job mein freund.

  • @necrotikS
    @necrotikS 9 месяцев назад

    What if I don't have port 80 opened in my router? Is there any way to do this without it opened?

    • @Skarokin
      @Skarokin 6 месяцев назад

      this is 2 months late so im sure you already figured it out, but you need to have port 80 and port 443 port forwarded

  • @thinhoduy4988
    @thinhoduy4988 Год назад

    Thanks. I want to set up a CI/CD, do I need to run the certbot command every time I use the git action? I am so confused about that.

    • @programonaut-yt
      @programonaut-yt  Год назад

      Hi,
      this setup has nothing to do with CI/CD, it is to secure your web application. You should only have to do it once in the beginning, then the certificate exists and then you have to run it whenever the certificate is about to expire.
      I hope that helped. If not can you explain a bit more what the problem is and what you are trying to achieve? :)

  • @PeacefulRaj-jf3yk
    @PeacefulRaj-jf3yk 3 месяца назад

    plz check audio level.. it is too low
    anyway content is great

  • @Om-lb5vb
    @Om-lb5vb Год назад

    Thanks a lot !!!!

  • @what_is_lovechik
    @what_is_lovechik Год назад

    How can I do the same for two domains? I have backend and frontend run in docker. Both will have different domains. Nginx will be used as proxy for both as well.

    • @programonaut-yt
      @programonaut-yt  Год назад +2

      You have to add both to the config file and set up the certificate for both (using Certbot) :)
      I hope that helps!

    • @what_is_lovechik
      @what_is_lovechik Год назад

      Ok I know how to setup nginx config file for both. But should I add two certbot containers for each app into compose file? Or how can I setup single certbot container for both.

  • @shahidiqbal1761
    @shahidiqbal1761 9 месяцев назад

    well done.

  • @ezjung
    @ezjung Год назад

    Thanks for the lecture. I followed the direction and found that static files not serving after SSL certificate acquired. What could it be the probelm? After searching google, I changed the permission and moved the static file location under /var/www/html/static but no use. Thanks in advance!

    • @programonaut-yt
      @programonaut-yt  Год назад

      Hello,
      I checked your configuration you commented on the blog post. Did the serving of static files worked with nginx and only using http?
      Normally giving it a SSL certificate does not change the way static files are served, so I would rather check inside your django application. When I set up django for a project I also had some problems with static files, so I guess that the problem lays there.

  • @chaselamkin
    @chaselamkin Год назад

    Thank you so much I was banging my head on the wall over this one. Could you give advice on doing these steps for a subdomain too, do I need a subdomain certificate?

    • @programonaut-yt
      @programonaut-yt  Год назад

      Hi,
      you can just repeat the steps for the subdomain.
      As soon as you have multiple projects something a bit more automated will definitely help you.
      Check out this video on caddy, it will take care of the certificates for you: ruclips.net/video/JPIzqa17edM/видео.html
      Hope that helps :)

    • @programonaut-yt
      @programonaut-yt  Год назад

      You do not have to create a new certbot container. You can add a new domain using the -d flag.

    • @chaselamkin6164
      @chaselamkin6164 Год назад

      @@programonaut-yt thanks so much man you’re a godsend. I had so much trouble yesterday because some website documentation on this was outdated and I didn’t realize subdomain certificates go into the same crt file.

    • @oussamabadda487
      @oussamabadda487 Год назад

      Always Certbot return invalide response from domain 404
      This issue make me crazy 🥵

    • @programonaut-yt
      @programonaut-yt  Год назад

      @@oussamabadda487 Hi Oussam. Can you explain the issue in more detail or show the error message?
      404 means that this location could not be found. Did you create the path to the challenge file?

  • @LuckyImpostor
    @LuckyImpostor Год назад

    Hi there. What will happen if down and up the docker compose 6 times. I know certbot will generate ssl 5 times a day only??? Or doesn't matter?

    • @programonaut-yt
      @programonaut-yt  Год назад

      Hi there,
      this may cause problems, but why do you want to rerun certbot 6 times? You can also do docker compose up to rebuild a specific container, and that way not issuing a new certificate everytime.
      In addition, maybe have a look at caddy. Caddy takes care of a lot of the headaches for you immediately: ruclips.net/video/JPIzqa17edM/видео.html

    • @LuckyImpostor
      @LuckyImpostor Год назад

      @@programonaut-yt for example there is 6 Pull request to the github and there is auto deploy? It will hit docker compose? 6 times? This is the scenario. By the way new subscriber here nice content. 😁

    • @programonaut-yt
      @programonaut-yt  Год назад

      @@LuckyImpostor Glad you like it and thank you :)
      In this case I would adjust your GitHub in a way that only the containers that change are rebuilt. You can do that by just lining up the container names after the docker-compose up -d command. Another thing you could do (also what I am doing) is to separate each project into their own compose file and having the nginx + certbot in their own file in the root of your projects.

  • @IsuCompare
    @IsuCompare Год назад

    like it mr. german hehe ;)

  • @kalkiscript
    @kalkiscript 9 месяцев назад

    Im getting error like connection refused or 404 webroot something

  • @francistrujillo2488
    @francistrujillo2488 3 месяца назад +1

    vscode. control-shift-comma type in zoom. menu zoom from 0 to 3. then check mouse zoom . your text is too small.

  • @doncumentarian
    @doncumentarian Год назад +1

    Larger font-size please for us laptop users

  • @jessewillems6465
    @jessewillems6465 9 месяцев назад +1

    I have no idea what I'm doing wrong. I'm running a server with my docker containers on it locally on my network which I accessed via duck.dns and everything was working fine before running the certbot but after I ran the certbot I have an SSL certificate on the my site when I access it from my local network but it says the certificate is not valid. and no matter what I try I cannot access the nginx from my duck.dns even though I opened port 80 and 443 on my router.

    • @thesigma8508
      @thesigma8508 Месяц назад

      Same here. Although i don't think port forwarding doesn't exist on my ISP.