Expected Reading Time: 8 minutes

Portainer is an open source management platform designed to simplify and automate the management of Docker and Kubernetes environments. It offers a user-friendly web interface that enables even less experienced users to effectively manage container orchestration platforms.

This blog post and video is part of a series in which we create and set up our own home server. We start with the basics like an Ubuntu VM installation with Docker and then continue with the configuration of your own domain, security precautions and above all lots of cool and useful self-hosted services. Whether media servers like Plex or Jellyfin or document management like Paperless-NGX. Together we'll build the setup you want to see. We even tackle topics such as single sign-on (SSO) together.

These are some of Portainer's key functions:

  1. Simple operation: Portainer provides an intuitive graphical user interface (GUI) that makes it easy to manage containers, images, networks and volumes in Docker.
  2. Support for Docker and Kubernetes: Portainer is compatible with Docker Swarm and Kubernetes, making it a versatile platform for container management.
  3. template system: With predefined templates, users can quickly and easily create new container instances for common applications and services.
  4. User and team management: Portainer makes it possible to create and manage different user accounts and teams, which is especially useful for larger teams and organizations.
  5. Access control and security: Portainer provides advanced access control mechanisms and security features to ensure that only authorized users have access to the container environments.
  6. Expandability and integration: Portainer can be integrated into existing systems and can be extended to meet specific needs and requirements.
  7. Monitoring and logs: It offers monitoring and logging functions to monitor the status and performance of the containers.

Portainer is particularly useful for companies looking to get started with containerization, as well as for experienced Docker and Kubernetes users looking for more efficient and simplified management of their container environments.

Portainer versions explained

Portainer offers two main versions: Portainer Community Edition (CE) and Portainer Business Edition (BE). Both versions are designed to simplify the management of Docker and Kubernetes, but they differ in terms of functionality, target group and pricing.

Portainer Community Edition (CE)

  • Free of chargePortainer CE is a free version that is ideal for small businesses, developers and technology enthusiasts.
  • Open SourceAs an open source project, users can contribute to the development and customize the software according to their needs.
  • Basic functionalitiesPortainer CE provides basic management functions for Docker and Kubernetes, including the management of containers, images, networks and volumes.
  • Community supportPortainer CE users receive community support, which means that help and resources are mainly provided through online forums and the user community.

Portainer Business Edition (BE)

  • ChargeablePortainer BE is a paid version designed specifically for larger companies and organizations that require advanced management and security features.
  • Advanced functionsIn addition to the functions of the Community Edition, Portainer BE offers advanced functions such as Role-Based Access Control (RBAC), LDAP/AD integration, OAuth authentication, multi-tenancy, advanced audit functions and much more.
  • Support for multiple platformsPortainer BE supports a wider range of platforms and offers improved support for multi-cluster management.
  • Prioritized supportBusiness Edition users receive prioritized support from Portainer, including direct support from the Portainer development team and access to dedicated resources.

Conclusion

  • For developers, at home and smaller teams Portainer CE is an excellent choice because it is free and flexible to use.
  • For larger companies or special requirements Portainer BE offers additional security and management features that may be necessary in larger or more security-conscious environments.

Requirements

  • Docker must be installed: Before you install Portainer, make sure that Docker is installed on your system. You can find out how to install Docker on my YouTube channel.

Steps for installing Portainer

1. create portainer container

You can run containers as Docker containers. First, however, you should consider how the container data should be stored. If the folder does not yet exist, create it with the command sudo mkdir /mnt/cache/appdata. Then open a command line or a terminal and enter the following command:

docker run -d -p 8000:8000 -p 9443:9443 --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /mnt/cache/appdata/portainer:/data portainer/portainer-ce

Explanation of the command:

  • docker run -d -p 9443:9443 --name portainerStarts a new Docker container in the background and opens port 9443 for web access. Remember that it is a https:// port!
  • --restart=always: Ensures that the container restarts automatically if it crashes or the system is restarted.
  • -v /var/run/docker.sock:/var/run/docker.sockIncludes the Docker socket so that Portainer can manage Docker on the host system.
  • -v /mnt/cache/appdata/portainer:/dataBinds the specified folder path to the container to save data permanently.
  • portainer/portainer-ce: Specifies the image to be used (here the Community Edition of Portainer).

2. access to Portainer

After the container has been started, you can access the Portainer interface by opening a web browser and entering the following URL:

https://:9443/

Replace <Deine-IP-Adresse> with the IP address of your server or with localhostif you are working on the same device.

3. initial configuration

The first time you access Portainer, you will be asked to create an administrator user. Enter a user name and a secure password. Once you have entered this information, click on "Create user".

4. start administration

As soon as the setup is complete, you can start managing your containers via the Portainer interface.

Additional configurations

  • UpdatesTo update Portainer, stop the container, remove it and re-execute the command to create the container with the latest Portainer version.
  • Security: Make sure that access to the Portainer web interface is secure, especially if you make it accessible via the Internet.

Add templates

1. call up settings

After you have logged in, navigate to the menu item "Settings" on the left sidebar.

2. template configuration

In the settings, you will find an area called "App Templates". Here you can enter the URL to the template repository. One of the largest and best known is the following repository: https://github.com/Lissy93/portainer-templates

3. add URL

Enter the URL of the JSON file that contains your template definitions. This JSON file should be in the correct format so that Portainer can interpret it. Here is an example of the format of such a JSON file:

[
  {
    "type": 1,
    "title": "Nginx",
    "description": "Simple Nginx web server",
    "categories": ["Webserver"],
    "platform": "linux",
    "logo": "https://example.com/logo.png",
    "image": "nginx:latest",
    "ports": ["80:80"]
  }
]

4. save changes

After you have entered the URL, scroll down and click on "Save settings" to apply the changes.

5. use templates

Go to the "App Templates" section on the left sidebar. Here you should now see the new templates that have been loaded from the URL you specified. You can now use these templates to create new container instances.

Tips

  • Make sure that the URL to the JSON file is publicly accessible and that it has the correct format.
  • Check whether the Docker images specified in the templates are available on your system or can be downloaded from public registries.
  • If you make changes to the template file, it may be necessary to save the settings in Portainer again in order to apply the updates.

By adding templates through a URL, you can quickly and easily use multiple predefined container configurations in Portainer, which greatly simplifies the container deployment process.

YouTube video implementation

Conclusion

Portainer has established itself as a valuable resource for managing Docker and Kubernetes environments. Not only does it simplify entry into the world of containerization with its user-friendly interface, but it also offers advanced features that are beneficial to organizations of all sizes. The Community Edition of Portainer, free and open to contributors, is ideal for individual developers, startups and smaller teams looking for a powerful but cost-effective solution. On the other hand, the Business Edition, with its advanced management and security features, including RBAC, LDAP/AD integration and prioritized support, provides a robust solution for larger enterprises and organizations that require tighter control and scalability of their container infrastructures.

The template system, multi-platform support and extensible integration options make Portainer an indispensable tool for the efficient management of modern IT environments. The intuitive user interface makes the complex world of container technologies more accessible and manageable for technicians of all skill levels.

In conclusion, whether you are just starting out with containerization or are a seasoned professional looking for an enhanced management solution, Portainer provides the tools and resources you need to efficiently control and optimize your container environments. By choosing between the Community Edition and the Business Edition, users can select the version that suits their specific needs and budgets.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

en_US