Portainer - Installing on a Proxmox VM with Ubuntu Server
These are the steps to install Portainer on Proxmox using an Ubuntu Server VM
info
Inspirational Resource: https://www.youtube.com/watch?v=wrlukx-QYRw
Part I: Ubuntu Server Installation​
- Download and ensure the Ubuntu server .iso is on your ProxmoxVE.
- Create a new VM with roughly the following.
- Memory -> 4GB
- Processor -> 2 Cores
- HDD -> 30GB
- Navigate to the Console and start VM
- In Ubuntu Server 23.04.2 you may be asked to
Update to the new installer- select this option - Click
TABon your keyboard to move to the selection and the hit space bar for the type of install ->Ubuntu Server (minimized) - Set a static IP - Ubuntu will default to a DHCP IP, which is handy if you don't know which IP's are free. I'll use the one it dished out to me. Move to your interface and hit Enter on your keyboard. Move the selector down to
Edit IPv4and hit Enter again. Then inIPv4 Method:selectManualand enter your appropriate IPv4 details. My setup:- Subnet -> 10.2.1.0/24
- Address -> 10.2.1.11
- Gateway -> 10.2.1.42
- Name servers -> 10.2.1.42, 1.1.1.1
- Select
Doneand thenDoneagain on the proxy config page - The next page will test mirrors to see what's closest to you for your package downloads / updates. Select the closest or the default
- Guided Storage - use the Default
Use an entire disk- this is the full volume we set for the VM - Confirm the partitions - it's not important as we are in a VM
- Profile Setup - enter your name and Server login details you would like to use
- SSH Setup - hit space bar on the keyboard to select
Install OpenSSH serverso we can use terminal and also copy and paste commands - wouldn't work using the shell in Proxmox as it's in a VM. - Skip the Options screen and select done to finish the install
- Select
Reboot- you'll see an error because the VM thinks there is a real disc installed. Just hit the Enter key and it'll clear and reboot
Part II: Install Docker in Ubuntu Server​
- SSH into the Ubuntu Server. On your local machine (on the same network as Proxmox),
SSH firesoflife@10.2.1.11 - Once logged in, update and upgrade the systems:
sudo apt update && sudo apt upgrade - Use a curl command to install docker:
curl -fsSL https://get.docker.com -o get-docker.sh - Run docker:
sudo sh get-docker.sh - Test if Docker is running:
sudo systemctl status docker
Part III: Install Portainer in Docker​
References: https://docs.portainer.io/start/install-ce/server/docker/linux
- In terminal, create the Portainer volume. Run
sudo docker volume create portainer_data - Next we run the docker run command to create the container for Portainer:
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
- Recall the Ubuntu server ip -
10.2.1.11Also note the ip address that Portainer is running on as I've seen it load on 9000 but also on other ports in a range. Today I got 9443. - To access the web UI, navigate to
https://10.2.1.11:9443 - It's not got a SS:L that your browser recognizes so accept the "risk" and continue
- Set your username and choose a 12 digit!!! password. Yes 12. (mine is this -By=M7VSBddJzYY don't tell anyone) Note - you need to navigate to the Portainer user creation screen quick and get your data entered as it times out ... fast. If you get an error about timing out, the easiest thing to do is to restart Ubuntu server in Proxmox