Portainer to rule them all

scoop96

New Member
Jun 17, 2024
6
1
3
Im waiting for new HW to arrive and build my first node of proxmox.

Friend of mine told me that these crazy and cool autoscripts

https://tteck.github.io/Proxmox/
Come with a single docker or environment (LXC or VM) portainer already running.

How do you set up so portainer (father) has access to all of the portainers (childs)
I want a way to manage every docker (or docker swarm) that i will try to mount.



Context: I want to build a docker swarm and NAS inside a proxmox, later this will migrate to a three node proxmox with similar setup, and allowing me to start toying around and learn kubernetes (probably k3s or k0s, maybe rancher) any recomendations, tips or guides would be welcomed, but first my question regarding having all dockers or whatever inside the single node proxmox easy to check.
 
If you have issues with tteck scripts, please ask tteck for support.
bro its not an issue, im just asking about how do you manage your dockers inside proxmox, if portainer has some kind of approax or how do you people do it?

so far i just did docker compose against a barebone server ....
 
bro its not an issue, im just asking about how do you manage your dockers inside proxmox, if portainer has some kind of approax or how do you people do it?

so far i just did docker compose against a barebone server ....
One VM, without any GUI like portainer, for each docker-compose stack for easier backups/migrations and better isolation via PVE.
 
Last edited:
One VM, without any GUI like portainer, for each docker-compose stack for easier backups/migrations and better isolation via PVE.
having VM for each docker compose is like building legos with screws, it works but is not the intended way of use from docker...

from what i read proxmox team recomend VM and inside docker, but this is very unwise regarding resources management. I read lots of people do use LXC with docker inside (one LXC per each docker compose), and wanting to know how to have access to every docker with portainer (or similar tool) and if somebody had done something similar.
 
having VM for each docker compose is like building legos with screws, it works but is not the intended way of use from docker...
Yes. But the simplest way to achieve it as long as PVE isn't supporting docker containers.

If you want it in the intended way, you probably would set up a Kubernetes cluster with no PVE involved in rolling out/migrating/backing up those docker stacks. But if you are able to set up such a cluster on differnt nodes, you probably also don't want to use ttecks scripts to create those LXCs and stick with VMs.

from what i read proxmox team recomend VM and inside docker, but this is very unwise regarding resources management. I read lots of people do use LXC with docker inside (one LXC per each docker compose), and wanting to know how to have access to every docker with portainer (or similar tool) and if somebody had done something similar.
Problem is that PVE upgrades from time to time break docker when using LXCs. So using a VM is way more reliable and you don't have to fear that your docker environment won't be working next month, even if now everything works fine. Everyone has to do their own decision, if a stable operation or less overhead is more important.
 
Last edited:
Problem is that PVE upgrades from time to time break docker when using LXCs. So using a VM is way more reliable and you don't have to fear that your docker environment won't be working next month, even if now everything works fine. Everyone has to do their own decision, if a stable operation or less overhead is more important.
oh wow, didnt knew about this, i will make my settup accordingly then.
Then you do recomend to make a VM for each docker compose, or just 3 VM and make a docker swarm?
If you want it in the intended way, you probably would set up a Kubernetes cluster with no PVE involved in rolling out/migrating/backing up those docker stacks. But if you are able to set up such a cluster on differnt nodes, you probably also don't want to use ttecks scripts to create those LXCs and stick with VMs.
My idea is first having a working Home Server with my knowledge (docker / VM) and after is running properly with HA, roll 3 new VMs and start with kubernetes playground.


Regarding Kubernetes, would you recomend to have 3 VMs or installing three OS agains each HW and run "barebone" kubernetes? VM with k8s or OS k8s ?
 
Then you do recomend to make a VM for each docker compose, or just 3 VM and make a docker swarm?
Both are valid options. Depends on how you would prefer to manage them. HA/migration/backup/templates on the PVE level by doing operations on the whole VMs or by doing all that on the container level inside the guest OSs.
 
I have one lxc for main docker purpose and other lxc with for specific tasks... On the main docker lxc i have portainer and there you can control all the containers running on all lxc vía the portainer agent (if i am not wrong about the name).
 
Both are valid options. Depends on how you would prefer to manage them. HA/migration/backup/templates on the PVE level by doing operations on the whole VMs or by doing all that on the container level inside the guest OSs.
How much HW resources shall I use for a 3 VM docker swarm?

I have one lxc for main docker purpose and other lxc with for specific tasks... On the main docker lxc i have portainer and there you can control all the containers running on all lxc vía the portainer agent (if i am not wrong about the name).
So if im understanding correctly, you do have few LXC (with individuals docker compose) and one to rule them all? Inside of each docker compose do you add a runing portainer to add it to the main one? or they are detected from the father portainer?

Can I see that portainer docker configuration? the father one I mean
 
  • Like
Reactions: wolframio
How much HW resources shall I use for a 3 VM docker swarm?


So if im understanding correctly, you do have few LXC (with individuals docker compose) and one to rule them all? Inside of each docker compose do you add a runing portainer to add it to the main one? or they are detected from the father portainer?

Can I see that portainer docker configuration? the father one I mean
Screenshot_6.jpg

To resume, run docker on many LXC as you need, install full portainer on one LXC and then setup

The Portainer Edge Agent

container on the dockers that you want to be controlled by portainer.

for an example to how to setup this, watch this video: https://www.youtube.com/watch?v=OC-SVcHnm74
 
Last edited:
View attachment 69964

To resume, run docker on many LXC as you need, install full portainer on one LXC and then setup

The Portainer Edge Agent

container on the dockers that you want to be controlled by portainer.

for an example to how to setup this, watch this video: https://www.youtube.com/watch?v=OC-SVcHnm74
Hi guys,
I'm new to proxmox and just did something that feels wrong. Installed a portainer in an lxc, then created stacks with my homepage, nginx and a twingate connector. But feels wrong about ha, and seems just going against proxmox concept.

@wolframio , thank you for your advice, your approach seems much more valid and easy to manage. I'll move to this kind of architecture !
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!