ClawCloud Run published this notice: [Important Notice] Update on Idle Resource Reclamation Policy for Free Plan Users (https://question.run.claw.cloud/questions/10010000000002545) .
In plain words: free-plan resources that stay idle for too long may be reclaimed. If you want to keep your free resources available, you need reliable periodic access.
This post explains a simple open-source setup:
- Project: https://github.com/Ken2626/claw-keepalive-vercel
- Goal: run a scheduled GitHub sign-in flow to ClawCloud Run so your resources are not treated as long-term idle.
What This Setup Does
The workflow is short:
- Val Town triggers on a cron schedule (for example, once every week).
- Val Town calls Vercel
POST /api/keepalive. - Vercel runs browser automation and signs in to ClawCloud Run with your GitHub account.
This is not bypassing policy. It is regular access automation within policy boundaries.
Prerequisites
- A GitHub account with Authenticator 2FA enabled
- A Vercel account
- A Val Town account
Critical requirement: collect GITHUB_OTP_SECRET first
When enabling GitHub 2FA, follow this order:
- Open
Settings -> Password and authentication -> Two-factor authentication. - Choose
Authenticator app. - On the QR/setup page, reveal and copy the setup key (base32). Save it as
GITHUB_OTP_SECRET. - Then scan the QR code and finish verification.
If you skip saving the setup key, automated TOTP generation will fail later.
Step-by-Step Setup
1) Fork and Deploy to Vercel
- Fork the repository to your own GitHub account.
- Import it in Vercel and complete the first deployment.
2) Add Vercel Environment Variables (mark as Sensitive)
Required variables:
CRON_SECRET: auth secret for Val Town -> Vercel API (use a long random value)GITHUB_USERNAME: your GitHub username or emailGITHUB_PASSWORD: your GitHub passwordGITHUB_OTP_SECRET: your base32 setup keyCLAW_SIGNIN_URL: your own data-center sign-in URL (example:https://eu-central-1.run.claw.cloud/signin)
Save and redeploy.
3) Configure Val Town Cron
- Create a Val and paste
valtown/main.ts. - Set Val Town env vars:
VERCEL_URL=https://<your-project>.vercel.app/CRON_SECRET=<same value as Vercel>
- Set a weekly schedule in Val Town UI.
How to Verify It Works
Check both logs:
- Val Town: scheduled
main.tsruns - Vercel:
/api/keepalivereturns200
If you get 401, CRON_SECRET is usually mismatched.
If you get 500, check GitHub credentials, GITHUB_OTP_SECRET, and CLAW_SIGNIN_URL.
Security Notes
- Never commit
.env. - Mark sensitive variables as Sensitive in Vercel and Val Town.
- If a secret appears in public logs, rotate immediately:
CRON_SECRETGITHUB_PASSWORDGITHUB_OTP_SECRET
Final Takeaway
For users impacted by the new idle reclamation policy, this project is practical because it is:
- low cost
- easy to maintain
- fully automated for weekly keepalive
For most free-plan users, this is a straightforward and robust keepalive approach.
