Rainyun RCA Cloud Application (Kubernetes-Based) Tutorial for Deploying a PHP Website — Virtual Hosting-Like Operation, High Availability, Serverless
This tutorial uses the Discuz! X3.5 forum program as an example to demonstrate how to deploy a PHP website. Other PHP-based programs (such as WordPress, Typecho, DedeCMS, etc.) can follow this guide as well, as the setup process is largely similar.
🚀Currently, during the public beta of Cloud Applications (May 2, 2025 – May 11, 2025), each user receives 10💧Rain Points (similar to credits, exclusively for RCA, can be recharged) as testing funds!
Site Admin Group Chat: 767557452
Introduction to Cloud Applications
🚀Cloud Applications (RCA, Rain Cloud Apps) is a container-based application platform developed by Rainyun using Kubernetes. It offers users a new way to develop, deploy, and manage containerized applications. Carefully designed for high availability, flexibility, and ease of use, RCA includes built-in sections for Apps, Websites, and Databases, along with an integrated App Store. The first batch includes hundreds of applications and supports third-party stores like 1Panel, allowing you to rapidly deploy popular apps like Alist, Cloudreve, and many others — all without purchasing a server. Managing updates, files, and settings is fast and simple, with one-click deployment.
🚀Billed hourly, with flexible resource scaling and project deletion at any time. In simple terms, it's a Docker container rental/hosting platform.
What is Kubernetes?
Kubernetes (K8s) is an open-source container orchestration platform originally developed by Google and now maintained by the Cloud Native Computing Foundation (CNCF). It aims to simplify the deployment, management, and scaling of containerized applications. As a core component of the cloud-native tech stack, it enables efficient application operations through automation, and supports large-scale cluster management from a single node to multi-cloud environments.
Its core capabilities include: automated deployment and rolling updates to ensure service continuity; elastic scaling to dynamically adjust resources based on load, maximizing efficiency; service discovery and load balancing for intelligent inter-container communication; and self-healing mechanisms to automatically replace failed instances, improving system reliability. Kubernetes also provides declarative APIs, allowing infrastructure and application states to be defined via configuration files, significantly simplifying DevOps complexity.
With a modular architecture and open ecosystem, Kubernetes has become the go-to choice for microservices, CI/CD pipelines, and edge computing. It empowers startups and large enterprises alike to build modern, flexible, and scalable application architectures, accelerating digital transformation.
Introduction to Discuz! X
Discuz! X is an open-source community forum software developed by Comsenz, a Chinese company acquired by Tencent in 2010. It remains one of the mainstream UGC (User-Generated Content) platform tools in the Chinese-speaking internet. Core features include forum management, user interaction, and content distribution. It supports custom templates, plugin extensions, and multi-language adaptation. Its responsive design makes it compatible across PC, mobile, and mini-program platforms — ideal for SMEs, webmasters, and content creators looking to quickly launch a community site.
The software is known for being open-source and free (basic version), user-friendly, and ecosystem-rich. Backed by a large developer community and plugin marketplace, it supports functional extensions like social networking, e-commerce, and livestreaming. Since its initial release in 2001, Discuz! X has undergone numerous updates, becoming a benchmark solution for Chinese-language communities thanks to its stable performance, strong security, and deep localization. Millions of forums and communities have been built using it, making it a widely used tool for user engagement and traffic retention.
Official Discuz! X download page: https://url.zeruns.com/discuz
Download the latest Discuz! X3.5 release from the link above — we'll use it later in the tutorial (if you're installing another PHP website program, download that one instead).
Discuz_X3.5_SC_UTF8_20250205 direct link: https://www.123684.com/s/2Y9Djv-ei6vH
Introduction to Rainyun
Rainyun was established in 2018 and is a domestic cloud service provider with independent intellectual property rights. It offers simple, affordable, and reliable cloud products to a wide range of users. Core offerings include cloud servers, bare-metal servers, virtual hosting, gaming cloud, object storage, cloud applications, and CDN services — all of which are highly rated.
Rainyun is one of the few providers in China with independently developed billing and product management systems. Since its founding, it has served hundreds of thousands of users both domestically and abroad — including students, developers, and businesses.
Holds multiple telecom licenses issued by the Ministry of Industry and Information Technology, including ISP, IDC, and CDN.
Offers no-questions-asked refunds within 7 days (limited to 3 times per account). Cloud servers and gaming cloud products can be trialed for just 1 CNY/day (once per product, some premium ones may cost more).
Promo Registration Link: https://www.rainyun.com/zeruns_?s=blog-en
Promo Code: zeruns
Register with the promo code and bind your WeChat account to receive a 50% discount coupon
For other high cost-performance server recommendations: https://blog.vpszj.cn/archives/41.html
Recommended Tutorials for Building Websites
- Set up a personal blog with Typecho on a cloud server — a step-by-step beginner-friendly guide: https://blog.zeruns.com/archives/749.html
- Quickly build a personal blog using a cloud server, BT Panel, and Gridea: https://blog.zeruns.com/archives/783.html
- How to set up a custom domain email server? Poste.io mail server installation guide: https://blog.zeruns.com/archives/822.html
- Quickly deploy a Cloudreve cloud drive site and mount Rainyun object storage: https://blog.zeruns.com/archives/743.html
- Build a Discuz forum site on Linux: https://blog.zeruns.com/archives/681.html
- One-click deploy a Halo blog using 1Panel — complete beginner's guide: https://blog.zeruns.com/archives/858.html
- Beginner's guide to setting up a Flarum forum and creating an online community: https://blog.zeruns.com/archives/866.html
Domain Registration
What is a Domain Name?
A domain name serves as the "address" of a website, replacing difficult-to-remember IP addresses (e.g., 192.168.1.1
). For instance, entering blog.zeruns.com
allows users to access a specific website without memorizing the server's IP.
A domain consists of three components:
- Top-level domain (TLD) — such as
.com
, indicating the domain type - Second-level domain — e.g.,
zeruns
, which is customizable - Subdomain — e.g.,
blog
, which can be freely configured
When a user enters a domain name, the DNS system automatically resolves it to the corresponding server IP. Domains can be purchased through providers like Alibaba Cloud at an annual fee (typically around 50 CNY; less common TLDs may cost less). After purchase, bind the domain to the server's IP address to activate the website. A good domain should be short and memorable — for example, taobao.com
is effective due to its phonetic resemblance.
How to Register a Domain
Domains can be registered via platforms like Tencent Cloud, Alibaba Cloud, and Rainyun. Alternatively, you can use Rainyun's free subdomain service.
- Tencent Cloud registration link: https://curl.qcloud.com/rbDL8jYd
- Alibaba Cloud registration link: https://www.aliyun.com/minisite/goods?userCode=jdjc69nf
- Rainyun registration link: https://www.rainyun.com/zeruns_?s=blog-en
The following demonstrates domain registration on Rainyun using the domain zeruns.xyz
.
Navigate to the domain service section under cloud products:
Click "Register Domain" and search for the desired domain:
Follow the prompts and enter the required information:
After filling in the information, click "Register Now" and wait for the approval process:
The domain filing (ICP filing) process is not detailed here — please refer to relevant resources for more information.
Note: If you purchase a domestic cloud server from major providers such as Tencent Cloud or Alibaba Cloud for more than 3 months, they typically provide free ICP filing services. Similarly, Rainyun also offers free ICP filing for its domestic servers with a minimum 3-month purchase.
Currently, Rainyun Cloud Applications are available only in Zhejiang and Ningbo. ICP filing is mandatory for deploying websites on domestic servers. Rainyun plans to offer Hong Kong-region Cloud Applications in the future (launch date TBD), which will not require filing.
Creating a Project & Deploying the Website
After registering a Rainyun account (Rainyun promo code: zeruns), go to the Rainyun console and click Cloud Products → Cloud Applications.
Click My Projects → Create.
Set a project name yourself. The default 1GB disk size is generally sufficient, and you can expand it later if needed. Finally, click Create Project.
Click on the project you just created.
Go to Database Management and create a new database. Choose MySQL and click Install.
Select the MySQL version. In this case, we're installing Discuz! X3.5, which officially supports MySQL 5.5 to 8.0, so we'll go with MySQL 5.6. Leave the resource configuration as default (you can upgrade it later if your traffic grows). For service type, choose internal access. Use the randomly generated root password, or change it if needed. Then click Install Application.
Go to Website Management → Create Website.
Set a website name, enter your domain name (in this example, we use bbs.zeruns.com
for a forum), select PHP Website as the type, and choose PHP 7.4 (Discuz! X3.5 supports 5.6+/7.0+/8.0~8.2, so choose the version according to your web app requirements). Select the default OpenResty web server and leave the version and resource limits as default. Finally, click Create Website.
OpenResty is a high-performance web platform based on Nginx, integrated with the Lua scripting language and various third-party modules. It excels in handling high concurrency and rapid responses, especially in static content delivery, reverse proxying, and load balancing. For instance, when many users access the site simultaneously, OpenResty can efficiently manage connections and use Lua scripts for dynamic logic (such as API authentication or traffic control). Compared to traditional servers like Apache, OpenResty is more suited to scenarios requiring fast response and complex dynamic handling. For beginners, think of it as a “traffic controller” efficiently directing website requests.
PHP is focused on backend business logic, like generating dynamic web pages, managing databases, or running CMS platforms like WordPress. It works with PHP-FPM (FastCGI Process Manager) alongside OpenResty. When a user requests dynamic content (like login pages or article listings), OpenResty forwards the request to PHP-FPM, which executes the PHP code, interacts with the database, and returns the result. PHP has simple syntax and a rich ecosystem, making it great for rapid development, though it relies on OpenResty to optimize performance.
How they work together: OpenResty typically acts as the frontend server. Static files (like images or CSS) are served directly, while dynamic requests (like PHP scripts) are forwarded via the FastCGI protocol to PHP-FPM. This architecture combines OpenResty's high concurrency capabilities with PHP's flexible logic, making it a popular setup for high-performance PHP websites.
In the website list, click on the newly created website, then go to Domain Management and copy the CNAME address on the right (shared IP is used by default. For a dedicated IP, add one in the project settings; Ningbo region IPs come with 100G anti-DDoS. Update the container settings in OpenResty to switch to a dedicated IP).
Go to your domain DNS settings and point the domain to the copied address (or your dedicated IP if you're using one). For example, set bbs.zeruns.com
as a CNAME to cn-nb1.website.rainapp.top
.
In Website Management, go to File Management, click New → Upload File, and upload your PHP website package.
Click Actions next to the uploaded archive and select Extract to Current Directory.
If the extracted files include index.php
, you can delete the uploaded zip. If not, find the directory with index.php
, move all its files to the root directory. For Discuz! X3.5, files are in the upload
directory. Delete other folders and move all upload
contents to the root (note: with many files, they may span multiple pages, so repeat this step as needed).
Now go to your browser and enter your domain — it should launch the installation wizard. Follow the prompts (some website programs may require you to manually edit configuration files for DB info). Just keep clicking Next.
When setting up the database, enter your internal DB service address (available under Database Management), choose a database name, input your DB password (set during DB creation), and set the site admin password. Then click Next and wait a moment.
If using Discuz! X3.5, you may see errors after installation. Go to your admin panel (http://yourdomain/admin.php
, e.g. http://bbs.zeruns.com/admin.php
), then go to Tools → Update Cache → select all options → Confirm.
(Note: In the tutorial, only files on the first page were moved, causing errors. This shouldn't happen with a full transfer.)
After updating the cache, return to the homepage — your site should now be working.
From the admin panel, you can modify site settings, install plugins, and change themes from the application center.
To enable HTTPS, go to the SSL Certificate Center in the Rainyun console, apply for a certificate, and bind it under the website's SSL settings.
Recommended Reading
- Cost-effective and affordable VPS/cloud server recommendations: https://blog.zeruns.com/archives/383.html
- Minecraft server setup tutorial: https://blog.zeruns.com/tag/mc/
- DeepSeek-R1 private deployment tutorial with Ollama + OpenWebUI: https://blog.zeruns.com/archives/853.html
- Open-source Type-C dock: 4x 10Gbps USB-A ports + 2.5G Ethernet + card reader (VL822+RTL8156BG+GL3224): https://blog.zeruns.com/archives/868.html
- iKuai IK-Q3000 WiFi 6 router: unboxing, review & teardown: https://blog.zeruns.com/archives/860.html
- iKuai IK-X9 ceiling AP: unboxing, review & teardown – tri-band WiFi 7, BE5000, 2.5G port: https://blog.zeruns.com/archives/846.html
Comment Section