# Setup Portainer Agent
Created: 2023_02_25 16:16
Tags:
### From Fresh Rasbian
1. Update packages with: `sudo apt update && sudo apt upgrade`
2. Install Docker with: `sh -c "$(curl -sSL https://get.docker.com/)"`
3. Install some deps: `sudo apt install -y uidmap`
4. Setup docker to run rootless: `dockerd-rootless-setuptool.sh install`
- Runs docker on startup with systemd
5. Install Portainer Agent with: `sudo docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:latest`
- sudo only because `mkdir /var/lib/docker/volumes: permission denied.`
6.
I installed `mosh` for ease of access
TODO need to figure out how to get piface to be exposed to the internet on IPV4 is possible. Started looking through the ziggo box but didn't have enough time to do more there
## References
-