Deploy
Deploy on Hostinger
Hostinger's Managed Node.js Hosting is the recommended way to run this template in production: Hostinger patches the OS and the Node runtime, handles SSL, and gives you a Git-based deploy flow from hPanel. You deploy from your fork without ever opening an SSH session if you don't want to.
This walkthrough assumes you have already completed getting-started, supabase-setup, and whatsapp-setup — i.e., your fork builds locally and you have your Supabase + Meta credentials ready.
1. Buy a Managed Node.js plan
- Sign up at https://www.hostinger.com/web-apps-hosting and choose a
Node.js plan that gives you enough memory for
npm run build(2 GB+ recommended). - During the onboarding wizard, pick the Node.js stack and the region closest to your users.
- Finish setup until you land in hPanel.
2. Create the app in hPanel
In hPanel, open the hosting plan and go to Websites → Create / Manage and pick the Node.js application option, then:
- Application name —
wacrm. - Application root — accept the default (e.g.,
domains/yourdomain/public_html). - Application URL — the domain or subdomain you want to use (e.g.,
crm.example.com). You can attach a domain now or later under Domains. - Node.js version — 20 or newer.
- Application startup file / command — Next.js uses
npm startonce it is built, so set:- Start command:
npm start - Alternatively:
node node_modules/next/dist/bin/next start -p $PORT
- Start command:
Save the app. hPanel provisions a container and shows you the app's control page.
3. Connect your GitHub fork
In hPanel → Git:
- Create repository → paste your fork's HTTPS URL
(e.g.,
https://github.com/<your-username>/wacrm.git). - Pick the branch you want to deploy (usually
main). - Set the deploy path to the Application root from step 2.
Alternative: if you prefer ZIP uploads, use File Manager instead — upload the repo contents into the application root. Git-based deploy is simpler because redeploying is one click.
4. Install dependencies and build
hPanel's Node.js app page exposes a Run NPM install button and a terminal. Either works:
- Button flow:
- Click Run NPM install. Wait for it to finish.
- Click Run NPM Build (or execute
npm run buildfrom the app terminal).
- Terminal flow:
npm ci npm run build
Next.js expects
NEXT_PUBLIC_*variables to be present at build time, so set env vars (step 5) before running the build.
5. Configure environment variables
In hPanel → Node.js app → Environment variables, add every value from environment-variables.md:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYENCRYPTION_KEYMETA_APP_SECRETNEXT_PUBLIC_SITE_URL— set tohttps://<your-domain>(with the scheme, without a trailing slash).AUTOMATION_CRON_SECRET— if you plan to use Wait steps (automations-and-cron.md).
Save, then re-run the build so the new NEXT_PUBLIC_* values get
baked into the client bundle.
6. Start the app
From the app page, click Restart application (or run the equivalent
from the terminal). hPanel boots npm start behind its own reverse proxy
on the domain you configured. Hit the URL in a browser — you should land
on the marketing page.
SSL is provisioned automatically. If you used a subdomain, Hostinger's AutoSSL usually takes a minute or two; until then the site may serve the plain-HTTP version.
7. Update the Meta webhook
Back in Meta for Developers → WhatsApp® → Configuration, change the
callback URL to https://<your-domain>/api/whatsapp/webhook and re-verify.
8. Schedule the automations cron
If you use the Wait step in any automation, schedule the cron drain.
- Inside hPanel — open Advanced → Cron Jobs and add:
Paste the literal secret here (cron jobs in hPanel don't read app env vars) or store it in a file the cron reads.* * * * * curl -s -H "x-cron-secret: <AUTOMATION_CRON_SECRET>" https://<your-domain>/api/automations/cron > /dev/null - Outside — any uptime monitor (UptimeRobot, Better Stack, GitHub Actions) can hit the URL once a minute. See automations-and-cron.md for detail.
9. Deploying updates
Two options:
- Click-deploy: push to your fork, then hit Pull in hPanel → Git and Restart application.
- Terminal:
cd <application-root> git pull npm ci npm run build # then restart from the Node.js app page
If the database schema changed, apply any new SQL files from
supabase/migrations/ in the Supabase SQL editor first — migrations are
idempotent.
When to reach for a VPS instead
Managed Node.js covers most deploys of this template. Consider Hostinger VPS if you need:
- Long-running background workers beyond what the single Next.js process gives you.
- System-level cron behaviour you can't replicate from hPanel.
- Custom binaries (e.g., ffmpeg) for media transforms.
Otherwise, Managed Node.js is the fast path.
Where to go next
- Automations cron → — must-do if you use the Wait step in any automation.
- Troubleshooting → — common deploy issues.