# ๐Ÿš€ AstronRPA Quick Start Guide [![Python Version](https://img.shields.io/badge/Python-3.13.x-blue?logo=python&logoColor=white)](https://www.python.org/) [![Node Version](https://img.shields.io/badge/Node.js-22+-green?logo=node.js&logoColor=white)](https://nodejs.org/) [![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?logo=docker&logoColor=white)](https://www.docker.com/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange)](LICENSE) **Fast, Simple, Powerful RPA Automation Platform Deployment Guide** [Quick Start](#๏ธ-environment-setup) ยท [Server Deployment](#-server-deployment-docker) ยท [Client Deployment](#-client-deployment-local) ยท [FAQ](#-faq)
--- ## ๐Ÿ“‹ Table of Contents - [System Requirements](#-system-requirements) - [Environment Setup](#๏ธ-environment-setup) - [Deployment Architecture](#๏ธ-deployment-architecture) - [Server Deployment (Docker)](#-server-deployment-docker) - [Client Deployment (Local)](#-client-deployment-local) - [Development Environment](#-development-environment) - [FAQ](#-faq) ## ๐Ÿ’ป System Requirements ### Operating System | OS | Version | Support Status | |---------|---------|---------| | Windows | 10/11 | โœ… Primary Support | ### Hardware Configuration | Component | Minimum | Recommended | |-------|---------|---------| | **CPU** | 2 cores | 4 cores+ | | **Memory** | 4GB | 8GB+ | | **Disk** | 10GB available | 20GB+ | | **Network** | Stable internet connection | - | ### Environment Dependencies | Tool | Version | Description | |-----|---------|------| | **Node.js** | >= 22 | JavaScript runtime | | **Python** | 3.13.x | RPA engine core | | **Java** | JDK 8+ | Backend service runtime | | **pnpm** | >= 9 | Node.js package manager | | **UV** | 0.8+ | Python package manager | | **7-Zip** | - | Create deployment archives | | **SWIG** | 4.1.1 | Connect Python with C/C++ | ## ๐Ÿ› ๏ธ Environment Setup ### 1๏ธโƒฃ Python (3.13.x) > ๐Ÿ **Core Dependency** ยท AstronRPA requires Python 3.13.x as the RPA engine core
๐Ÿ“ฆ Installation Methods (Click to expand) #### Method 1: Official Download (Recommended) ```bash # Visit https://www.python.org/downloads/ # Download and install Python 3.13.x ``` #### Method 2: Using Winget ```bash winget install Python.Python.3.13 ``` #### Method 3: Using Chocolatey ```bash choco install python --version=3.13.x ```
#### ๐Ÿ“ Python Installation Path After installation, remember your Python installation path for later configuration: | Installation Method | Typical Path | |---------|---------| | ๐ŸŸข Official Installer | `C:\Users\{username}\AppData\Local\Programs\Python\Python313\` | | ๐Ÿ”ต Chocolatey | `C:\Python313\` or `C:\tools\python3\` | **๐Ÿ’ก Important Note:** - โœ“ Python executable: `{installation_directory}\python.exe` - โœ“ Example: `C:\Users\{username}\AppData\Local\Programs\Python\Python313\python.exe` ### 2๏ธโƒฃ UV (0.8+) > โšก **Fast Package Management** ยท Next-generation Python package manager, 10-100x faster than pip
๐Ÿ“ฆ Installation Methods (Click to expand) ```powershell # Method 1: Official installation script (Recommended) powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Method 2: Using pip pip install uv # Method 3: Using Chocolatey choco install uv ```
#### โœ… Verify Installation ```bash uv --version # โœ“ Should display something like: uv 0.8.x (xxxxx) ``` **๐Ÿ“– Learn More**: [UV Official Documentation](https://docs.astral.sh/uv/) ### 3๏ธโƒฃ pnpm (9+) > ๐Ÿ“ฆ **Efficient Package Management** ยท Disk space-saving Node.js package manager
๐Ÿ“ฆ Installation Methods (Click to expand) ```bash # Method 1: Using npm (Recommended) npm install -g pnpm@latest # Method 2: Windows PowerShell iwr https://get.pnpm.io/install.ps1 -useb | iex # Method 3: macOS/Linux curl -fsSL https://get.pnpm.io/install.sh | sh - # Method 4: Homebrew (macOS) brew install pnpm ```
#### โœ… Verify Installation ```bash pnpm --version # โœ“ Should display 9.x.x or higher ``` **๐Ÿ“– Learn More**: [pnpm Official Documentation](https://pnpm.io/) ### 4๏ธโƒฃ Docker > ๐Ÿณ **Containerization Platform** ยท For rapid server deployment
๐Ÿ“ฅ Download & Install (Click to expand) | Platform | Download Link | |-----|---------| | ๐ŸชŸ Windows/Mac | [Docker Desktop](https://www.docker.com/products/docker-desktop/) | | ๐Ÿง Linux | [Docker Engine](https://docs.docker.com/engine/install/) |
#### โœ… Verify Installation ```bash docker --version docker compose --version # โœ“ Confirm both Docker and Docker Compose are installed correctly ``` --- ### 5๏ธโƒฃ 7-Zip > ๐Ÿ“ฆ **Compression Tool** ยท For creating deployment archive files
๐Ÿ“ฅ Download & Install (Click to expand) **Official Website:** https://www.7-zip.org/ Download and install to system, or extract to a custom directory
#### โœ… Verify Installation ```bash # If installed to system path 7z # Or use full path "C:\Program Files\7-Zip\7z.exe" ``` --- ### 6๏ธโƒฃ SWIG > ๐Ÿ”— **Interface Generator** ยท For connecting Python with C/C++ programs
๐Ÿ“ฅ Installation Steps (Click to expand) #### Step 1: Download SWIG Visit http://www.swig.org/download.html Download `swigwin-4.1.1.zip` and extract to any directory. Use SWIG 4.1.1 for the current `pywinhook==1.6.2` dependency. SWIG 4.5.0 removes the legacy `PyInt_AsLong` compatibility alias and causes a link failure with Python 3.13. Native extension builds also require Visual Studio Build Tools with the MSVC x64/x86 C++ tools and a Windows SDK; the VC++ Redistributable alone does not include these build tools. #### Step 2: Add to System Environment Variables Add the directory containing `swig.exe` to PATH environment variable For example: `C:\swig\swigwin-4.1.1` #### Step 3: Verify Installation ```bash swig -version # โœ“ Confirm SWIG is installed correctly ```
## ๐Ÿ—๏ธ Deployment Architecture AstronRPA adopts a **Server-Client** architecture: ![](./docs/images/front-back.png) ### Deployment Overview 1. **Server Deployment** - Quick deployment using Docker - Web management interface - Backend API services - Database and cache - AI services 2. **Client Deployment** - Deploy using packaging scripts - RPA execution engine - Desktop management application - Connect to server for task execution ## ๐ŸŒ Server Deployment (Docker) > **Quick Deployment** ยท Launch all server components with Docker Compose in one command The server provides web management interface, API services, database and other core services. --- ### ๐Ÿ“ฆ Deployment Steps #### Step 1๏ธโƒฃ: Clone Repository ```bash git clone https://github.com/iflytek/astron-rpa.git cd astron-rpa ``` #### Step 2๏ธโƒฃ: Start Server ```bash # Enter Docker directory cd docker # Copy .env file cp .env.example .env # Configure public HTTPS names in .env RPA_SERVER_NAME="rpa.example.com" CASDOOR_SERVER_NAME="auth.example.com" RPA_HTTPS_REDIRECT_AUTHORITY="rpa.example.com" CASDOOR_HTTPS_REDIRECT_AUTHORITY="auth.example.com:8443" CASDOOR_EXTERNAL_ENDPOINT="https://auth.example.com:8443" # Copy the matching certificate chain and private key to # docker/certs/tls.crt and docker/certs/tls.key # ๐Ÿš€ Start all services docker compose up -d mysql casdoor # Wait for Casdoor initialization (see docker/HTTPS_DEPLOYMENT.md section 1.3) python3 scripts/sync-casdoor-credentials.py docker compose up -d # ๐Ÿ“Š Check service status docker compose ps ``` See [HTTPS deployment, migration, and rollback](./docker/HTTPS_DEPLOYMENT.md) for certificate, custom-port, legacy HTTP, and rollback details.
๐Ÿ’ก Expected Output Example ``` NAME STATUS PORTS robot-service Up 30 seconds 0.0.0.0:8080->8080/tcp ai-service Up 30 seconds 0.0.0.0:8001->8001/tcp openapi-service Up 30 seconds 0.0.0.0:8002->8002/tcp mysql Up 30 seconds 0.0.0.0:3306->3306/tcp redis Up 30 seconds 0.0.0.0:6379->6379/tcp ```
#### Step 3๏ธโƒฃ: Verify Server Deployment ```bash # ๐Ÿ“ View service logs docker compose logs -f ``` --- ### ๐Ÿ”ง Server Management Commands ```bash # ๐Ÿ›‘ Stop services docker compose down # ๐Ÿ”„ Restart services docker compose restart # ๐Ÿ“‹ View specific service logs docker compose logs -f robot-service # โฌ†๏ธ Update images docker compose pull docker compose up -d ``` **๐Ÿ“– Detailed Configuration**: [Server Deployment Guide](./docker/QUICK_START.md) ## ๐Ÿ’ป Client Deployment (Local) > **Local Deployment** ยท Deploy engine and desktop application on machines running RPA tasks The client includes RPA execution engine and desktop management application, needs to be deployed on machines executing RPA tasks. --- ### ๐ŸŽฏ One-Click Packaging Deployment Suitable for production environments and end users. #### ๐ŸชŸ Windows Environment
Step 1๏ธโƒฃ: Prepare Python Environment
Ensure Python 3.13.x is installed to a local directory (e.g., `C:\Python313`). **Environment Directory Structure:** ``` Python313/ โ”œโ”€ DLLs/ โ”œโ”€ Doc/ โ”œโ”€ include/ โ”œโ”€ Lib/ โ”œโ”€ libs/ โ”œโ”€ Scripts/ โ”œโ”€ tcl/ โ”‚ โ”œโ”€ LICENSE.txt โ”œโ”€ NEWS.txt โ”œโ”€ python.exe โ”œโ”€ python3.dll โ”œโ”€ python313.dll โ”œโ”€ pythonw.exe โ”œโ”€ vcruntime140.dll โ””โ”€ vcruntime140_1.dll ``` > **โš ๏ธ Important Note:** Use a clean Python installation without additional third-party packages to reduce package size.
Step 2๏ธโƒฃ: Run Packaging Script
### Basic Usage Execute the build script from the project root directory: ```bash # ๐Ÿš€ Full build (engine + frontend) ./build.bat --python-exe "C:\Program Files\Python313\python.exe" # Or use default configuration (if Python is in default path) ./build.bat # โณ Wait for operation to complete # โœ… Build successful when console displays "Full Build Complete!" ``` **Execution Flow:** 1. โœ… Detect/copy Python environment to `build/python_core` 2. โœ… Install RPA engine dependencies 3. โœ… Compress Python core to `resources/python_core.7z` 4. โœ… Install frontend dependencies 5. โœ… Build desktop application ### Advanced Options View all available parameters: ```bash ./build.bat --help ``` **Common Parameter Combinations:** ```bash # ๐Ÿ”ง Specify Python path ./build.bat --python-exe "D:\Python313\python.exe" # ๐Ÿ”ง Specify 7-Zip path ./build.bat --sevenz-exe "D:\7-Zip\7z.exe" # โญ๏ธ Build engine only, skip frontend ./build.bat --skip-frontend # โญ๏ธ Build frontend only, skip engine ./build.bat --skip-engine # ๐Ÿ”€ Combine with short options ./build.bat -p "D:\Python313\python.exe" -s "D:\7-Zip\7z.exe" ``` **Parameter Description:** | Parameter | Short | Description | |-----------|-------|-------------| | `--python-exe ` | `-p` | Specify Python executable path | | `--sevenz-exe ` | `-s` | Specify 7-Zip executable path | | `--skip-engine` | - | Skip engine (Python) build | | `--skip-frontend` | - | Skip frontend build | | `--help` | `-h` | Display help message | ### Manual Frontend Build If you need to manually build the frontend separately, you can execute the following steps:
Click to expand manual build steps ```bash cd frontend # ๐Ÿ“ฆ Install dependencies pnpm install # โš™๏ธ Configure environment variables pnpm set-env # ๐Ÿ–ฅ๏ธ Build desktop application pnpm build:desktop ``` > **Tip:** Use `build.bat --skip-engine` to automatically complete the frontend build steps above.
Step 3๏ธโƒฃ: Install Exe Package
**Package completion path:** ``` /frontend/packages/electron-app/dist/ ``` Double-click the Exe file to install.
Step 4๏ธโƒฃ: Configure Server Address
Modify the server address in `resources/conf.yaml` under the installation directory: ```yaml remote_addr: https://rpa.example.com/ skip_engine_start: false ``` > **๐Ÿ’ก Tip:** Replace `rpa.example.com` with your actual HTTPS gateway name.
--- ### ๐ŸŒ Development Server Addresses | Service | Address | Description | |-----|------|------| | ๐Ÿ–ฅ๏ธ **Desktop App** | Auto-launch window | Desktop client | | ๐Ÿ”Œ **Backend Service API** | https://localhost | Backend Gateway Service Nginx | | ๐Ÿ”‘ **Casdoor Service API** | https://localhost:8443 | Authentication Service Casdoor | --- ## ๐Ÿ” Complete Deployment Verification ### โœ… Step 1: Server Check ```bash # ๐Ÿ“Š Check Docker service status docker compose ps # ๐Ÿ” Verify API response # Open in browser: https://rpa.example.com/api/rpa-auth/user/login-check # If returns {"code":"900001","data":null,"message":"unauthorized"} then deployment is correct and connected ``` ### โœ… Step 2: Casdoor Service Check ```bash # ๐Ÿ” Verify Casdoor service # Open https://auth.example.com:8443 in browser # Casdoor authentication page should appear ``` **Follow-up Verification:** - โœ“ Check client node status in web interface - โœ“ Create simple test task to verify execution ## โ“ FAQ ### ๐ŸŒ Server Related
Q: Docker service fails to start?
```bash # ๐Ÿ” Check port usage netstat -tulpn | grep :8080 # โœ… Check Docker status docker --version docker compose --version # ๐Ÿ“‹ View detailed error logs docker compose logs ``` **Common Causes:** - โŒ Ports occupied (8080, 3306, 6379) - โŒ Docker service not started - โŒ Insufficient resources (memory/disk space)
Q: Database connection failed?
```bash # ๐Ÿ“Š Check MySQL container status docker compose ps mysql # ๐Ÿ“ View MySQL logs docker compose logs mysql # ๐Ÿ”„ Restart database service docker compose restart mysql ```
--- ### ๐Ÿ’ป Client Related
Q: Python environment copy failed?
```bash # ๐Ÿ” Check Python installation path where python # Windows which python # Linux/macOS # ๐Ÿ” Make sure to pass the Python executable file โœ–๏ธ ./build.bat -p "C:\\Python313" โœ”๏ธ ./build.bat -p "C:\\Python313\\python.exe" ``` **Solutions:** - โœ“ Ensure Python directory exists and is readable - โœ“ Run script with administrator privileges - โœ“ Check sufficient disk space
Q: Packaging script execution failed?
```bash # โœ… Check all dependencies in preparation phase are fully installed # ๐Ÿ’พ Check disk space dir # Windows check available space ```
--- ### ๐Ÿ”Œ Connection Related
Q: Client cannot connect to server?
```bash # ๐ŸŒ Check network connectivity # Open the following URL in your browser to see if there's a response # Replace the example name with your deployed HTTPS gateway name https://rpa.example.com/api/rpa-auth/user/login-check # ๐Ÿ›ก๏ธ Check firewall settings # Windows: Control Panel > System and Security > Windows Defender Firewall # Linux: ufw status # โœ… Check server health status curl https://rpa.example.com/health ``` **Common Causes:** - โŒ Server not started - โŒ Firewall blocking - โŒ Network unreachable - โŒ Incorrect address in config file
Q: WebSocket connection failed?
```bash # ๐Ÿ”Œ Check WebSocket endpoint curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" \ https://rpa.example.com/api/rpa-openapi/ws # ๐Ÿ” Check proxy settings echo $http_proxy echo $https_proxy ``` **Solutions:** - โœ“ Confirm server WebSocket service is running - โœ“ Check if proxy affects connection - โœ“ Verify firewall rules
--- ### ๐Ÿ—๏ธ Build Related
Q: Frontend build failed?
```bash # ๐Ÿงน Clear cache pnpm store prune rm -rf node_modules pnpm-lock.yaml # ๐Ÿ“ฆ Reinstall pnpm install # โœ… Check Node.js version node --version # Requires 22+ ``` **Common Causes:** - โŒ Node.js version not meeting requirements - โŒ Dependency version conflicts - โŒ Cache corruption
Q: pywinhook installation fails with swig.exe not found error?
**Error Message:** ``` error: Microsoft Visual C++ 14.0 is required or swig.exe not found ``` **Solution Steps:** 1๏ธโƒฃ **Download SWIG** - Visit http://www.swig.org/download.html - Download `swigwin-x.x.x.zip` and extract to any directory 2๏ธโƒฃ **Add to System Environment Variables** - Add the directory containing `swig.exe` to PATH environment variable - For example: `C:\swig\swigwin-4.1.1` 3๏ธโƒฃ **Verify Installation** ```bash swig -version ``` 4๏ธโƒฃ **Reinstall pywinhook** ```bash pip install pywinhook ```
## ๐Ÿ“ž Get Help
**Having issues? We're here to help!**
| Channel | Link | Description | |-----|------|------| | ๐Ÿ“ง **Technical Support** | [cbg_rpa_ml@iflytek.com](mailto:cbg_rpa_ml@iflytek.com) | Contact technical team directly | | ๐Ÿ’ฌ **Community Discussion** | [GitHub Discussions](https://github.com/iflytek/astron-rpa/discussions) | Exchange ideas with community | | ๐Ÿ› **Issue Report** | [GitHub Issues](https://github.com/iflytek/astron-rpa/issues) | Submit bugs and feature requests | | ๐Ÿ“– **Full Documentation** | [Project Documentation](README.md) | View detailed usage documentation | --- ## ๐ŸŽฏ Next Steps
**โœจ Congratulations on completing deployment! Now start your RPA automation journey โœจ**

| Step | Content | Link | |-----|------|------| | 1๏ธโƒฃ | **๐Ÿ“š Learn to Use** | Read [User Guide](README.md) to learn how to create RPA processes | | 2๏ธโƒฃ | **๐Ÿ”ง Component Development** | Refer to [Component Development Guide](engine/components/) to develop custom components | | 3๏ธโƒฃ | **๐Ÿค Contribute** | Check [Contributing Guide](CONTRIBUTING.md) to participate in project development | | 4๏ธโƒฃ | **๐Ÿ“ฑ Production Deployment** | Refer to [Production Deployment Guide](docker/PRODUCTION.md) for production deployment | ---
### ๐ŸŽ‰ Deployment Complete! **You have successfully deployed AstronRPA server and client** Now you can start creating powerful RPA automation workflows!
![AstronRPA](https://img.shields.io/badge/AstronRPA-Ready-success?style=for-the-badge) **Happy Automating! ๐Ÿค–โœจ**