deployments

Hostinger static deploy — primary path

Updated 2026-07-19deployments/hostinger-static-deploy.md

Hostinger static deploy — primary path

Status: primary deploy for x9elysium.com (2026-07-19).
Cloudflare Workers Static Assets is retired for this site. No CLOUDFLARE_API_TOKEN required.

Pipeline: GitHub Actions (free) builds the Next static export → FTP uploads out/ to Hostinger public_html → live on your Hostinger plan.

git push origin main
  → .github/workflows/deploy.yml
    → npm ci && npm run build   (produces ./out)
    → FTP → Hostinger public_html
    → IndexNow ping + smoke curl

Why Hostinger (not Cloudflare)

Cloudflare Workers Hostinger static (this path)
Domain already here? DNS was at CF; domain registered at Hostinger Same registrar and hosting
Secrets you must create CF API token + account id (easy to miss in GH) 4 FTP fields from hPanel (always visible)
Cost Free tier + token setup Plan you already pay for
/api/* Worker Yes (when token + Resend set) No — static only
Contact form Silent Resend when provisioned mailto fallback (opens mail app)

PIN-gated Worker surfaces (/chat, /supreme, /plans API writes, comments API) do not run on Hostinger static. The pages still build; they need a separate backend later if you want them live. Contact form tries /api/lead then falls open to mailto:darshan@x9elysium.com.


Other free options (if you ever leave Hostinger)

Option Price Fit Catch
Hostinger static + GH Actions Included in plan Chosen FTP secrets once
Cloudflare Pages Free Connect GitHub in CF dashboard Still Cloudflare; no FTP
Netlify Free tier Git push → build → CDN Bandwidth limits
Vercel Free hobby Great for Next Export mode works; server features need paid/plan
GitHub Pages Free Static only Custom domain + Actions; no server

Skip re-adding Cloudflare unless you need a free global CDN + Workers APIs again.


One-time setup (~10 minutes)

1. Hostinger: pure static (no Node app)

  1. hpanel.hostinger.comWebsitesx9elysium.com.
  2. Advanced → Node.js: if an app exists → Delete (not just Stop).
  3. Advanced → Git: disconnect if connected (we build on GitHub, not on Hostinger Git).
  4. Files → File Manager → open public_html/ (or domains/x9elysium.com/public_html/).
  5. Optional: zip a backup of current files, then empty the folder (keep the folder).

2. DNS must hit Hostinger (critical)

If the site still shows Cloudflare Worker HTML / CF-only routing, Hostinger files never serve.

  1. hPanel → Domains → x9elysium.com → DNS / Nameservers.
  2. Prefer Hostinger nameservers (hPanel shows the two NS records), or keep external DNS and point:
    • A @ → Hostinger IP from hPanel
    • CNAME wwwx9elysium.com (or Hostinger’s www target)
  3. SSL: hPanel → SSL → ensure free Let’s Encrypt is active.
  4. Wait for DNS (minutes–hours). Check: dig +short x9elysium.com should match Hostinger’s IP, not only a CF proxy you no longer use.

You can leave Cloudflare as a DNS-only registrar later if you want — for this setup, origin must be Hostinger.

3. FTP credentials (hPanel)

  1. Files → FTP Accounts.
  2. Note host (e.g. ftp.x9elysium.com or an IP — no ftp://).
  3. Note username.
  4. Set/reset password and copy it.
  5. Note directory for the site — usually /public_html/ or /domains/x9elysium.com/public_html/. Must end with /.

4. GitHub secrets (where you “couldn’t find Cloudflare”)

  1. Open: https://github.com/X9elysium/X9Elysium/settings/secrets/actions
    (Repo → SettingsSecrets and variablesActionsNew repository secret)
  2. Add exactly these four:
Secret name Value
HOSTINGER_FTP_HOST FTP host from step 3
HOSTINGER_FTP_USER FTP username
HOSTINGER_FTP_PASSWORD FTP password
HOSTINGER_FTP_DIR e.g. /public_html/

Optional:

Secret Value
NEXT_PUBLIC_CLARITY_PROJECT_ID Clarity project (default already in code)
NEXT_PUBLIC_CALCOM_URL Booking URL if you use Cal.com

You do not need CLOUDFLARE_API_TOKEN or CLOUDFLARE_ACCOUNT_ID anymore. Delete them from GitHub secrets if present (optional cleanup).

5. First deploy

A — empty commit:

git commit --allow-empty -m "deploy: hostinger first push"
git push origin main

B — Actions UI: repo → ActionsDeploy — HostingerRun workflow.

Watch the run. Green = FTP finished. Then purge Hostinger cache (step 6).

6. Purge Hostinger cache

hPanel → Performance / Cache ManagerPurge All.
Incognito-check https://x9elysium.com.

7. Smoke

curl -sI -H "Cache-Control: no-cache" "https://x9elysium.com/?nocache=$(date +%s)" | head -5
curl -sL "https://x9elysium.com/contact/" | grep -o 'api/lead\|Talk to Our Team' | head -5

Contact should show Talk to Our Team. Submit opens mail if /api/lead is absent (expected on static Hostinger).


Manual zip (no GitHub)

npm run deploy:zip
# Upload x9elysium-static.zip → public_html → Extract → delete zip → purge cache

What stopped working without Cloudflare Worker

Surface On Hostinger static
Marketing site, blog, thoughts, careers Works
Contact form Works via mailto fallback
/api/lead silent email Offline until a Worker/Resend host returns
/api/chat, /api/grok, /api/comments, /api/plans writes Offline
/chat, /supreme unlock screens UI loads; API returns missing until rehosted

Worker source stays under worker/ for a future rehost. Not required for the marketing site.


Troubleshooting

Symptom Fix
530 Login authentication failed Re-check FTP user/password secrets
Hang on FTP step Wrong HOSTINGER_FTP_DIR — must match File Manager path and end with /
Deploy green but site old Purge Hostinger cache; hard-reload; confirm DNS points at Hostinger
/services 404 without slash .htaccess in public/ ships on build; confirm public_html/.htaccess exists after deploy
Workflow fails on missing secrets All four HOSTINGER_FTP_* must exist under Actions secrets

Archived Cloudflare notes

Old CF Workers recipe: cloudflare-deploy.md (historical). Do not use unless you intentionally re-add Workers hosting.

Notes from readers

Open thread. Anyone can reply — no signup. Be real, be specific. Anything with a link goes through review.

0/1000

Loading…