React hosting
React single-page app with Vite. Deploy to a dedicated VPS in seconds — database auto-created, SSL installed, firewall locked down from the first boot.
Latest
Versions
None
Database
MERN
Category
What is React?
React is an open-source JavaScript library for building user interfaces from reusable components. It is the most widely used library for single-page applications.
Vite is a fast build tool for modern frontends. It gives React a quick development server and produces an optimized production build of static HTML, JavaScript and CSS files.
A React single-page app does not need an application server in production. Once built, it is a set of static files that the web server delivers directly, which makes it fast and simple to host.
SharkCluster creates a React project with Vite, installs its dependencies, builds it and serves the build folder with nginx or Apache. Unknown paths fall back to index.html so client-side routing works.
Quick facts
- Version
- Latest
- Database
- None
- Category
- MERN
- SSL included
- Firewall locked
- DB auto-created
- Live in minutes
Why React on SharkCluster?
Static hosting speed
The production build is served as static files with no Node.js process in the request path.
Modern tooling
Vite builds React quickly and outputs optimized bundles.
Client-side routing
The web server returns index.html for app routes, so React Router URLs work when opened directly.
Ready to replace
Start from the Vite template or replace it with your own project and rebuild.
Same-server APIs
Run a backend app on the same server and call it from your React app.
What you get with React
React project created with Vite
Dependencies installed and production build created
Build served from frontend/dist
Fallback to index.html for client-side routes
nginx or Apache
Git deployment support
Custom domain support
Free SSL certificate
SSH and SFTP access
What React is built for
Single-page apps
Dashboards, portals and tools that run in the browser.
API frontends
Frontends for Django, Laravel, Node.js, Strapi or other APIs.
Marketing sites
Fast static sites built with React components.
Prototypes
Ship a working UI quickly on your own domain.
Server specs for
React
Not sure which plan to pick? The panel warns you before you deploy so you can choose the right size the first time.
- Minimum specs shown before deploy
- Panel blocks deploy if server is undersized
- Upgrade path available inside the panel
- Node.js
- A Node.js version supported by your Vite version is needed to build the app.
- Database
- None; connect to an API for data.
- Memory
- 1 GB RAM minimum; builds of larger apps need more.
- CPU
- 1 vCPU minimum.
- Storage
- 5 GB+ SSD.
How React fits together
Domain
Your domain or subdomain points to the SharkCluster server.
Web server
nginx or Apache serves files from htdocs/frontend/dist.
SPA fallback
Paths that are not files return index.html so React handles routing.
Build step
npm run build turns your source code into the dist folder.
After your React deploy
- 1
Create a React application
Select React in the SharkCluster panel.
- 2
Connect your domain
Point your domain to the server and enable SSL.
- 3
Open the project
Connect over SSH or SFTP; the project is in htdocs/frontend.
- 4
Add your code
Edit the src folder or replace the project with your own React app.
- 5
Build
Run npm install and npm run build in htdocs/frontend.
- 6
Check the site
Open your domain; the new build is served immediately.
Ship React your way
Install Node.js
Node.js, npm and PM2 are installed for building.
Create the project
npm create vite with the React template creates htdocs/frontend.
Install and build
npm install and npm run build create the dist folder.
Set permissions
Files are owned by the app user and readable by the web server.
Configure the web server
The site root is frontend/dist with a fallback to index.html.
Keeping React fast
Split code
Use React.lazy and dynamic imports to load pages on demand.
Cache static assets
Vite adds content hashes to file names, so assets can be cached for a long time.
Optimize images
Compress images and use modern formats.
Watch bundle size
Remove unused dependencies and check the build output size.
Before you go live
npm run build succeeds
dist/index.html exists
Domain DNS points to the server
SSL is enabled
Client-side routes load when opened directly
API URLs point to production
Ready your React for launch
Set production API URLs with VITE_ environment variables
Never put secrets in frontend code or VITE_ variables
Rebuild after every code change
Enable CORS on your API for this domain
Keep dependencies updated
Working with React
Install dependencies
Install packages from package.json.
cd htdocs/frontend && npm installBuild for production
Create the optimized build in dist.
npm run buildCheck for outdated packages
List dependencies with newer versions.
npm outdatedCommon React issues & fixes
Page shows "Application Ready" instead of my app
- Cause
- The build did not run or failed, so the placeholder index.html is still in dist.
- Solution
- Run npm install and npm run build in htdocs/frontend and read any error output.
Build fails with a Node.js version error
- Cause
- The installed Node.js is older than your Vite version requires.
- Solution
- Install a supported Node.js LTS version and run the build again.
Blank page after deploy
- Cause
- Assets are requested from the wrong path or a JavaScript error stops rendering.
- Solution
- Check the browser console and the base setting in vite.config.
API calls blocked by CORS
- Cause
- The API does not allow requests from your React domain.
- Solution
- Add your domain to the API's allowed origins.
Hardened before your first request
Every deploy is locked down from boot — closed firewall, valid SSL, and restricted access by default.
Do not put API keys or secrets in frontend code.
Use HTTPS for the site and the APIs it calls.
Keep React, Vite and dependencies updated.
Run npm audit and fix reported issues.
React environment configuration
VITE_ variables
Only variables starting with VITE_ are exposed to the app, and they are built into the public files.
Build-time values
Environment variables are read during npm run build; rebuild after changing them.
A safe React upgrade path
- 1
Commit your code
Keep the project in Git before upgrading dependencies.
- 2
Upgrade
Update React and Vite following their upgrade guides.
- 3
Rebuild and test
Run npm run build and test the site before releasing.
Take a snapshot before every upgrade so a bad release can be rolled back in minutes.
We manage the server, you own the store
SharkCluster manages
- VPS infrastructure
- Node.js for builds
- Web server
- SSL
- Firewall
- Backups where enabled
You manage
- React source code
- Dependencies
- Builds
- Environment variables
- API integration
Everything below the application line — from nginx to backups — is infrastructure. Your code, content and store configuration are always yours, and you keep full SSH and root access.
Frequently Asked Questions
The questions we hear most from people deploying React on SharkCluster.
Contact supportA React project created with Vite, its dependencies and a production build served by nginx or Apache from htdocs/frontend/dist.
No. The production build is static files served by the web server. Node.js is used only to build it.
Yes. Paths that are not files return index.html, so React handles the route.
Yes. Replace htdocs/frontend with your project, run npm install and npm run build.
Use React for a client-side single-page app. Use Next.js if you need server-side rendering or API routes.
Yes. Deploy a backend such as Node.js, Django or Laravel as another app and call it from React.
From deploy to live in minutes
Stack configured
Runtime, process manager and config files set up for you.
None wired
Database created with a user and credentials in your config.
SSL + firewall
Free Let's Encrypt certificate and closed-by-default UFW rules.
Deploy anytime
Push with Git, or use the built-in file manager and ZIP upload.
How do you start
with SharkCluster?
To start with SharkCluster, create an account and your first server on DigitalOcean, Contabo or OVHcloud — no credit card or lock-in contract is needed. Every account includes free self-hosted business apps, free local backups, unlimited migrations and a dedicated DevOps manager.