Start with a base Debian server, then update sources repository:
apt-get update
Installing pre-requisites:
apt-get install ca-certificates
apt-get install curl
apt-get install gnupg
apt-get install lsb-release
Get the official Docker GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
apt-get install docker.io
Enable (as part of start-up sequence) and Start Docker:
systemctl enable docker
systemctl status docker
Download, Install and Run Portainer:
docker run -d \
--name="portainer" \
--restart on-failure \
-p 9000:9000 \
-p 8000:8000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest