Cloud Native 8 min read

Step-by-Step Guide to Set Up and Run the RuoYi-Cloud Microservice Project Locally

This article provides a detailed, hands‑on tutorial for installing the required tools, configuring Nacos and MySQL, cloning the RuoYi-Cloud source, initializing databases, and launching both backend and frontend services so you can run the full microservice system on a local machine.

The Dominant Programmer
The Dominant Programmer
The Dominant Programmer
Step-by-Step Guide to Set Up and Run the RuoYi-Cloud Microservice Project Locally

Scenario and Technology Stack

RuoYi-Cloud is a Java EE enterprise rapid‑development platform based on Spring Boot, Spring Cloud & Alibaba, OAuth2, Vue and Element‑UI. It provides modules such as department management, role‑user management, menu and button authorization, data permissions, system parameters, log management, code generation, online scheduled‑task configuration, clustering and multi‑datasource support.

Technical Selection

The microservice version adopts a front‑end/back‑end separation model. Front‑end uses RuoYi‑Vue. Back‑end uses Spring Boot and Spring Cloud & Alibaba. Service registration and configuration are handled by Nacos, authentication data is stored in Redis, and traffic control is provided by Sentinel.

Prerequisites

JDK >= 1.8 (recommended 1.8)

MySQL >= 5.5 (recommended 5.7)

Redis >= 3.0

Maven >= 3.0

Node >= 10

Nacos >= 1.1.0

IDEA, Git and appropriate environment variables

Install Redis (Windows)

Download Redis for Windows, set a password, and start the service. Detailed steps are described in the referenced blog.

Install and Configure Nacos

Download Nacos, unzip it, and edit conf/application.properties to connect to an external MySQL database. Example configuration:

spring.datasource.platform=mysql
db.num=1
db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user=root
db.password=123456

Start Nacos in single‑node mode (modify startup.cmd) and access the console at http://localhost:8848/nacos with username and password both set to nacos.

Persist Nacos Data to MySQL

Create a database nacos_config and execute the nacos-mysql.sql script located in Nacos’s conf directory. Then insert the default Nacos user into the ry-config database’s users table:

name:1
password:$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu
enabled:1

Clone the Project

git clone https://gitee.com/y_project/RuoYi-Cloud and open the project in IDEA. The source tree includes ruoyi-gateway, ruoyi-auth and ruoyi-modules/ruoyi-system modules.

Initialize Databases

In the sql folder execute the following scripts:

Create database ry-cloud and run ry_20200924.sql and quartz.sql.

Create database ry-config and run ry_config_20200924.sql.

These scripts populate the system’s basic data.

Configure Nacos Connection in the Project

Edit the project’s configuration files (e.g., ruoyi-gateway-dev.yml, ruoyi-auth-dev.yml) to replace the default MySQL and Redis credentials with the values configured locally.

Start Backend Services

Ensure Redis and Nacos are running, then launch the following Spring Boot applications from IDEA (or via Maven): RuoYiGatewayApplication (module ruoyi-gateway) RuoYiAuthApplication (module ruoyi-auth) RuoYiSystemApplication (module ruoyi-modules/ruoyi-system)

If all three start without errors, the services appear in the Nacos console.

Start Front‑End Project

Navigate to the ruoyi-ui directory and run:

npm install
npm run dev

The development server runs on port 81 (port 80 may be occupied). Access the UI at http://localhost:81/, enter the generated verification code, and the RuoYi‑Cloud interface is displayed.

Completion

The RuoYi‑Cloud microservice development environment is fully deployed locally, with both back‑end and front‑end services operational.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

microservicesNacosspring-bootSpring CloudBackend JavaDockerless SetupFrontend VueRuoYi-Cloud
The Dominant Programmer
Written by

The Dominant Programmer

Resources and tutorials for programmers' advanced learning journey. Advanced tracks in Java, Python, and C#. Blog: https://blog.csdn.net/badao_liumang_qizhi

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.