Makers Blog

How to install Portainer Agent on a PLCnext Control device

Martin [PLCnext Technology Team] 28 May 2025 min. read
301 views 0 comments

Portainer is a popular OCI container management platform.

For resource limited devices, installing Portainer Agent on the device allows it to be managed from a Portainer server.

The Portainer documentation describes how to install Portainer Agent on Podman. This article extends that example by describing how to install Portainer Agent on a PLCnext Control device using Podman Quadlets.

By using Podman Quadlets, containers and volumes can be managed as systemd services.

Notes and disclaimers:

  • This procedure requires a PLCnext Control device with firmware version 2025.0 or later.
  • The PLCnext Control device must be connected to the internet in order to download the Portainer Agent OCI image.
  • At the time of writing, Portainer only supports Podman running on the CentOS 9 operating system, which does not include PLCnext Control devices.
  • Phoenix Contact generally recommends that Podman on PLCnext Control devices is only used by PLCnext Store apps. The use of Podman for any other purpose is currently not supported by Phoenix Contact.
  • Devices running Portainer Agent can be managed from a full version of Portainer - either the Business Edition or the Community Edition - installed on a separate device. The management of Portainer Agent devices is covered in the Portainer documentation, and is not described in this article.

Procedure

  1. On the PLCnext Control device, create the file /etc/containers/systemd/portainer.volume with the following content:

    [Unit]
    Description=Portainer Agent Container Volume
    
    [Volume]
    VolumeName=portainer
    
  2. Create the file /etc/containers/systemd/portainer_agent.container with the following content:

    [Unit]
    Description=Portainer Agent Container
    Requires=portainer-volume.service
    
    [Container]
    ContainerName=portainer_agent
    Image=docker.io/portainer/agent:2.23.0
    Volume=/run/podman/podman.sock:/var/run/docker.sock
    Volume=/var/lib/containers/storage/volumes:/var/lib/docker/volumes
    Volume=/:/host
    PublishPort=9001:9001
    
    [Install]
    WantedBy=multi-user.target default.target
    
  3. Execute the following commands from the root user account:

    systemctl daemon-reload
    systemctl start portainer_agent.service
    

    Starting the service takes a while the first time, because the complete Portainer Agent image is loaded from docker.io.

  4. Check that the service has started successfully, using the following command:

    systemctl status portainer_agent.service
    

While the container is running, you can connect to the Portainer Agent on the PLCnext Control device from a Portainer Server, as described in the Portainer documentation.

By implementing the container in this way, Portainer Agent will automatically restart every time the PLCnext Control device restarts.

References

  1. Portainer documentation: "Install Portainer Agent on Podman"

  2. Daniel Schier: "Podman - Quadlets"

  3. Podman Quadlets technical reference.

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users