# Portainer A simple, efficient web ui for deploying docker containers. ## Inspiration / Sources - [https://www.portainer.io/](https://www.portainer.io/) - [https://github.com/portainer/portainer](https://github.com/portainer/portainer) ## Adjust firewall to allow access on internal network(s) ``` bash firewall-cmd --permanent --zone=internal --add-port 9000 firewall-cmd --permanent --zone=trusted --add-port 9000 firewall-cmd --reload ``` ## Install / Update / Run Script Setup a generic script that'll auto update Portainer and launch it. You should only run this script at first launch and/or when you're looking for updates. ``` bash mkdir -p /var/portainer cat > /root/portainer.sh << EOF #!/bin/bash ARCH=\`arch\` if [ \$ARCH == "aarch64" ] then ARCH="arm64v8" else ARCH="arm32v7" fi docker pull registry.lollipopcloud.solutions/\$ARCH/portainer:latest docker stop portainer docker rm portainer # Additional port map so can get to portainer w/o caddy # Use portainer to deploy our caddy container next docker run \\ --name portainer \\ --restart unless-stopped \\ --net docker-private \\ --ip 172.30.30.30 \\ -p 9000:9000 \\ -e TZ=UTC \\ -v /var/portainer:/data \\ -v /var/run/docker.sock:/var/run/docker.sock \\ registry.lollipopcloud.solutions/\$ARCH/portainer \\ --templates http://git.lollipopcloud.solutions/lollipop-docker/portainer/raw/branch/master/templates.\${ARCH}.json EOF chmod a+x /root/portainer.sh ``` ## Run Traefik Simply execute ```/root/portainer.sh``` to update/run. ## First Run 1. Navigate to ```https://172.30.30.30:9000``` in your web browser. If it prompts about a self-signed certificate, accept the prompt as valid. 1. You'll be asked to create an administrative account which should have a good password. This is the main account to login with for deploying services. 1. You'll be prompted to connect. Select ```Local``` and click ```OK``` 1. Under ```App Templates``` you'll see each of the different services we have setup as templates. If you click on one you can begin deploying services.