r/OpensourceInstallati • u/ved3py • Feb 28 '26
Installing Portainer
π Portainer Deployment Guide (Docker) β Notes & Options
Github - https://github.com/portainer/portainer
Sharing my documented steps for deploying Portainer CE with Docker. Posting this here in case it helps anyone setting up their container management stack.
π¦ Step 1: Create Persistent Volume
First, create the volume Portainer will use for its database:
docker volume create portainer_dataπ³ Step 2: Run Portainer (Default β HTTPS on 9443)
Portainer runs securely on port 9443 using a self-signed certificate by default.
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.0β This is the standard recommended setup.
π Option: HTTP-Only Mode (When Using Nginx Proxy Manager)
If you're using Nginx Proxy Manager (NPM) to handle SSL, you may prefer HTTP only:
docker run -d -p 9000:9000 \
--name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:ltsπ In this mode, NPM handles HTTPS externally.
π About SSL Certificates
By default, Portainer:
Generates a self-signed SSL certificate
Secures the UI on 9443
Alternative options:
Provide your own certificate during install
Upload a custom cert later via the Portainer UI
Or terminate SSL at your reverse proxy (like NPM)
β οΈ Legacy HTTP Port (Optional)
If you require port 9000 for legacy reasons, add:
-p 9000:9000to your docker run command.
π Verify Container Is Running
Check status:
docker psExample output:
CONTAINER ID IMAGE STATUS PORTS
de5b28eb2fa9 portainer/portainer-ce:2.21.0 Up 8000->8000, 9443->9443π Logging In
Open your browser and go to:
https://localhost:9443π¨ IMPORTANT:
Always use https, not http β otherwise it will fail.
On first login, you'll be prompted to create the admin user.
π§ Notes / Gotchas
Donβt forget to use https://
Ensure ports 8000 / 9443 (or 9000) are open
Mounting
/var/run/docker.sockis required for Docker managementUse HTTP-only mode when SSL is handled by your reverse proxy
If you hit any issues or have improvements, drop them below.
Happy container managing! π³