This is part 4 of my mini series
To self host our services we are going to use docker, we can then use our nginx service as a reverse proxy to manage and maintain our chosen self host things!.
There are 100's of guides online about installing and configuring docker community edition, I'm not going to rewrite these and I will lazily point you here to a good one by Digital Ocean.
What I would like to add however for new users is a few container 'gotchas'. Some containers don't have what's referred to as persistent volumes by default. This means if you remove or recreate the container the data may not persist.
We're going to use a service called Portainer to give us a GUI to manage our containers.
Install Portainer
Create a persistent volume for your container.
docker volume create portainer_data
Install Portainer
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:lts
Portainer should show as running
docker ps
9b559d7a21c7 portainer/portainer-ce:lts "/portainer" 3 weeks ago Up 35 minutes 0.0.0.0:8000->8000/tcp, [::]:8000->8000/tcp, 0.0.0.0:9443->9443/tcp, [::]:9443->9443/tcp, 9000/tcp portainer
This gives you an easy GUI you can visit on 127.0.0.1:9443 (or your server IP/domain name. You can manage docker volumes, networks etc using this.
Now we just need to put it all together.