Skip to content

OthmanAdi/appwrite-keepalive

Repository files navigation

appwrite-keepalive

Keep your Appwrite free-tier projects alive. Automated. Zero infrastructure.

image

License: MIT

Why This Exists

Starting February 27th, 2026, Appwrite pauses free-tier projects with no development activity for 7 consecutive days.

"Projects on the Free plan with no development activity for 7 consecutive days will be automatically paused." — Appwrite

appwrite-keepalive sends a heartbeat to your project every 5 days via GitHub Actions. Your project stays active. No manual intervention. No infrastructure to maintain.


Quick Start

1. Fork This Repository

Click the Fork button at the top right of this page.

2. Create an Appwrite API Key

In your Appwrite Console:

  1. Go to your project → SettingsAPI Keys
  2. Click Create API Key
  3. Name it keepalive
  4. Under Scopes, expand Databases and check all database scopes (or just enable the entire Databases category)
  5. Click Create
  6. Copy the API key (you won't see it again)

3. Add GitHub Secrets

In your forked repository:

  1. Go to SettingsSecrets and variablesActions
  2. Add these secrets:
Secret Required Value
APPWRITE_ENDPOINT yes Your API endpoint (see below)
APPWRITE_PROJECT_ID yes Your project ID
APPWRITE_API_KEY yes The API key you created
APPWRITE_SITE_URLS only if you deploy Appwrite Sites Single URL or comma-separated list of your deployed Sites URLs

Using Appwrite Sites?

Appwrite Sites can pause independently of project-level pause based on site traffic rather than database activity. If you deploy Sites, also set APPWRITE_SITE_URLS so the keepalive sends an HTTP GET to each deployed URL on every run, registering a visit and keeping the Site active.

Single site:

APPWRITE_SITE_URLS=https://my-app.appwrite.network

Multiple sites in one project:

APPWRITE_SITE_URLS=https://site-a.appwrite.network,https://site-b.appwrite.network

If you do not deploy Sites, leave APPWRITE_SITE_URLS unset. The keepalive skips the HTTP step.

Finding your endpoint: Your endpoint depends on your region:

  • https://cloud.appwrite.io/v1 (US)
  • https://fra.cloud.appwrite.io/v1 (Frankfurt, Germany)
  • https://nyc.cloud.appwrite.io/v1 (New York)

Check your Appwrite Console → Settings → Overview for the exact endpoint.

4. Enable the Workflow

  1. Go to Actions tab in your forked repo
  2. Click I understand my workflows, go ahead and enable them
  3. Select Appwrite Keepalive workflow
  4. Click Run workflowRun workflow (to test immediately)

Done. Your project will receive a heartbeat every 5 days automatically.


How It Works

┌─────────────────────────────────────────────────────────┐
│              GITHUB ACTIONS                             │
│              Runs every 5 days (cron: 0 0 */5 * *)      │
└─────────────────────────┬───────────────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────┐
│              appwrite-keepalive                         │
│                                                         │
│  1. Connects to your Appwrite project                   │
│  2. Creates "keepalive" database (if needed)            │
│  3. Creates "heartbeats" collection (if needed)         │
│  4. Writes/updates a heartbeat document                 │
└─────────────────────────┬───────────────────────────────┘
                          │
                          ▼
┌──────────────────────────────────────────────────────────┐
│              YOUR APPWRITE PROJECT                       │
│                                                          │
│  Database: keepalive                                     │
│  Collection: heartbeats                                  │
│  Document: { timestamp: "...", source: "github-actions" }│
│                                                          │
│  Activity detected → Project NOT paused                  |
└──────────────────────────────────────────────────────────┘

The heartbeat is a real database write operation. Appwrite registers this as development activity.


Multiple Projects

To keep multiple projects alive with a single GitHub Action:

  1. Create API keys for each project (see step 2 above)
  2. Add a single secret APPWRITE_PROJECTS with this JSON format:
[
  {
    "endpoint": "https://cloud.appwrite.io/v1",
    "projectId": "project-1-id",
    "apiKey": "project-1-api-key",
    "name": "My App"
  },
  {
    "endpoint": "https://cloud.appwrite.io/v1",
    "projectId": "project-2-id",
    "apiKey": "project-2-api-key",
    "name": "My Other App"
  }
]

The name field is optional but helps identify projects in logs.


Local Usage

You can also run this locally or on any server:

# Clone the repo
git clone https://github.com/OthmanAdi/appwrite-keepalive.git
cd appwrite-keepalive

# Install dependencies
bun install

# Set environment variables
export APPWRITE_ENDPOINT="https://cloud.appwrite.io/v1"
export APPWRITE_PROJECT_ID="your-project-id"
export APPWRITE_API_KEY="your-api-key"

# Run keepalive
bun run keepalive

FAQ

Is this against Appwrite's Terms of Service?

No. This tool performs legitimate database operations. It's functionally equivalent to having any scheduled job in your application that writes to the database. There's no exploitation or abuse—just a minimal heartbeat to indicate the project is in use.

Why GitHub Actions?

  • Free (2,000 minutes/month on the free tier)
  • Reliable (runs on schedule without your intervention)
  • No infrastructure to maintain
  • Easy to set up (fork, add secrets, done)

Why every 5 days?

Appwrite pauses projects after 7 days of inactivity. Running every 5 days provides a 2-day buffer in case a scheduled run fails or is delayed.

Can I change the schedule?

Yes. Edit .github/workflows/keepalive.yml and modify the cron expression:

on:
  schedule:
    - cron: "0 0 */5 * *"  # Change this

Use crontab.guru to build your desired schedule.

What if I want to pause my project intentionally?

Disable the GitHub Action:

  1. Go to ActionsAppwrite Keepalive
  2. Click ...Disable workflow

For AI Coding Agents

This repo includes an Agent Skill that lets coding agents (Claude Code, OpenCode, Antigravity, OpenClaw, VS Code Copilot, Cursor, and others) automatically detect Appwrite projects and offer to set up keepalive.

The skill is auto-discovered when you clone this repo into your workspace. No manual configuration needed—just start a conversation with your coding agent.

Supported platforms:

  • .claude/skills/ — Claude Code
  • .agents/skills/ — OpenCode
  • .agent/skills/ — Google Antigravity
  • skills/ — OpenClaw

Contributing

See CONTRIBUTING.md.


License

MIT License — Ahmad Othman Ammar Adi


Acknowledgments

About

Keep your Appwrite free-tier projects alive. Automated. Zero infrastructure.

Resources

License

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors