Skip to content
Neil Cresswell, CEO August 28, 2022 2 min read

Portainer Edge - Bulk Device Onboarding

So, a new feature added to Portainer business in 2022 was the ability to bulk onboard any number of edge devices into Portainer.

This feature leverages a generic "discovery" mechanism that pre-configures remote environments to announce themselves to your Portainer instance, allowing the admin to selectively "admit" devices for centralised management.

Let me show you.

First up, make sure you have a copy of Portainer running, and that its correctly configured to support edge devices (Port 9443/8000 or 30779/30776 depending on your deployment).

Once you have that, log into Portainer (make sure its a recent version, ie 2.14.2 or newer), and navigate to "Settings / Edge Compute" and scroll down until you see "Automatic Edge Environment Creation"

Note the Portainer URL, as this is the URL that the remote devices will use to connect to your Portainer instance. Make sure its correct and resolvable by the remote device. Also, make sure its HTTPS.

For security, we recommend leading the "disable edge environment waiting room" switched off, as turning this on will automatically authorise any remote environment presenting itself to this Portainer instance using the bulk-onboarding script. By default, we hold any requests in a waiting room pending Admin approval.

In the "edge ID generator" enter in a remote device environment / system variable that we can use as a unique identifier. We recommend "hostname" but you can use anything that is available as a variable on the remote device.

Copy the command applicable to your remote environment, in my case, Docker standalone. This is a generic command that can be used multiple times to onboard ANY remote device into your Portainer instance. No changes are needed regardless of the number of times used.

Now, SSH to your remote devices (or run an automated script that SSHs to each of them, and run the command copied from above.. for this blog, i am deploying onto 3x Docker Standalone Hosts.

Now, back in Portainer, navigate to "edge compute" in the sidebar, and then click on "edge devices". Note that there are no edge devices listed.

Click on "Waiting Room", and see that your devices are in there, waiting to be Assoicated.

Select one or more devices, then click on "Associate Device". Look for the success confirmation.

Now go back to "edge devices" and see the three are listed and have a green heartbeat.

You are now able to remotely manage the devices, using either the "edge stacks" option, or interactively, by navigating to them by clicking the 3 dots and selecting "browse".

This is how easy it is to use the bullk-onboarding script, and the edge waiting room to onboard remote devices into Portainer.

If you're just getting started with Portainer for Edge, you might enjoy this blog post on Using the Portainer Edge Agent, Edge Groups, and Edge Stacks - Part 1.



Neil Cresswell, CEO

Neil brings more than twenty years’ experience in advanced technology including virtualization, storage and containerization.