Nginx Proxy Manager - How-To Installation and Configuration

Поделиться
HTML-код
  • Опубликовано: 3 июл 2024
  • In this Nginx Proxy Manager How-To, I'll show you how to install and configure Nginx Proxy Manager in Docker. #Docker #NginxProxyManager #HomeLab
    DOCS: github.com/christianlempa/vid...
    Follow me:
    TWITTER: / christianlempa
    INSTAGRAM: / christianlempa
    DISCORD: / discord
    GITHUB: github.com/christianlempa
    PATREON: / christianlempa
    MY EQUIPMENT: kit.co/christianlempa
    Timestamps:
    00:00 - Introduction
    01:52 - Deploy NGINX proxy manager on Linux
    04:18 - Log in to the web UI
    05:40 - Set up a public DNS record
    06:40 - Obtain an SSL cert
    07:21 - Expose a simple web application with nextcloud example
    09:27 - Add a new proxy host
    ----
    All links with "*" are affiliate links.

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

  • @christianlempa
    @christianlempa  3 года назад +12

    Watch Next ➡️ Manage Docker Containers: ruclips.net/video/ljDI5jykjE8/видео.html

    • @kavithak1138
      @kavithak1138 2 года назад +1

      Thanks for the video. I have issue with database like below Error. can you help me out.
      Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.

    • @markstanchin1692
      @markstanchin1692 2 года назад

      @@kavithak1138 I have the same issue. It involves editing in the md config file but I don’t know how to do it inside a docker container which was in a compose stack.

    • @amarnathadvocate2968
      @amarnathadvocate2968 2 года назад

      À

    • @iamrage4753
      @iamrage4753 2 года назад

      Hi Christian would this be the same process if using podman with fedora?

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

      @@markstanchin1692 use portainer and attach a console/terminal to the container. edit: or just dont use -d at the end of the docker-compose command

  • @dravokivich
    @dravokivich Год назад +5

    Thanks man! Was trying to figure this out over the last few days and the little bit of extra details you shared on this video helped a lot. Particularly when you pushed to explain how dependant it was, for the same networks to be used.

  • @user-rm2ne9gj2g
    @user-rm2ne9gj2g 3 года назад +2

    Each time when I try to found something in another tuto, yours gave me the right solution always. I’ll stay here forever

  • @shugabaabrahamwuta1833
    @shugabaabrahamwuta1833 Год назад +3

    2 years down the line and this is still an invaluable resource.

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

    You are just amazing man. That's the most helpful video I watched on youtube this month. Thanks a lot!

  • @nfctinken
    @nfctinken 3 года назад +5

    Thank you so much for this video, as well as your others for Docker, Docker-Compose, etc., as they have truly helped me out. I am a novice in Linux, so showing all the steps, as well as explaining them, was fantastic. Cheers!

    • @christianlempa
      @christianlempa  3 года назад +1

      Thank you! I'm glad it helps you :)

    • @nfctinken
      @nfctinken 3 года назад

      @@christianlempa one question, do you know how I can set my specific docker-compose item to restart on reboot? I noticed when rebooting that system that NPM was not available again until I ran the up -d command. Thank you!

  • @huzefamustafa5326
    @huzefamustafa5326 3 года назад +1

    Just start working on managing multiple docker containers, your content is really helpful. Thanks

    • @christianlempa
      @christianlempa  3 года назад

      That's awesome 😎👍 thanks for sharing

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

    Appreciate the video Christian, thanks for putting this together!

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

    Fantastic work Christian, I have just started diving into docker. Thank you for the content, I have learnt so much from it!

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

      Thank you so much! Glad you enjoy the content :)

  • @qiuyue4082
    @qiuyue4082 3 года назад +2

    Awesome content, I was looking for a confirmation of the docker network rule and you explained really clear.

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

    Great video. I keep coming here every while to review

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

    Amazing tutorial. Thank you, Chris 😊

  • @Omn1Slash
    @Omn1Slash 3 года назад +3

    Thank you for the great tutorial! Very helpful, and quite entertaining!

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

    Works great man ! Thanks for the lesson.

  • @galhindi9257
    @galhindi9257 3 года назад +2

    I've just finished building the mail server after 2-3 days of headaches, with iredmail and manage that while hosting a website.
    Can't believe I found it after :P
    thanks!
    keep the good work.

  • @bautistabaiocchi-lora1339
    @bautistabaiocchi-lora1339 2 года назад

    just found your channel. really solid videos. love the energy!

  • @hanslossman
    @hanslossman 3 года назад +1

    Great content! Thanks for aweome tutorials and solutions that just work great.

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

    This is a great video! Now I need to get this setup with my home server!

  • @bryonbrill
    @bryonbrill 2 года назад +2

    You gained a subscriber there is tons of content here to be consumed in just one video! You sir, are amazing!

  • @victorcomposes
    @victorcomposes 3 года назад +7

    Why I'm I only seeing your channel now🤪, thank you for your great content.

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

    Nice tutorial I have figure it out how to make it work with docker compose and it was hella fun.

  • @mason8714
    @mason8714 3 года назад

    more brilliant content! thank you!

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

    Thank you very much, bonus was this easy LET'S cert implementation I was looking for, great explanation for layman like me…!

  • @kiritoast8377
    @kiritoast8377 2 года назад +3

    You save my life ! I was stuck for 1 week before watching your video. I had a port configuration problem (port 8080, 8181, 4443 instead of 80, 81, 443) because of the image configuration page on dockerHub

  • @rgrf
    @rgrf 3 года назад +1

    Thank you Christian for providing a fast way to understand what, how and why. Please could you soon explain how containers, stack and networks fit together.

    • @christianlempa
      @christianlempa  3 года назад +1

      Great suggestion bro! I will make a future video about docker Networks, may take some weeks though

    • @Ematuresco
      @Ematuresco 2 года назад

      @@christianlempa ich bekomme bei 4:34 die Meldung bad gateway, nach dem ich die Zugangsdaten eingebe :(

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

    thank you Chis, i manage to make it work!

  • @rory2569
    @rory2569 4 дня назад

    thanks didnt know this existed. Great for sharing my webapps with friends.

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

    Great info! Liked and subscribed!

  • @giovannisorrenti9782
    @giovannisorrenti9782 2 года назад

    you saved my life! Thank you!!!

  • @alifnaiech6972
    @alifnaiech6972 3 года назад

    Man, thank you so much. You have saved me!

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

    Thank you, usefull content!

  • @drbyte2009
    @drbyte2009 3 года назад

    Thanks for the great video !

  • @GENhodgy1971
    @GENhodgy1971 3 года назад

    Nice one mate!

  • @sandeeptembare
    @sandeeptembare 3 года назад

    Thank you so much, great content. ✌

  • @amosgiture
    @amosgiture 3 года назад +42

    It does not do everything but what it does it does very very well. The certificate auto-renewal and the ability to perform almost all reverse proxy functions on the GUI is just too good. However, apart from the initial setup, the official documentation is almost non-existent.

  • @GorkemYildirim
    @GorkemYildirim 3 года назад

    Very good solution for multiple subdomains.

  • @prn-ice
    @prn-ice Год назад

    Soooo helpful.

  • @siavashmohammady9095
    @siavashmohammady9095 2 года назад

    thank you a lot you saved me lot of time

  • @anupraj762
    @anupraj762 2 года назад

    Nice explanation

  • @tonyg2973
    @tonyg2973 3 года назад

    you are awesome! thanks!

  • @kevinvalani5079
    @kevinvalani5079 2 года назад

    You are a gem.

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

    You made my day :)

  • @maeglingondolinsbane3446
    @maeglingondolinsbane3446 3 года назад

    Thanks great video I've been looking for a tutorial like this for a long time.

  • @jared4670
    @jared4670 2 года назад

    Well this looks great. I have been using an old version of ajenti with an nginx plugin to handle proxies but it's so outdated. Gonna take a look at this

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

    amazing video

  •  Год назад

    GG...perfect alternative to kemp

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

    Very helpful especially for joking the np-m network and calling via name not ip addr

  • @AngriestEwok
    @AngriestEwok 2 года назад +1

    Sounds great. If only it actually worked for SSL certificate grabbing for digital ocean. I ended up installing nginx on it's own and doing everything on the command line.

  • @livingmadscientistlife
    @livingmadscientistlife 2 года назад +2

    Keep coding and rocking in the free world, outstanding work mate! Have a good one and cheers!

  • @gianniskleanthous3268
    @gianniskleanthous3268 Год назад +6

    so after docker compose up -d i can reach the webui and when i try to login with the default creds i get bad gateway.. from what i've seen online its supposed to also have a config.json file which i dont, anyone with some clear instuctions on that? i have seen no such step in this video so im a bit confused

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

    Thanks for the video. I learned something and found it easy to follow and set up reverse proxies. I don't quite understand why you use docker, though. I'm running mine in a dedicated lxc.

  • @0983bozo
    @0983bozo Год назад +11

    It would be really nice if NPM was able to scan existing nginx entries on install and import them into the manager. I set up my nginx the manual way a long time ago and I really can't be bothered to now reset them all up through the manager. Shame though as it would be nice to have a UI to manage them all

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

      You can always use something like terraform/pulumi. This will be one time effort but after that you can migrate to other tools if you want as you will have ip:host mappings in one place.

    • @0983bozo
      @0983bozo Месяц назад

      @@malborboss I ended up switching to Traefik, lol.

  • @mf1315
    @mf1315 3 года назад

    Great video! Def need to slow down though! .75x speed is perfect

  • @floffy7440
    @floffy7440 3 года назад

    good videos buddy

  • @Dahlah.FightMe
    @Dahlah.FightMe Год назад

    Nice :D

  • @jeytis72
    @jeytis72 3 года назад

    Good. Waiting for wildcard certificates in Nginx. Thanks

  • @jartran
    @jartran 2 года назад +1

    Thank you so much! I got this working perfectly after having a bit of trouble with Traefik and HAProxy. I do have one question, how do I use this with my host network? For instance, I would like to use this for a secure connection to access my pfsense router using the FQDN. I already tried changing the network for NPM from the default network to host without luck. What am I missing?

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

    Hi Christian! I have been watching your videos and this is amazzing what you are doing. I actually set this up in my home lab. everything is working fine except one thing. I am able to access my application from a device connected to different network(different ISP connection) but if i connect to the same network (ISP connection) and try to access, its loading forever. Appreciate your help

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

    I don't know if something is cursed my setup, but if anyone else has issues getting their db to start, change from jc21/mariadb-aria:latest (which is in their own instructions) to jc21/mariadb-aria:10.4.15-innodb. They haven't updated the mariadb container in 2 years, so maybe it's just best if you go the sqllite route.

  • @WokCorner
    @WokCorner 3 года назад +2

    Hello sir, thanks for this! May I ask?
    I have multiple virtual servers on LAN, each of them having a java app available at 33333 port. Can I use this docker nginx proxy manager to make all of them available on internet? Or do I have to redeploy each of them to run them in docker too? Thanks!

  • @inaciosung
    @inaciosung 3 года назад +2

    Hello from Brazil! Great Content Christian. Thanks for sharing! I wonder if it is mandatory to do it in the "/opt/ directory". Does it make a difference? Cheers!

    • @christianlempa
      @christianlempa  3 года назад +2

      Hey thank you man :) No it's not really important, I usually just place my containers in this folder to easily find them and follow the linux filesystem BPs, but it doesn't really make a difference technically.

    • @inaciosung
      @inaciosung 3 года назад +1

      @@christianlempa Capito! Tks again!

  • @jonychawla6503
    @jonychawla6503 2 года назад

    Hi there. I appreciate your work. Can you provide some link or tutorial regarding setting up load balancing using nginx proxy manager.. Cheers!!

  • @jairvandersterre1002
    @jairvandersterre1002 3 года назад +2

    I recently set this up aswell! It's a really awesome tool but it can sometimes corrupt your proxies, so beware. If you get a 502, it's not because your webapp isn't giving an invalid response. I think it's a bug. Just try to set it up and double check your advanced tab for any corruptions :D

    • @christianlempa
      @christianlempa  3 года назад

      Not sure what you mean, works for me 😜

    • @simmexx
      @simmexx 3 года назад +1

      Yepp, i get 502 aswell.
      going to bash my head against this today and hopefully will get an awnser later today ;)

    • @christianlempa
      @christianlempa  3 года назад +2

      502 is the communication between proxy and target failed for some reason, either http/https, wrong ip or similar

    • @simmexx
      @simmexx 3 года назад +1

      I was storing all my volumes on my NAS, and apparently i have some issues with authorization there since the DB wont write.
      I changed this to save locally on the docker-host and it worked like a charm.

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

    Very helpful. But SSL certs need to be renewed manually!

  • @su1ka
    @su1ka 3 года назад +1

    And what IP address you see in logs when you try to surf nextcloud instance? Your proxy gateway?

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

    Amazing tutorial, only question I have is that when I restart my server nginx is wiped and I have to restart, how can it maintain my data on a restart without me having to set everything up again?

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

    You can also put your twitch in the description :)

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

      I removed it because I don't stream anymore, sry 😞

  • @AKASH-sw9bs
    @AKASH-sw9bs Год назад

    Can you make a tutorial or share some resources that how to configure nginx docker-compose node.js app --scale?

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

    blocking the "allow" to internal IP or network does not work if nginx is in the container - devs are aware of that but apparently there is no way to limit the address to be accessible from local network only

  • @sirandrex
    @sirandrex 3 года назад +1

    I already have it running on my setup. I used to have a manual installation of nginx + certbot, so this is more simple and quick . If I question you about this or traefik, what did you prefer?

    • @christianlempa
      @christianlempa  3 года назад +1

      I would say that nginx proxy manager is perfect for reverseproxies especially in smaller environments where you have a single docker node running. If you need load balancing features I would prefer traefik.

  • @Mark-cf2er
    @Mark-cf2er 3 года назад +1

    In your example at the end, wasn't the scheme set as HTTP?

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

    Been running npm for 3 years now. What happens is, with my setup every 3 months is, I get a '502 Bad Gateway' on all new host I try to setup after that point. Have not figured out how to fix as of yet.

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

    Useful unless you want to server static files :D

  • @djKenpLan09
    @djKenpLan09 Год назад +5

    I get a "Bad Gateway" when I try to login into Nginx Proxy Manage web-gui. Anyone else getting this that can help me out? The container logs dont show much

    • @Hasansaid51
      @Hasansaid51 Месяц назад +1

      I got the same error last night, apparently downgrading NPM image helps. I’m gonna try it later on today

    • @calvinjeffrey6966
      @calvinjeffrey6966 Месяц назад +1

      ​​@@Hasansaid51Hey did downgrading the npm image work?

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

    Hello Christian, Good Video. I am going to assume @ the 12:00 minute mark or close to that you mention custom locations and paths, That this would be a file path is this correct? Thank you sir.

  • @ibrahimoglu
    @ibrahimoglu 2 года назад

    👍

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

    hi! why do you choose the OPT directory to install containers?

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

    Thank you!

  • @impact0r
    @impact0r 3 года назад +1

    Can you do a video on how to allow applications inside docker and behind reverse proxy the see client's originating IP? This is a very useful feature (geoip, stats, logs, area access control), but there is virtually no how-tos on it anywhere in the Internet.

    • @christianlempa
      @christianlempa  3 года назад +3

      Great idea, but I don't think it's worth a full video. But here is what you need to do :)
      Add: proxy_set_header X-Real-IP $remote_addr;
      And: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      In your NPM advanced Configuration Section of your proxy host. Should do the work! Let me know if it helps

  • @henriksindrup2418
    @henriksindrup2418 3 года назад +1

    Hi Christian.
    Thanks for your super great tutorials
    I have two issues with NGINX PM .. I do not expect "user support" but if you have a quick response I would be very grateful.
    NXINX PM will not start automatically after boot of server .. I have added restart: always in the yaml file. The weird thing is that after I added restart: always, it's enough to run docker-compose ps ..
    The first time it writes "starting" .. The second time "started" ???
    What do I overlook :)
    The second and worst thing .. My Wordpress sites lose all formatting when I run through NGINX .. All content is "readable" but no styling at all .. Any ideas?
    Hope you have the energy to answer .. And finally. Continue with your great work ..
    Best Henrik

  • @sebasdt2103
    @sebasdt2103 3 года назад +1

    hey great video! shouldn't it be possible to replace the proxy thiny with a selfhosted VPN? like wireguard. or Is there a advantage of using the proxy thingy

    • @christianlempa
      @christianlempa  3 года назад +2

      Hmm a VPN is something different than a reverse proxy. VPN is just for internal usage and rev proxy to expose a service publicly

  • @giorgoskormpakis
    @giorgoskormpakis 4 месяца назад

    Thanks for this great tutorial!
    Is there a way to test the deployment on localhost? I'm trying to run it locally, so that to validate how it works.
    Thanks again!

    • @christianlempa
      @christianlempa  4 месяца назад

      Thanks for watching! :) Yes, you can test it locally, you might have to add an FQDN manually in the /etc/hosts file of your PC to test domains.

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

    can you make a video of this same video but for windows users with server on hard drive?

  • @fahadnaif2170
    @fahadnaif2170 2 года назад

    what if you have multiple public IPs and different dockers. How you will point them into Ngnix proxy manager?
    Thanks

  • @yoshikidneo869
    @yoshikidneo869 3 года назад +1

    Amazing tutorial, I have it up and running. I am having an issue though with one thing since getting this up an running, I no longer can connect to my Pi VPN with Wireguard. I've tried setting up a proxy host to go to the Pi's address and the proper port, but no dice. Any iddeas how to fix this?

    • @christianlempa
      @christianlempa  3 года назад +1

      Thanks mate! Not sure why, maybe join our Discord and share some more details :)

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

    What if my service is directly on host and not in a container? How do I connect it to that particular docker network?

  • @yukanolive4727
    @yukanolive4727 3 года назад +1

    Yahhh :) i know, npm is epic

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

    Can you only link the name server to ngx-pm if your own home server has a static ip? Here in Australia our home ip can change.

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

    Is it possible to add more than one app to nginx? I already have used ngix-proxy-manger for nextcloud and now I am trying to add pihole but I don't see any ngix-proxy-manger when I run docker network list

  • @Daniel-qo9uv
    @Daniel-qo9uv 2 года назад

    What to do when after typing: docker-compose up -d I get: ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`. Thanks

  • @maxwellmuhanda7940
    @maxwellmuhanda7940 2 года назад

    Thank you for the video i followed it and set up mine with ease.. however am running a django application where static files are not served directly and need to be added on location.. i have looked for this everywhere I can't seem to find the syntax of adding location from the container . kindly assist

    • @christianlempa
      @christianlempa  2 года назад

      Thanks, mate. It's the same as Nginx because NPM is using it as a backend. On the documentation page, there is a section for custom configuration, maybe this helps you.

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

    I need help of Advanced settings of proxy entry!

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

    Hello, i have questions on 9:21
    I dont understand this point u was install nextcloud and u used it to connect to nginx or by this command u installed nextcloud in nginx?
    - cuz i tested it on my local environment on webapp but it didnt work from outside network its worked on local only after i add in my local dns
    - if i useing custom port like 8888 i added to nginx
    And its from from local by ip address or domain name of web app and enter
    But from outside i must add port after domain name

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

    How do I do this with the new portainer? Everything is named differently, and its asking for a kubernetes file instead of a docker compose.

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

    Thank you chris!
    I'm completely new to linux and i'm trying to setup my vps using docker so I can migrate my wordpress site from a hosting provider...
    I have some questionsns as I'm really confused regarding performance and security.
    do we need to have a webserver(nginx) when there is NPM running? because I spent some time learning to setup nginx as a webserver so I can take advantage of server level cachine with fastcgi... and now i just discovered NPM. But when people talk about NPM, they don't mention anything about the webserver or (performance in general) ...
    so from my understanding we can not run both NPM and Nginx webserver at the sametime, right?
    if that's the case then what are the alternatives?
    i'm just seeking some guidance to know what is necessary and what is not.
    my conifguration is as follows:
    - oracle cloud free tier VM running an arm based ubuntu 22.04
    - docker + portainer installed & running
    that's all for now ... once i have a clear image on how to implemet all those elements i'll go ahead and install Wordpress, FTP, Redis & probably some firewall as well if it's needed?

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

    Which port do I forward on my network

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

    Having some trouble here. When I click try going to my fqdn it makes it to my opnsense login page. It also doesn't show it is secured. I have nginx setup and a proxy host pointing to my "research nextcloud server". I did open http and https on my firewall. Do I have to open a lan port to get to my nextcloud? I'm so close! haha. Great videos though, you are so awesome for all us newbies! cheers

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

    O need help!! I’m trying to proxy a Django app, and the best practice should be to let nginx serve the staticfiles by itself, but I down know to setup this with nginx proxy manager, I’m currently using whitenoise but that is not good

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

    i keep getting a bad gateway error, checking the logs shows access denied for the user

  • @abdallahboucedraya
    @abdallahboucedraya 2 года назад

    hi
    can you make tutorial for selfhosting cloudflare freenom and ngnixproxy ?
    thanks