
ReactJS is an open-source front-end JavaScript library. Besides running on NodeJS, ReactJS is also designed as a UI for JavaScript applications. ReactJS itself was created by Facebook, which is responsible for developing the appearance and logical flow of web applications. In this article, we will show you how to install ReactJS on AlmaLinux 10.
Table of Contents
Prerequisites
- An AlmaLinux 10 VPS
- SSH root access or a regular system user with sudo privileges
Conventions
# – given commands should be executed with root privileges either directly as a root user or by use of sudo command
$ – given commands should be executed as a regular user
Step 1: Update the System
First, you will need to log in to your AlmaLinux 10 VPS via SSH as the root user:
ssh root@IP_Address -p Port_number
You will need to substitute ‘IP_Address’ and ‘Port_number’ with your server’s corresponding IP address and SSH port number. Furthermore, substitute ‘root’ with the username of the system user with sudo privileges.
You can verify whether you have the correct AlmaLinux version installed on your server with the following command:
# cat /etc/almalinux-release
You will see this message:
AlmaLinux release 10.0 (Purple Lion)
In this article, we use ‘root’ to execute shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.
Step 2. Install NodeJS
For this tutorial, we are going to install the latest LTS version of NodeJS.
# curl -sL https://rpm.nodesource.com/setup_lts.x | bash -
Once completed, we can execute the command below.
# dnf install nodejs -y
NodeJS has been installed, and we can verify the installation by checking the Node and VPM versions.
# node -v; npm -v
You will see an output like this:
v22.19.0
10.9.3
Step 3. Install ReactJS
The React team officially deprecated Create React App (create-react-app) on February 14, 2025. There are alternative tools to create-react-app, like Vite, Next.js, or Gatsby. In this article, we will show you how to install ReactJS using Vite.
npm create vite@latest my-react-app
After executing the command above, you will be prompted for a few questions. You will be asked to choose which framework, use your keyboard, select React, and hit ENTER to continue.
│
◆ Select a framework:
│ ○ Vanilla
│ ○ Vue
│ ● React
│ ○ Preact
│ ○ Lit
│ ○ Svelte
│ ○ Solid
│ ○ Qwik
│ ○ Angular
│ ○ Marko
│ ○ Others
└
Then, you will need to choose a variant. Vite offers several React variants when you run npm create vite@latest and select React:
JavaScript: Choose this if you are a complete beginner to React, prefer a minimal setup, or want to avoid the complexity of types. It is flexible and straightforward for learning the basics.
TypeScript: The standard for professional, long-term, and scalable projects. It ensures predictable, maintainable code by catching errors during development.
SWC (Speedy Web Compiler): A high-speed alternative to the traditional Babel compiler. Variants with + SWC generally offer better performance during development and builds.
React Compiler: This variant supports upcoming React optimizations, which is excellent for learning modern patterns that future versions of React will support.
Let’s choose JavaScript + React Compiler, use your keyboard to select it, and then hit ENTER. Then, select NO when it asks to use rolldown-vite, and hit ENTER twice.
> npx
> create-vite my-react-app
│
◇ Select a framework:
│ React
│
◇ Select a variant:
│ JavaScript + React Compiler
│
◇ Use rolldown-vite (Experimental)?:
│ No
│
◇ Install with npm and start now?
│ Yes
│
◇ Scaffolding project in /root/my-react-app...
│
◇ Installing dependencies with npm...
Please wait until it finishes. You will get this message once it is completed.
VITE v7.2.7 ready in 641 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
At this point, you should be able to access http://localhost:5173
You can close it by hitting q then ENTER
Now, if you want the service to listen not only on localhost, you can run this command:
# cd my-react-app
# npm run dev -- --host
At this point, you should be able to access http://YOUR_SERVER_IP_ADDRESS:5173

Step 4. Create a Systemd service
In this step, we will create a systemd unit file, which is required to start/stop/restart ReactJS. With this systemd service, we can easily start/stop the service. Let’s create it now.
# nano /lib/systemd/system/reactjs.service
Paste the following into the file.
[Unit]
Description=My Vite React App Service
After=network.target
[Service]
User=root
WorkingDirectory=/root/my-react-app2
ExecStart=/usr/bin/npm run dev -- --host
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=my-react-app
[Install]
WantedBy=multi-user.target
Save the file, then exit from the editor and reload the daemon with the command below:
# systemctl daemon-reload
Once done, start and enable the React.js service:
# systemctl enable --now reactjs
To check the status of the React.js service:
# systemctl status reactjs
You should receive output similar to this:
● reactjs.service - My Vite React App Service
Loaded: loaded (/usr/lib/systemd/system/reactjs.service; disabled; preset: enabled)
Active: active (running) since Fri 2025-12-12 05:55:49 EST; 55s ago
Invocation: 7154f140fb7544b0aa403740f52bdb4b
Main PID: 4514 (npm run dev --h)
Tasks: 28 (limit: 2219)
Memory: 108.5M (peak: 109M)
CPU: 4.309s
CGroup: /system.slice/reactjs.service
├─4514 "npm run dev --host"
├─4525 sh -c "vite --host"
├─4526 node /root/my-react-app2/node_modules/.bin/vite --host
└─4533 /root/my-react-app2/node_modules/@esbuild/linux-x64/bin/esbuild --service=0.25.12 --ping
Dec 12 05:55:49 almalinux systemd[1]: reactjs.service: Scheduled restart job, restart counter is at 15.
Dec 12 05:55:49 almalinux systemd[1]: Started reactjs.service - My Vite React App Service.
Dec 12 05:55:49 almalinux my-react-app[4514]: > my-react-app2@0.0.0 dev
Dec 12 05:55:49 almalinux my-react-app[4514]: > vite --host
Dec 12 05:55:50 almalinux my-react-app[4526]: VITE v7.2.7 ready in 657 ms
Dec 12 05:55:50 almalinux my-react-app[4526]: ➜ Local: http://localhost:5173/
Dec 12 05:55:50 almalinux my-react-app[4526]: ➜ Network: http://192.168.1.129:5173/
Congratulation! You have successfully installed ReactJS on your AlmaLinux VPS. For more information about ReactJS, please refer to the ReactJS website.
If you are one of our web hosting customers and use our managed Linux Hosting, you don’t have to install ReactJS on AlmaLinux 10 yourself; our Linux administrators will set it up and configure a ReactJS server for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to install ReactJS on AlmaLinux 10, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.