Instagram Scheduler - Node package (cPanel or any server with Node.js 20+)
=========================================================================

cPanel ("Setup Node.js App")
----------------------------
1. File Manager: upload this zip to your home folder and Extract. You get a folder
   "instagramscheduler" (keep it OUTSIDE public_html).
2. cPanel > Setup Node.js App > Create Application
     Node.js version:        20 or newer
     Application mode:       Production
     Application root:       instagramscheduler
     Application URL:        the domain or subdomain to use (e.g. scheduler.example.com)
     Application startup file: server.js
   Click Create, then Start / Restart.
3. Open config.json in File Manager and set "public_url" to the same address with https://,
   e.g. "https://scheduler.example.com". Restart the app.
4. The setup code is in instagramscheduler/data/SETUP_CODE.txt (File Manager).
   Open https://<your address>/setup.html and enter it.
5. cPanel > Cron Jobs: add, every 10 minutes (*/10 * * * *):
     curl -fsS -X POST -H "Authorization: Bearer <API token from setup>" https://<your address>/api/cron/tick >/dev/null
   (Hosts often put idle Node apps to sleep; the cron keeps scheduling running.)

Updates: Settings > Updates in the app. The app downloads the signed release, backs up
your data, writes releases/<version>/ and restarts itself (tmp/restart.txt). If a new version
fails to start twice, server.js switches back to the previous one.

Upload size: media is sent in 10 MB parts, so host upload limits above 10 MB are enough.

Any Linux server without cPanel
-------------------------------
Prefer the one-line installer (systemd + HTTPS):
  curl -fsSL https://instagramscheduler-releases.pages.dev/install/install.sh | sudo bash -s -- --domain scheduler.example.com
Or by hand: extract, set config.json, run "node server.js" under a supervisor that restarts it
(systemd Restart=always, pm2, ...).

Files
-----
server.js       launcher, never changed by updates
current.json    which release runs (managed by the app)
releases/       one folder per installed version
config.json     your settings (port, public_url, media storage)
data/           your data and media - back this up
