Material Dashboard React is a free, MIT-licensed admin template from Creative Tim, built on React and MUI (Material UI). It gives you ready-made layouts, tables, charts and sign-in pages to start an admin panel from. This guide takes it from a clean RHEL-family VPS (AlmaLinux, Rocky Linux or RHEL) to a fast, HTTPS-served production build, and shows the one fact that simplifies everything: the finished dashboard is just static files.
Install a current LTS Node.js, clone the template, run npm ci, and build it with npm run build. The build folder is plain HTML, CSS and JavaScript, so serve it with nginx (with a fallback to index.html for client-side routes), add HTTPS with Let's Encrypt, and open only ports 80 and 443. Node.js is needed to build, not to serve; you can even build on your own computer and upload only the output.
1. What you are deploying
Material Dashboard React is a single-page application. In development it runs on a Node.js dev server; for production, npm run build compiles it into a folder of static files. Nothing in that folder needs Node.js at runtime, so any web server can host it. Your data comes from an API you run separately, which the dashboard calls from the browser.
That gives you two sensible layouts:
- Build on the VPS, serve with nginx. Everything lives on one server. Covered below.
- Build on your computer or in CI, upload the output. The server only needs a web server. This is faster and keeps build tools off production.
Creative Tim also sells a PRO version with more components. It is set up the same way; you download it from your Creative Tim account instead of cloning it.
2. Prepare the server
This is for your own VPS with root or sudo access. Start from a supported release such as AlmaLinux or Rocky Linux 9 or 10, create a normal user with sudo, and log in with an SSH key (see Linux server security and firewall basics).
sudo dnf upgrade --refresh -y
sudo dnf install -y git nginxIf you are logged in as root, drop the sudo.
3. Install Node.js (current LTS)
Use a Node.js release that is still supported. In 2026 that means the current LTS line (Node.js 24) or the previous one still in maintenance (22). Older guides use Node.js 18, which reached end of life in 2025.
# Option A: NodeSource repository (current LTS)
curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash -
sudo dnf install -y nodejs
# Option B: the distribution's own module stream
dnf module list nodejs
sudo dnf module install -y nodejs:22
node -v && npm -vIf you work with several projects on different versions, nvm is the easier route.
4. Get the code and install dependencies
mkdir -p ~/apps && cd ~/apps
git clone https://github.com/creativetimofficial/material-dashboard-react.git dashboard
cd dashboard
npm installThe free repository does not ship a package-lock.json, so the first npm install creates one. Commit it to your own copy of the project. From then on, use npm ci, which installs exactly the versions in the lock file and is what you want for repeatable builds.
The free version (Material Dashboard 2 React) is built on Create React App (react-scripts), so npm start runs the dev server and npm run build writes to build/. The React team deprecated Create React App in 2025; it still builds, but for a project you will maintain for years, plan a move to Vite. Vite projects use npm run dev and write to dist/, so check the scripts section of package.json if you start from another version.
5. Configure it
Settings that change between environments, such as your API address, go in a .env file at the project root. The variable prefix depends on the build tool: REACT_APP_ for Create React App, VITE_ for Vite.
# .env (Create React App)
REACT_APP_API_URL=https://api.example.comThese values are compiled into the JavaScript that every visitor downloads. Never put secrets, passwords or private API keys in them. Anything secret belongs in your API server.
To try the dashboard during development, run the dev server and reach it through an SSH tunnel rather than opening its port to the internet:
npm start # on the server
ssh -L 3000:localhost:3000 you@your-vps # on your computer, then open http://localhost:3000"Failed to parse source map" warnings during npm start come from third-party packages that ship incomplete source maps. They don't affect the app and can be ignored.
6. Build and publish
npm run build
sudo mkdir -p /var/www/dashboard
sudo rsync -a --delete build/ /var/www/dashboard/
sudo restorecon -R /var/www/dashboard # SELinux labels for web contentServing from /var/www avoids the two most common failures on RHEL-family systems: nginx not being allowed to read your home folder, and SELinux blocking files that were copied rather than created in place.
7. Serve it with nginx
Create /etc/nginx/conf.d/dashboard.conf:
server {
listen 80;
server_name dashboard.example.com;
root /var/www/dashboard;
index index.html;
# Send every route to the app so deep links and page reloads work
location / {
try_files $uri $uri/ /index.html;
}
# Fingerprinted assets can be cached for a long time
location ~* \.(?:js|css|woff2?|png|jpe?g|gif|svg|ico)$ {
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
}
# Always fetch a fresh index.html so new releases load
location = /index.html {
add_header Cache-Control "no-cache";
}
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
}sudo nginx -t
sudo systemctl enable --now nginx8. Open the firewall and add HTTPS
sudo firewall-cmd --permanent --add-service={http,https}
sudo firewall-cmd --reload
# Certbot comes from EPEL on AlmaLinux and Rocky Linux
sudo dnf install -y epel-release
sudo dnf install -y certbot python3-certbot-nginx
sudo certbot --nginx -d dashboard.example.comPoint the domain's A record at the VPS before running Certbot. Certbot sets up automatic renewal; check it with sudo certbot renew --dry-run. Leave port 3000 closed: production traffic goes through nginx only.
9. Keep it healthy
- Release with a rebuild.Pull the new code, run
npm ciandnpm run build, then rsync the output. The switch is instant, and a failed build leaves the live site untouched. - Update dependencies deliberately.Run
npm outdatedandnpm audit, update in a branch, and test before you deploy. Major MUI or React upgrades can need code changes. - Watch the logs.nginx writes to
/var/log/nginx/access.loganderror.log;journalctl -u nginxshows service messages. - Back up what can't be rebuilt.The code is in Git; back up your
.env, the nginx config and your API's data.
10. Running this on Domain India
VPS. Domain India VPS plans are self-managed with full root access on KVM, so every step above is yours to carry out. The operating system images you can choose are shown at checkout. cPanel isn't offered on a VPS.
- 1 vCPU
- 2 GB DDR4 RAM
- 64 GB NVMe SSD Storage
- 2 TB Monthly Bandwidth
Shared hosting, for the built dashboard only. Because the build is static, you can also upload the contents of build/ to public_html on a cPanel, DirectAdmin or Webuzo plan. .htaccess and mod_rewrite work on all three, so this file handles deep links:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.html [L]Build on your computer, then upload with File Manager or FTP. HTTPS on shared hosting uses the free SSL included with the plan.
Do I need Node.js on the server to run Material Dashboard React?
Only to build it. The output of npm run build is static HTML, CSS and JavaScript that any web server can serve. You can build on your own computer or in CI and upload just the output.
Which Node.js version should I use in 2026?
A supported LTS release: Node.js 24, or 22 while it is still in maintenance. Node.js 18 and 20 have reached end of life.
Why do page reloads on dashboard routes return 404?
The app handles its routes in the browser, so the web server must send unknown paths to index.html. Use try_files with /index.html in nginx, or the RewriteRule shown above in .htaccess on Apache.
Can I put API keys in the .env file?
Not secret ones. Variables with the REACT_APP_ or VITE_ prefix are compiled into the JavaScript every visitor downloads. Keep secrets in your API server.
Should I open port 3000 to test the dev server?
No. Reach it through an SSH tunnel, and serve production traffic through nginx on ports 80 and 443 only.
Ready to put your dashboard online? Compare VPS plans for a server you control, or cPanel hosting if you only need to host the built files. Questions go to our team on live chat or through a support ticket.
Root access on KVM with NVMe storage, ready for Node.js, nginx and your API.
See VPS plans