Install Portainer on Linux

A bit of system administration

Page content

Probably shoud call this platform engineering now. Here are some notes on how to install connect and remove the Portainer - docker images and containers manager UI.

containers-in-docks

When

This allows running Docker commands without sudo:

sudo usermod -aG docker $USER

First, create the volume that Portainer Server will use to store its database:

docker volume create portainer_data

Then, download and install the Portainer Server container:

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

just https:

docker run -d \
  -p 9443:9443 \
  --name portainer \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data portainer/portainer-ce:lts

By default, Portainer generates and uses a self-signed SSL certificate to secure port 9443. Alternatively you can provide your own SSL certificate during installation or via the Portainer UI after installation is complete.

Portainer Server has now been installed. You can check to see whether the Portainer Server container has started by running docker ps:

root@server:~# docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED       STATUS      PORTS                                                                                  NAMES             
de5b28eb2fa9   portainer/portainer-ce:lts     "/portainer"             2 weeks ago   Up 9 days   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp   portainer

Using Portainer

You should see a container named portainer with the relevant ports exposed

  1. Access the Portainer Web UI

    Open your browser and go to:

    https://your-server-ip:9443 (for HTTPS, recommended)

    http://your-server-ip:9000 (if you enabled legacy HTTP port)

  2. Set up the admin account

    On first launch, Portainer prompts you to create an admin password.

    Choose “Docker” as the environment to manage, then connect.

  3. Start managing your containers

    Use the Portainer dashboard to:

    • View, start, stop, and remove containers
    • Manage images, networks, and volumes
    • Deploy new applications using templates

How to Stop and Remove Docker Portainer

To completely stop and remove Portainer from your Docker environment, follow these steps:

1. Stop the Portainer container

docker stop portainer

This halts the running Portainer container.

2. Remove the Portainer container

docker rm portainer

This deletes the container from your system.

3. (Optional) Remove the Portainer data volume

If you want to delete all Portainer data (such as settings and user accounts), also remove the data volume:

docker volume rm portainer_data

Warning: This action is irreversible and will permanently erase all Portainer data.


If you used a different container or volume name, substitute portainer and portainer_data with your actual names.

These steps will fully stop and remove Portainer from your Docker host.