𝗗𝗲𝗽𝗹𝗼𝘆𝗶𝗻𝗴 𝗙𝘂𝗹𝗹-𝗦𝘁𝗮𝗰𝗸 𝗔𝗽𝗽𝘀 𝗼𝗻 𝗙𝗿𝗲𝗲 𝗜𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲
We built a Learning Management System for G3HUB. The stack: React 18, Node.js 20, and PostgreSQL 15.
We did not have a VPS. We did not have a cloud budget. We only had a cPanel shared hosting account and a deadline.
Most tutorials assume you have a dedicated server. We had to find a way to make different services talk to each other for $0 per month.
𝗧𝗵𝗲 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲
• Frontend: React + Vite (Hosted on cPanel) • Backend: Node.js + Express (Hosted on Render Free Tier) • Database: PostgreSQL (Hosted on Supabase Free Tier)
𝗧𝗵𝗲 𝗛𝘂𝗿𝗱𝗹𝗲𝘀 𝗔𝗻𝗱 𝗦𝗼𝗹𝘂𝘁𝗶𝗼𝗻𝘀
𝟭. Shared Hosting Blocks Databases We tried running the Node.js API on cPanel. It failed because the host blocked outbound connections to PostgreSQL on port 5432. Solution: Move the API to Render. Render allows these connections.
𝟮. Monorepo Deployment Errors Render could not understand our pnpm workspace dependencies like @workspace/db. Solution: We used esbuild to bundle everything into one single 6.4MB file. We then used a minimal package.json with only external dependencies. This made the API self-contained.
𝟯. The CORS and Proxy Problem Apache mod_proxy on shared hosting was restricted. We could not easily forward API calls from the frontend to Render. Solution: We used a PHP cURL proxy. The frontend calls the local PHP script. The PHP script forwards the request to Render. This bypasses CORS issues and firewall restrictions.
𝟰. SSL Certificate Errors Supabase connection pooler caused SSL errors in Node.js. Solution: We set the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0.
𝗧𝗵𝗲 𝗖𝗼𝘀𝘁 𝗕𝗿𝗲𝗮𝗸𝗱𝗼𝘄𝗻
• cPanel: $0 (Existing) • Render: $0 (Free Tier) • Supabase: $0 (Free Tier) • Total: $0/month
𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆𝘀 𝗳𝗼𝗿 𝗘𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀
- Test outbound connectivity early. Check if your server can actually talk to your database before you write code.
- Use esbuild for monorepos. A single bundled file is much easier to deploy than a complex folder structure.
- Use UptimeRobot. Render's free tier sleeps after 15 minutes. A simple ping keeps it awake.
- Avoid special characters in database passwords. Using @ or ! in a connection string causes endless URL-encoding headaches.
If you can afford it, buy a $5 VPS. It removes all these walls. But if you have $0, creative routing makes production apps possible.
Source: https://dev.to/oyohedmond/deploying-a-full-stack-lms-on-shared-hosting-render-free-the-hard-way-4ke0
Optional learning community: https://t.me/GyaanSetuAi
