I have become addicted to Docker, and I feel like I have just started using it. It’s like the fun of discovering open source software but for the whole home-lab. It’s like Christmas learning about all of these tools that I can power up with a single command. It’s time to make it official and put it on my main server.
First step was to setup the apt repository for Docker:
Note: at first, I tried without the “Architectures: amd64” line in the sources file. It failed trying to look for i386 packages. After adding that line, the update worked fine. This was the error:
N: Skipping acquire of configured file 'stable/binary-i386/Packages' as repository 'https://download.docker.com/linux/ubuntu jammy InRelease' doesn't support architecture 'i386'
Now, I want Portainer installed to make managing it remotely much easier. It gives me an interface I can connect to in my browser and start/stop or even create containers.
First, I wanted to make sure I wasn’t setting up conflicting ports:
sudo ss -tunlp
Then, I ran this command to install the container:
After it loaded, I went to the address https://<my server>:9443/
When the website came up in the browser, I had to bypass the certificate error. It prompted me to create the admin user. After that, I was in and it was running/installed.
Nginx Proxy
Maybe it’s just because I can, but I’d like to make things nice and provide a unified interface for all my containers. So, I’ll install the Nginx Proxy so I can just put all of the services in one site under different URLs.
The instructions say to use a docker compose file. Just to keep things consistent, I converted it to a command:
Note: I initially left off the letsencrypt volume with the thinking that I wasn’t going to use that. (I planned to only use custom/local certificates.) This is the error that I get:
ERROR: /etc/letsencrypt is not mounted! Check your docker configuration.
Once running, I went to http://<server ip>:81 That asked me to create an account.
I had issues setting up the proxy host. To research, I had to look in the proxy host log file. You can confirm the location in the volumes page of portainer. For me, it was in /var/lib/docker/volumes/nginx_data/_data/logs and the log file was proxy-host-1_error.log
I was able to setup the front page to point to portainer by adding a Proxy Host:
Unfortunately, I was not able to put Portainer under a custom location. Portainer takes one look at the URL and says, I don’t know what to do. So, this didn’t work: