Introduction
In this guide, I’ll walk you through setting up Uptime Kuma, a self-hosted monitoring tool, in a Docker container using NFSv4 for persistent storage. This setup is part of my homelab, where I experiment with containerization and various technologies.
Prerequisites
Before starting, ensure you have the following:
- NFS Server: I’m using TrueNAS on an HP EliteDesk.
- Docker Host: My Docker server runs on a separate HP EliteDesk.
Step 1: Export an NFS Share
Begin by exporting an NFS share from your NFS server. In my case, I exported the directory /mnt/pool0/nfs/docker-volumes
from TrueNAS.
Next, SSH into your Docker server and mount the NFS share. For example:
sudo mount -t nfs4 lilmt.qth.nv9p.com:/mnt/pool0/nfs/docker-volumes /mnt/nfs
Once mounted, create a directory for Uptime Kuma’s persistent data:
mkdir -p /mnt/nfs/uptimekuma-data
This directory will store all the container’s data.
Step 2: Create a Volume in Portainer
I use Portainer to manage my Docker containers. To create a volume:
- Access the Portainer web interface.
- Navigate to Volumes and click Add Volume.
- Fill in the NFS server details, including the mount point (
/mnt/nfs/uptimekuma-data
), and click Create the volume.
Step 3: Deploy the Uptime Kuma Container
Now, create the Uptime Kuma container:
- Go to the Containers section in Portainer and click Add Container.
- Name the container and use the official Uptime Kuma image:
louislam/uptime-kuma
. - Under Network, map port
3000
on both the host and container. - Scroll to the Volumes section and map the NFS volume:
- Set the container path to
/app/data
. - Select the NFS volume created earlier.
- Set the container path to
Finally, click Deploy the container.
Step 4: Access Uptime Kuma
Once the container is running, navigate to your Docker server’s IP address on port 3000
to access Uptime Kuma. For example:
http://docker-01.qth.nv9p.com:3000
You should see the Uptime Kuma interface, ready for configuration.
Conclusion
By leveraging NFSv4 for persistent storage, you can efficiently manage Uptime Kuma in a Docker container. This setup ensures data persistence and simplifies container management using Portainer. Happy monitoring!

I am a Systems Engineer that loves solving problems with technology. I have worked in technology for over 20 years and use modern tools and methodologies to deploy and maintain systems. I am passionate about learning and sharing knowledge with others.
Contact me: