| # OpenCode Space - 24/7 Keep-Alive Setup |
|
|
| ## Your Space URLs |
| - **Web UI**: https://abbasyk60-opencode.static.hf.space |
| - **Space Settings**: https://huggingface.co/spaces/abbasyk60/opencode |
|
|
| ## Static Spaces Don't Sleep! |
|
|
| Good news: Your Space is a **Static Space**, which means: |
| - It's served directly by HuggingFace's CDN |
| - It does NOT have a runtime that can sleep |
| - It's always available at the URL above |
|
|
| The only way it would go down is if you delete it. |
|
|
| ## For Extra Safety: Set Up Free Monitoring |
|
|
| ### Option 1: UptimeRobot (Easiest - 2 minutes setup) |
|
|
| 1. Go to **https://uptimerobot.com** |
| 2. Sign up for free |
| 3. Click **"+ Add New Monitor"** |
| 4. Fill in: |
| - **Monitor Type**: HTTP(s) |
| - **Friendly Name**: OpenCode AI Agent |
| - **URL**: `https://abbasyk60-opencode.static.hf.space` |
| - **Monitoring Interval**: 5 minutes |
| 5. Click **Create Monitor** |
|
|
| This will ping your Space every 5 minutes and email you if it's ever down. |
|
|
| ### Option 2: cron-job.org |
|
|
| 1. Go to **https://cron-job.org** |
| 2. Sign up for free |
| 3. Click **"Create Job"** |
| 4. Fill in: |
| - **URL**: `https://abbasyk60-opencode.static.hf.space` |
| - **Request Method**: GET |
| - **Schedule**: Every 5 minutes |
| 5. Save |
|
|
| ## Telegram Bot - Keep Running Locally |
|
|
| The Telegram bot must run on your PC. To keep it running: |
|
|
| ### Option A: Run the batch file |
| Double-click `start-bot.bat` in the project folder. |
|
|
| ### Option B: Run the PowerShell script |
| ```powershell |
| .\keep-alive.ps1 |
| ``` |
|
|
| ### Option C: Windows Task Scheduler |
| 1. Open Task Scheduler |
| 2. Create Basic Task |
| 3. Trigger: Daily, repeat every 5 minutes |
| 4. Action: Start a program |
| 5. Program: `node` |
| 6. Arguments: `bot.js` |
| 7. Start in: `C:\Users\abbasyk\Documents\opencode-hf-space` |
|
|