Portainer consists of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine. This document will help you install the Portainer Server container on your Linux environment.
-
Before setting everything else, create a directory where the configuration files will reside. Ensure that the directory exists and appropriate permission have been granted.
$ mkdir -vp ~/docker/portainer/data
-
Modify the
.env
file, you can fine tune these configurations to meet your requirements.PORTAINER_IMAGE=portainer/portainer-ce:2.14.2 PORTAINER_HOME=~/docker/portainer PORTAINER_PORT_8000=8000 PORTAINER_PORT_9443=9443
-
Make sure you are in the same directory as docker-compose.yml and start Portainer:
$ docker-compose up -d
-
If something else goes wrong, for more detailed tutorial can be found on the Portainer Website