Home Portainer DHCP Setup
Post
Cancel

Portainer DHCP Setup

Setting up Portainer with picking using DHCP to get an IP address

I used the videos below to set up Portainter to use a DHCP system to assign IP addresses that I can use in its system. These are not what I would call “True” DHCP because they never ask the router for an IP address but assign themselves one through portainer and then use that one. Because of this, you need to exclude the set of IP addresses that you are going to use for Portainer out of your IP addresses from your DHCP server on your router.

https://www.youtube.com/watch?v=o7nn6Tv-PAw&ab_channel=DBTech

Correction Video

https://www.youtube.com/watch?v=4741-YR31fM&ab_channel=DBTech

Troubleshooting Issues Because of switching to DHCP

I was having issues running Nginx Proxy Manager because of the fact that I was trying to run it with regular docker instead of docker compose or as Portainer calls it a stack. I got this setup and then ran into a few issues trying to get it restarted up. I figured out this is because after you join the network you have to make sure when you recreate or edit the container that the network is set to the new network instead of the old one.

After that, it was pretty simple getting it pointed in the right direction just input the source domain and point it at the correct IP address.

Edit (2023-04-16)

I ended up removing this feature and just using the standard bridge that portainer gives you. The reason for this is that it kept changing which address and never sticking with a single address. Obviously, that is what DHCP is for but I assumed PFsense would visibly see them getting DHCP and I would be able to set them up static. This messed up my proxy to my other self-hosted stuff. Could be useful in the future for something though.

This post is licensed under CC BY 4.0 by the author.