Uptime Kuma Alternative Go React
Welcome to this practical guide where we'll discuss how to set up a self-hosted, open-source uptime monitoring solution using a Go React alternative. This article is intended for experienced sysadmins.
# Self-Hosting Uptime Monitoring: A Go React Alternative for Your Homelab Infrastructure
Welcome to this practical guide where we’ll discuss how to set up a self-hosted, open-source uptime monitoring solution using a Go React alternative. This article is intended for experienced sysadmins and DevOps engineers who are familiar with Docker, Go, and React, aiming to automate their infrastructure monitoring tasks.
Prerequisites
- Docker: Ensure you have Docker installed (version 18.09.6 or later). You can install it using the following command:
apt install docker-ce=18.09.6
- Docker Compose: Make sure Docker Compose is also installed (version 1.27.4 or later). Install it with
sudo apt install docker-compose=1.27.4
- Go: Have Go installed (version 1.13.8 or later) on your system. You can download and install the latest version from the official website
- Node.js: Ensure Node.js is installed (version 14.x or later). Install it with
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
followed bysudo apt install -y nodejs
- Yarn: Install Yarn as a package manager for Node.js using the following command:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Solution Steps
- Clone the Uptime Go React repository:
git clone https://github.com/lavalamp-network/uptime-go-react.git
- Navigate into the project directory:
cd uptime-go-react
- Install dependencies: Run
yarn install
to install the required Node.js packages. Then, build the Go and React components usinggo build
andnpm run build
, respectively. - Create a .env file: In the project root directory, create a
.env
file with the following format:1 2 3
APP_PORT=80 API_KEY=YOUR_API_KEY_HERE # Add more environment variables as needed
- Configure Docker Compose: Update the
docker-compose.yml
file with your preferred networking, volume mounts, and service configurations:1 2 3 4 5 6 7 8 9 10 11
version: '3' services: app: image: uptime-go-react build: . ports: - "80:80" environment: - APP_PORT=80 - API_KEY=YOUR_API_KEY_HERE # Adjust network, volumes, etc. as needed
- Start the service: Run
docker-compose up
to start your self-hosted uptime monitoring solution. - Verify installation: Access the application at http://localhost. If everything is set up correctly, you should see your freshly installed Go React uptime monitor!
Troubleshooting
- Ensure that all required prerequisites are met before proceeding with the solution.
- Check for any errors during the build process and address them accordingly.
- Make sure the environment variables in both the
.env
file anddocker-compose.yml
are correctly configured.
Conclusion
With this guide, you now have a self-hosted uptime monitoring solution powered by a Go React alternative, providing an excellent addition to your homelab infrastructure. Remember to consider security best practices, such as restricting access to the application and keeping it updated regularly. Happy automating!