I used this guide to install portainer: https://docs.portainer.io/start/install-ce/server/docker/linux

First, we create a volume for portainer

docker volume create portainer_data

Then,

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:2.21.4

This puts portainer’s webui on port 9443

When you go to the ui for portainer, it won’t have a trusted certificate, so you’ll have to accept the risk and continue

My username is admin and my password is in bitwarden

VM has a hostname, dockerhost

It has a static ip: 192.168.2.6