Upptime is a free and open-source uptime monitoring solution powered by GitHub Actions, Issues, and Pages. It allows you to monitor websites and services with zero infrastructure setup and host status pages using GitHub Pages.
π What is Upptime?
- Open-source uptime monitor using GitHub Actions
- Stores downtime as GitHub Issues
- Publishes status pages via GitHub Pages
- Inspired by UptimeRobot, StatusPage.io, etc.
π€ Key Features
- Website uptime monitoring
- SSL certificate expiry tracking
- Response time metrics and graphs
- GitHub-powered automation (no external services required)
- Free hosting via GitHub Pages
π§ Prerequisites
- GitHub account
- Basic knowledge of Git and GitHub
- Node.js (for local testing, optional)
π Getting Started with Upptime
Step 1: Create a New Public GitHub Repository
Name it something like yourproject-status
.
Step 2: Use the Upptime Template
- Go to https://github.com/upptime/upptime
- Click
Use this template
- Choose your new repo name and create it
Step 3: Configure .upptimerc.yml
Add your domains/services to monitor:
owner: your-github-username
repo: yourproject-status
sites:
- name: Homepage
url: https://example.com
- name: Blog
url: https://blog.example.com
Step 4: Set Up GitHub Secret for PAT
- Generate a GitHub Personal Access Token (PAT) with
repo
andworkflow
permissions. - Go to your repo >
Settings
>Secrets and Variables
>Actions
- Add a secret:
- Name:
GH_PAT
- Value: paste your token here
- Name:
Step 5: First Commit and Deploy
Upptime will:
- Monitor websites every 5 minutes (via GitHub Actions)
- Log incidents as GitHub issues
- Build status page at
https://yourusername.github.io/yourproject-status
π GitHub Actions Workflows in Upptime
update.yml
- Runs every 5 minutes
- Checks all configured sites
- Logs downtime as issues
graphs.yml
- Updates response time and availability graphs daily
site.yml
- Builds static status site using Jekyll and pushes to
gh-pages
branch
π οΈ Customize Your Upptime Setup
Customize .upptimerc.yml
sites
for defining your monitored URLsstatus-website
: to toggle GitHub Pages deploymentcommit-message
: customize auto-commit messages
Enable SSL Monitoring
Enabled by default. It warns before SSL certs expire.
π Visualize Data
- Response time graphs (daily/hourly)
- Uptime percentage trends
- Public status page with badges and history
π Example: Monitor 3 Websites
owner: devteam
repo: devteam-status
sites:
- name: Main Site
url: https://example.com
- name: API
url: https://api.example.com
- name: Docs
url: https://docs.example.com
π§ Advanced Features
- Incidents: Logged automatically as GitHub Issues
- Custom Headers: Add auth tokens or custom user agents
- Status Page Themes: Customize with CSS/Jekyll
π Learning Resources
- GitHub: https://github.com/upptime/upptime
- Docs: https://upptime.js.org
- Demo Site: https://upptime.js.org/demo
π Why Use Upptime?
Feature | Benefit |
---|---|
Free Forever | Hosted on GitHub |
Easy Setup | Just a YAML file and token |
GitHub Native | Leverages Actions, Issues, Pages |
Transparent | Downtime is visible via issues |
π Final Tips
- Keep your PAT secret safe
- Use different repos for different projects
- Customize the status page for your brand
- Combine with Slack/Email alerts via GitHub Issue actions
π You’re All Set!
Upptime is an excellent solution for teams or individuals wanting robust uptime monitoring without external dependencies or costs. Set it up in minutes and get peace of mind!
Example Code
Here is a complete GitHub Actions workflow using Upptime to monitor uptime and SSL certificate expiry for the following domains:
motoshare.us
motoshare.mx
motoshare.ca
motoshare.in
motoshare.co
motoshare.com.cn
motoshare.id
motoshare.jp
β Step-by-step Setup
- Create a public GitHub repo (e.g.,
motoshare-status
). - Install Upptime: Follow instructions at https://upptime.js.org.
- Add the following configuration to the
.upptimerc.yml
file. - GitHub Actions will automatically run every 5 minutes.
π οΈ .upptimerc.yml
(Place in root)
owner: your-github-username
repo: motoshare-status
sites:
- name: motoshare.us
url: https://motoshare.us
- name: motoshare.mx
url: https://motoshare.mx
- name: motoshare.ca
url: https://motoshare.ca
- name: motoshare.in
url: https://motoshare.in
- name: motoshare.co
url: https://motoshare.co
- name: motoshare.com.cn
url: https://motoshare.com.cn
- name: motoshare.id
url: https://motoshare.id
- name: motoshare.jp
url: https://motoshare.jp
π§ͺ GitHub Actions Workflow File
Create the following workflow file:
.github/workflows/uptime.yml
name: Uptime CI
on:
schedule:
- cron: '*/5 * * * *' # every 5 minutes
workflow_dispatch:
jobs:
update:
name: Update summary and graphs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Update site statuses
run: npx upptime update
env:
GH_PAT: ${{ secrets.GH_PAT }}
β Additional Setup
- Generate a Personal Access Token from GitHub (with
repo
andworkflow
scope). - Go to your repo β
Settings
βSecrets and variables
βActions
. - Add secret:
- Name:
GH_PAT
- Value: Your personal access token
- Name:
β Deploy
Commit and push to your GitHub repo. Upptime will start monitoring the 8 domains and generate markdown-based status reports under /status
.