Portainer API Setup
To allow Portainer to add an environment. Docker must be configured to open the port for remote access. The firewall must also allow this port. Below is for no TLS.
Edit:
nano /lib/systemd/system/docker.service
Add the line and comment out the other ExecStart line.
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
Reload systemctl after the change
systemctl daemon-reload
Add fire exception (RHEL)
firewall-cmd --zone=public --add-port=2375/tcp --permanent
firewall-cmd --reload
Restart the service
systemctl restart docker.service