Skip to main content

New Proxmox / Docker Server Deployment guide

Deployment Summary

Here, we will document the general steps to deploy a Proxmox / Docker setup.

  • Install Proxmox Development Environment.
  • Fix the repositories. We need to remove the enterprise repos and add the no-subscription repos
nano /etc/apt/sources.list.d/pve-enterprise.list

Comment out the enterprise entry with # and save

/etc/apt/soruces.list.d/ceph.list

Comment out the entry here as well.

nano /etc/apt/sources.list

Check one of my running servers to see what it has, but my newer one has this

deb http://ftp.debian.org/debian bookworm main contrib
deb http://ftp.debian.org/debian bookworm-updates main contrib

# Proxmox VE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

# security updates
deb http://security.debian.org/debian-security bookworm-security main contrib

 

deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
  • Update and Upgrade the server
apt update && apt upgrade
Possibly important, maybe not

This below command- I'm not sure it makes sense, so I wouldn't run it, but Allyn gave it to me so it may be necessary. I'm confused because it says apt-get install when we never use apt-get.

apt update && apt upgrade -y && reboot apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties common
  • Uhh, adds some docker repo key? Fuck if I know.
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
  • Add the Docker Repo, so we can install docker.
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
  • If using ZFS, create mount points for rpool/docker. If you aren't, skip this step.
zfs create -o mountpoint=/var/lib/docker rpool/docker
zfs create -o mountpoint=/config rpool/config
mkdir /etc/systemd/system/docker.service.d
nano /etc/systemd/system/docker.service.d/storage-driver.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --storage-driver=zfs -H fd://
  • Install Docker via the following command
apt update && apt install docker-ce docker-ce-cli containerd.io -y
  • Check Stroage Driver - probably checking to see if ZFS is the Storage Driver. Only applicable if you user ZFS.
docker info | grep Storage

Installing Portainer

  • Create a ZFS pool for Portainer. This enables ZFS features for the container.
zfs create rpool/config/portainer
  • Install Portainer by running this command
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /config/portainer:/data portainer/portainer-ce:latest

Installing Portainer App Templates

  • Install the following URL into the App Templates area in Portainer Settings.

https://raw.githubusercontent.com/ntv-one/portainer/main/template.json

https://raw.githubusercontent.com/portainer/templates/master/templates-2.0.json - this was mine idk