Skip to main content

Portainer - Installing on a Proxmox VM with Ubuntu Server

These are the steps to install Portainer on Proxmox using an Ubuntu Server VM

Part I: Ubuntu Server Installation​

  1. Download and ensure the Ubuntu server .iso is on your ProxmoxVE.
  2. Create a new VM with roughly the following.
    • Memory -> 4GB
    • Processor -> 2 Cores
    • HDD -> 30GB
  3. Navigate to the Console and start VM
  4. In Ubuntu Server 23.04.2 you may be asked to Update to the new installer - select this option
  5. Click TAB on your keyboard to move to the selection and the hit space bar for the type of install -> Ubuntu Server (minimized)
  6. 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 IPv4 and hit Enter again. Then in IPv4 Method: select Manual and 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
  7. Select Done and then Done again on the proxy config page
  8. The next page will test mirrors to see what's closest to you for your package downloads / updates. Select the closest or the default
  9. Guided Storage - use the Default Use an entire disk - this is the full volume we set for the VM
  10. Confirm the partitions - it's not important as we are in a VM
  11. Profile Setup - enter your name and Server login details you would like to use
  12. SSH Setup - hit space bar on the keyboard to select Install OpenSSH server so we can use terminal and also copy and paste commands - wouldn't work using the shell in Proxmox as it's in a VM.
  13. Skip the Options screen and select done to finish the install
  14. 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​

  1. SSH into the Ubuntu Server. On your local machine (on the same network as Proxmox), SSH firesoflife@10.2.1.11
  2. Once logged in, update and upgrade the systems: sudo apt update && sudo apt upgrade
  3. Use a curl command to install docker: curl -fsSL https://get.docker.com -o get-docker.sh
  4. Run docker: sudo sh get-docker.sh
  5. 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

  1. In terminal, create the Portainer volume. Run sudo docker volume create portainer_data
  2. 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
  3. Recall the Ubuntu server ip - 10.2.1.11 Also 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.
  4. To access the web UI, navigate to https://10.2.1.11:9443
  5. It's not got a SS:L that your browser recognizes so accept the "risk" and continue
  6. 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