Documentation Index
Fetch the complete documentation index at: https://mintlify.com/upptime/upptime/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Upptime can monitor private websites and endpoints that require authentication. This is essential for monitoring internal services, staging environments, or any endpoint behind authentication.Authentication Methods
Upptime supports several authentication methods for monitoring private sites:- HTTP Basic Authentication
- Custom HTTP headers (Bearer tokens, API keys)
- Custom request bodies for POST requests
- TCP/ICMP ping for private networks
Monitoring with HTTP Basic Auth
Add credentials to GitHub Secrets
Store your authentication credentials securely in GitHub Secrets:
- Go to your repository Settings > Secrets and variables > Actions
- Click New repository secret
- Add your credentials:
- Name:
PRIVATE_SITE_USERNAME - Value:
your-username
- Name:
- Repeat for password:
- Name:
PRIVATE_SITE_PASSWORD - Value:
your-password
- Name:
Configure site in .upptimerc.yml
Add your private site with the Upptime will automatically replace
__SECRETS placeholder syntax:.upptimerc.yml
$SECRET_NAME with the actual secret value from GitHub Actions.Using Bearer Tokens
For APIs that use Bearer token authentication:.upptimerc.yml
API_TOKEN in your GitHub repository secrets.
Custom Headers for API Keys
Many APIs use custom headers for authentication:.upptimerc.yml
You can add multiple headers for complex authentication schemes or to pass additional metadata.
POST Requests with Authentication
For endpoints that require POST requests with authentication:.upptimerc.yml
Monitoring VPN or Internal Networks
Using Self-Hosted Runners
For services only accessible within your network:Set up a self-hosted runner
Install a GitHub Actions self-hosted runner within your private network:
- Go to Settings > Actions > Runners
- Click New self-hosted runner
- Follow the installation instructions for your OS
Configure workflows to use the runner
Modify your
.github/workflows/uptime.yml to target the self-hosted runner:.github/workflows/uptime.yml
TCP/ICMP Ping for Private Services
Monitor services by checking if ports are open:.upptimerc.yml
TCP ping checks don’t validate HTTP responses—they only verify that the port is open and accepting connections.
Expected Status Codes
Configure expected status codes for private endpoints that return non-200 responses:.upptimerc.yml
Security Best Practices
Rotate credentials regularly
Update your GitHub Secrets periodically:- Generate new credentials in your service
- Update the secret in GitHub
- Verify the next monitoring run succeeds
- Revoke the old credentials
Use least-privilege access
Create dedicated monitoring accounts with minimal permissions:- Read-only access to health check endpoints
- No access to sensitive data or operations
- Separate from production service accounts
Audit secret access
Regularly review which workflows and team members can access secrets:- Check Settings > Secrets and variables > Actions
- Review secret usage in workflow runs
- Remove unused secrets
Use environment-specific secrets
For multiple environments, use environment secrets:.upptimerc.yml
Troubleshooting
401/403 errors
If you’re getting authentication errors:- Verify the secret exists in GitHub Secrets
- Check the secret name matches exactly (case-sensitive)
- Ensure the credentials are valid by testing with curl:
- Review the workflow logs for error details
Secrets not being replaced
If$SECRET_NAME appears in logs instead of being replaced:
- Verify you’re using the
$SECRET_NAMEsyntax (not${SECRET_NAME}) - Ensure the secret is added to repository secrets, not environment secrets
- Check that the
SECRETS_CONTEXTis passed in the workflow
Connection timeouts
For private network services:- Verify the self-hosted runner can access the endpoint
- Check firewall rules allow connections from the runner
- Increase the timeout value in
.upptimerc.yml:
Next steps
Authentication Configuration
Learn more about advanced authentication configurations.
Workflow Customization
Customize GitHub Actions workflows for your monitoring needs.