VOOZH about

URL: https://thenewstack.io/deploy-portainer-for-easier-container-management/

⇱ Deploy Portainer for Easier Container Management - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-03-12 10:00:54
Deploy Portainer for Easier Container Management
tutorial,
Cloud Native Ecosystem / Containers

Deploy Portainer for Easier Container Management

An investigation into Portainer for container management.
Mar 12th, 2022 10:00am by Jack Wallen
👁 Featued image for: Deploy Portainer for Easier Container Management

Containers can be a real challenge to manage. With so many moving parts and commands to work with, life can get a bit challenging. This is especially so as you scale up your deployments. One to make this a bit easier on you and/or your dev teams is to make use of a GUI tool that can be accessed from anywhere on your LAN. That way all of your developers can work much more efficiently, effectively, and reliably.

One such tool for this task is Portainer. This GUI can be deployed on top of Kubernetes, Docker, or Docker Swarm works seamlessly on a third-party cloud host or can be used on-prem or even at the edge.

Portainer gives you complete control over your containers, allowing you to pull images, create containers, networks and endpoints, and create registries. For anyone looking to employ a GUI to manage containers, you could do a lot worse than Portainer.

👁 Image

I’m going to walk you through deploying Portainer. I’ll be demonstrating on Ubuntu Server 20.04 with Docker, but the process will work with any platform that supports Docker or K8s. The only change you’ll have to make in the instructions is the installation of Docker for your operating system of choice. Of course, if you’re using this in the cloud, chances are pretty good you’re working with Linux, so the installation should be fairly straightforward.

Installing Docker

The first thing we must do is install Docker. Previously, I would have installed the version of Docker found in the standard repositories (with sudo apt-get install docker.io -y). However, we want to install the community edition of Docker, because that includes more features and is more regularly updated.

So, to install the Community edition, log into your Linux server and install the necessary dependencies with the command:

sudo apt-get install ca-certificates curl gnupg lsb-release -y

Next, we need to add the required GPG security key for Docker, which is done with:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

With the GPG added, create the Docker repository with:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Before we can install,  we must update apt:

sudo apt-get update

Finally, it’s time to install the Docker engine with:

sudo apt-get install docker-ce docker-ce-cli containerd.io

Once the installation completes, we then need to add our user to the docker group. If you skip this step, you will only be able to work with Docker using sudo, which is a security risk you do not want to take. To add your user to the group, issue the command:

sudo usermod -aG docker $USER

Log out and log back into the server so the changes will take effect.

Deploy Portainer with Persistent Storage

We’ll be deploying Portainer with persistent storage, on the off chance something goes wrong with the deployment, you’ll still have access to your data.

The first thing we must do is create a volume that will contain the data. Do that with the command:

docker volume create portainer_data

The above command will create a volume named portainer_data. We can now deploy Portainer, connecting it to the volume with the command:

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

The deployment command will take a few minutes to complete. When the command returns the container IDs for the now-running Portainer deployment, open a web browser and point it to https://SERVER:9443 (where SERVER is the IP address of your hosting server).

In the resulting screen (Figure 1), you’ll be asked to create an initial admin user.

👁 Portainer launch page.

Figure 1: Creating the initial admin user for Portainer.

Add a username and type/confirm a strong/unique password. Once you’ve done that, click Create user. Once you’ve done that, you’ll be automatically logged in with that new user credentials and you should see the Portainer Quick Setup window (Figure 2).

👁 Portainer setup window.

Figure 2: The new Portainer Quick Setup window is much easier than previous incarnations.

Note: When you first access the Portainer site, you might also have to accept the security risk, as Portainer uses self-signed certificates. That’s fine, just accept the risk and no harm will come of it.

Click Get Started to use the local environment or, if you need to connect to a remote environment click Add Environments. After clicking Get Started, you should see your local environment listed (Figure 3).

👁 Portainer environmental window.

Figure 3: The available environments will show up here.

Click on the listing marked local and you’ll be transported to the dashboard for that environment (Figure 4).

👁 Portainer dashboard.

Figure 4: The Portainer Dashboard for the locally installed container engine.

You can now start easily creating networks and volumes, pulling down images and deploying containers, and even adding registries and other environments.

Conclusion

Anyone looking to add a level of efficiency to their container deployments would do well to consider Portainer. With a user-friendly web-based GUI and all the tools you need to manage your deployments, Portainer should be considered a top choice for container management.

For more information on Portainer, check out the official Portainer documentation.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.