# 16: Uptime Kuma - Uptime Monitoring & Status Pages

Uptime Kuma is a beautiful, self-hosted monitoring tool that watches your websites, servers, and services 24/7. It tells you immediately when something goes down, shows you uptime statistics, and can even create public status pages (like status.github.com) to show your users that everything is working.

For advanced features, API documentation, and customization options, see the [official Uptime Kuma documentation](https://github.com/louislam/uptime-kuma).

## Why Uptime Kuma?

- ✅ **24/7 monitoring** - Know immediately when something breaks
- ✅ **Beautiful dashboard** - See all your services at a glance with colorful graphs
- ✅ **90+ notification options** - Get alerts via Discord, Slack, Email, Telegram, and many more
- ✅ **Public status pages** - Create beautiful status pages to share with your users
- ✅ **Docker monitoring** - Monitor your Docker containers automatically
- ✅ **Multiple monitor types** - Websites, APIs, ports, DNS, and more
- ✅ **Uptime statistics** - See how reliable your services are over time
- ✅ **Free and open source** - No subscription fees, runs on your server

## Prerequisites

- ✅ **Docker running** (from Chapter 3)
- ✅ **Optional: Traefik installed** (from Chapter 4) for HTTPS access with a domain
- ✅ **Optional: Subdomain** (from Chapter 4.5), e.g., `status.yourdomain.com`

**Note:** Uptime Kuma works great with Traefik and a domain name. Having a friendly URL like `status.yourdomain.com` makes it easy to access your monitoring dashboard and share status pages.

## Step 1: Start Infinity Tools

```
sudo infinity-tools
```

## Step 2: Install Uptime Kuma

1. Go to **📱 APPLICATIONS**
2. Select **Uptime Kuma**
3. Choose **Install Uptime Kuma**

### Using the Infinity Tools GUI

- Use **↑/↓** to move, **Enter** to select, **Esc** to go back
- Look for the **turquoise cursor** indicating the current selection
- Each screen shows a short description at the top explaining what's needed

### Step 2.1: Choose SSL Mode

You'll see two options. Here's what each means:

- **Traefik (recommended)**
    - **What it is:** Uses your domain name with a trusted HTTPS certificate from Let's Encrypt
    - **What you need:** A subdomain (e.g., `status.yourdomain.com`) pointing to your server (see Chapter 4.5)
    - **What you get:** Professional URL like `https://status.yourdomain.com` with trusted SSL
    - **Pick this if:** You want secure, easy access with a domain name (recommended)
- **Standalone HTTP**
    - **What it is:** Uses HTTP with direct port access (no SSL)
    - **What you need:** Just a free port (default: 3001)
    - **What you get:** URL like `http://SERVER_IP:3001`
    - **Pick this if:** You're just testing or only using it on your local network

**Simple rule of thumb:** Use **Traefik** if you have a domain and want secure access. Use **Standalone HTTP** only for testing or private use.

### Step 2.2: If You Choose Traefik

1. Enter your subdomain, e.g., `status.yourdomain.com`
2. Ensure the subdomain's DNS A record points to your server (see Chapter 4.5)
3. Infinity Tools will configure HTTPS automatically via Let's Encrypt

**After install:** Your Uptime Kuma will be available at `https://status.yourdomain.com`

### Step 2.3: If You Choose Standalone

1. Pick a port (default: 3001)
2. You'll access Uptime Kuma via `http://SERVER_IP:3001`

### Step 2.4: Docker Container Monitoring (Optional)

You'll be asked if you want to enable Docker container monitoring:

- **Yes**
    - **What it does:** Uptime Kuma can monitor your Docker containers automatically
    - **What you get:** Alerts when containers stop, health status monitoring
    - **Pick this if:** You want to monitor your Docker containers (recommended if you use Docker)
- **No**
    - **What it does:** Only monitors websites, APIs, and ports (not Docker containers)
    - **Pick this if:** You don't use Docker or don't need container monitoring

### Step 2.5: Timezone (Optional)

You can set your timezone for monitoring logs and graphs. Examples:

- `America/New_York`
- `Europe/London`
- `Asia/Tokyo`

Leave empty for UTC (default).

### What Happens During Installation

- Uptime Kuma container is created
- Data directory is set up at `/opt/speedbits/uptime-kuma`
- Optional domain + Traefik HTTPS routing (if using Traefik)
- Optional Docker socket access (if Docker monitoring enabled)
- Service starts and becomes accessible

## Step 3: Access Uptime Kuma

### If Using Traefik

1. Wait 30-60 seconds for SSL certificate generation
2. Open `https://status.yourdomain.com` in your browser
3. You'll see the Uptime Kuma setup wizard

### If Using Standalone

1. Open `http://SERVER_IP:3001` in your browser
2. You'll see the Uptime Kuma setup wizard

## Step 4: Create Your Admin Account

**⚠️ CRITICAL:** Uptime Kuma requires you to create admin credentials on your FIRST login. There is NO default password!

### Setup Steps

1. You'll see: "Create your admin account"
2. Enter a username (choose any username you like)
3. Enter a password: 
    - Minimum: 8 characters
    - Recommended: 12+ characters
    - Best: 20+ characters (use a password manager!)
4. **⚠️ WRITE DOWN YOUR CREDENTIALS IMMEDIATELY!**
    - This is your ONLY chance to set the initial password
    - There is NO "forgot password" on first setup!
    - Use a password manager (like Vaultwarden from Chapter 7) to store it securely
5. Click "Create"
6. ✅ Done! You'll see the monitoring dashboard

### If You Forget Your Password

Don't worry! You can reset it using the command line:

1. Run: `docker exec -it uptime-kuma npm run reset-password`
2. Enter your username
3. Enter a new password
4. Log in with your new password

## Step 5: Add Your First Monitor

Now that you're logged in, let's start monitoring something!

### Adding a Monitor

1. Click **"Add New Monitor"** (big button on the dashboard)
2. Choose monitor type: 
    - **HTTP(s)** - Monitor websites and APIs
    - **TCP Port** - Monitor if a port is open (SSH, databases, etc.)
    - **Ping** - Check if a server responds
    - **Docker Container** - Monitor Docker containers (if enabled)
    - **DNS** - Check DNS records
    - And more!
3. Enter the URL or IP address to monitor
4. Set check interval (default: 60 seconds - how often to check)
5. Click **"Save"**

### Example: Monitor Your Website

1. Type: **HTTP(s)**
2. URL: `https://yourdomain.com`
3. Check interval: 60 seconds
4. Click "Save"

Uptime Kuma will now check your website every 60 seconds and show you if it's up or down!

## Step 6: Set Up Notifications

To get alerts when something goes down, you need to configure notifications.

### Setting Up Notifications

1. Go to: **Settings** → **Notifications**
2. Click **"Setup Notification"**
3. Choose a provider: 
    - **Discord** - Get alerts in Discord
    - **Slack** - Get alerts in Slack
    - **Telegram** - Get alerts via Telegram
    - **Email** - Get alerts via email
    - **Apprise** - Use Apprise for 80+ services (if you have Apprise installed)
    - And 80+ more!
4. Follow the setup instructions for your chosen provider
5. Test the notification
6. Click "Save"

### Using Apprise (If Installed)

If you have Apprise installed (Chapter 5), you can use it for notifications:

1. Type: **Apprise (Self-hosted)**
2. URL: `http://apprise:8000/notify/{YOUR-KEY}`
3. This lets you use all 80+ Apprise notification services!

## Step 7: Create a Status Page (Optional)

Status pages let you show your users that your services are working. They're public (no login required) and look professional.

### Creating a Status Page

1. Go to: **Status Pages**
2. Click **"New Status Page"**
3. Enter a name, e.g., "My Services Status"
4. Choose which monitors to display publicly
5. Customize the appearance (colors, logo, etc.)
6. Click **"Save"**
7. Share the public URL with your users!

## What You Can Monitor

### Monitor Types

- 🌐 **HTTP(s) websites** - Check if websites are online
- 🔌 **TCP ports** - Check if ports are open (SSH, databases, etc.)
- 🏓 **Ping (ICMP)** - Check if servers respond
- 📝 **DNS records** - Check DNS configuration
- 🐳 **Docker containers** - Monitor container health (if enabled)
- 🔍 **Keyword detection** - Check if a page contains specific text
- 📧 **SMTP email servers** - Check if email servers work
- 💬 **gRPC services** - Monitor gRPC APIs

### What You'll See

- 📊 **Dashboard** - All monitors at a glance with colorful status indicators
- 📈 **Uptime graphs** - See uptime percentages over time
- ⏱️ **Response times** - See how fast your services respond
- 📋 **Incident history** - See when things went down and came back up
- 🔔 **Alerts** - Get notified immediately when something breaks

## Security Recommendations

- ✅ **Use Traefik mode** - Provides trusted SSL certificates
- ✅ **Strong password** - Use a password manager to generate strong passwords
- ✅ **Enable 2FA** - Go to Settings → Security → Two-Factor Auth
- ✅ **Regular backups** - Uptime Kuma data is stored in `/opt/speedbits/uptime-kuma`
- ✅ **Protect admin panel** - Monitoring data can be sensitive, keep it secure!
- ✅ **Use status pages** - Share public status pages instead of giving access to the admin panel

## Troubleshooting

### Can't Access Uptime Kuma

- **Traefik mode:** Wait 30-60 seconds after installation for SSL certificate generation
- **Check containers:** Run `docker ps | grep uptime-kuma` to see if container is running
- **Check logs:** Run `docker logs uptime-kuma` to see error messages

### Can't Create Admin Account

- Make sure you're accessing Uptime Kuma for the first time (no account exists yet)
- Check container logs: `docker logs uptime-kuma`
- Try resetting: `docker restart uptime-kuma`

### Monitors Not Working

- Check that the URL or IP address is correct
- Verify the service is actually running
- Check firewall rules (ports might be blocked)
- Look at monitor details for error messages

### Notifications Not Sending

- Test the notification in Settings → Notifications
- Check notification provider settings (Discord webhook, email SMTP, etc.)
- Verify network connectivity from the container

## Where to Find Uptime Kuma After Install

- On the finish screen, Infinity Tools prints the access URL
- You can also see it in **📊 STATUS &amp; HEALTH → STATUS**
- Check the installation directory: `/opt/speedbits/uptime-kuma`
- Data stored in: `/opt/speedbits/uptime-kuma/data`

## Backing Up Your Monitoring Data

Your Uptime Kuma data is stored in:

- **Data directory:** `/opt/speedbits/uptime-kuma/data`

**To backup:**

```
cd /opt/speedbits
tar czf uptime-kuma-backup.tar.gz uptime-kuma/
```

**To restore:** Extract the backup and restart the Uptime Kuma container.

**Or use Uptime Kuma's built-in backup:** Go to Settings → Backup → Download Backup

## You're Ready!

Uptime Kuma is now installed and ready to monitor your services! Remember:

- 🔐 Create your admin account on first login (no default password!)
- 📊 Add monitors to start tracking uptime
- 🔔 Set up notifications to get alerts
- 📄 Create status pages to share with users
- 🐳 Enable Docker monitoring if you use Docker containers

**Next steps:** Add monitors for your websites and services, configure notifications, and create a status page. Uptime Kuma will help you keep everything running smoothly!