---
title: "Self-hosted CDN Tutorial"
url: https://www.geekcorelab.cn/en-US/post/self-built-cdn-tutorial
updated: 2026-11-02T14:30:10.320340Z
author: "hhjmk"
summary: "文章介绍了如何低成本选购并配置服务器，重点使用雨云购买1核1G服务器，并选择Ubuntu Server 22.04系统。详细阐述了安装管理端、配置MySQL数据库以及部署CDN的过程，强调使用docker安装数据库简单稳定。文章还介绍了如何通过浏览器访问管理端并创建管理员账户，最后展示了服务器占用资源少，适合加速网站的特点。整体内容围绕服务器的选购与配置，突出低成本和高效操作的优势。"
---

# Self-hosted CDN Tutorial

Choose a Suitable Server
========

![](/uploads/import-placeholder/67)

![](/uploads/import-placeholder/158)
The image above shows the official configuration requirements. Since that's the case, of course we should focus on low cost, so just go to [雨云](https://www.rainyun.com/github_) and buy a 1c1g server.

I chose Ubuntu Server 22.04 as the system.

If you didn't pay attention to the system selection when purchasing, you can shut down the server and change the system.

![](/uploads/import-placeholder/393)
[](https://forum.rainyun.com/t/topic/5511#h-2)Install the Management Console
===================================================

Note: Because the management console needs to use MySQL, I recommend installing it on your main server.  
We choose the first option for the VNC connection:

![](/uploads/import-placeholder/180)

![](/uploads/import-placeholder/174)
When the window changes to this state (as shown above), switch the input method to **English**, then enter `root` and press Enter.

![](/uploads/import-placeholder/412)
After that, you can hold the title bar of this window and drag the window to one side.

![](/uploads/import-placeholder/437)
Find the remote password here, click “Copy”, then click inside the black window again and paste using `Ctrl`+`Shift`+`V`.

If the prompt shown in the following image appears, the login is successful.

![](/uploads/import-placeholder/289)
Then enter the installation command and press Enter `sudo sh -c "$(wget https://goedge.cn/install.sh -O -)"`

![](/uploads/import-placeholder/73)
Note: Under Linux, the paste shortcut is `Ctrl`+`Shift`+`V`, but when connecting to the server through the 雨云 console, to copy you need to use the mouse to select the content to copy, then right-click and choose Copy (but actually, the copy shortcut under Linux is `Ctrl`+`Shift`+`C`, and this shortcut conflicts with the browser shortcut).

If similar content appears, it means installation is in progress.

![](/uploads/import-placeholder/262)
If the keyword `please open the url http://SERVER_IP:7788 on your browser` appears, the installation is successful.

![](/uploads/import-placeholder/245)
At this point, copy the server IP.

![](/uploads/import-placeholder/57)
Paste it into the browser address bar and add `:7788` at the end.

After pressing Enter, it should redirect to this page.

![](/uploads/import-placeholder/387)
We just click Start.

![](/uploads/import-placeholder/304)
Just click Next. If you are a Linux “expert”, you can change the port; I won't change it here.

Next, you will be prompted to configure the database. This host does not have a database installed yet. It is recommended to install it using docker, which is simple and stable.

Enter `apt install docker.io` in the terminal.

That's all.

![](/uploads/import-placeholder/175)
When this prompt appears, enter `y` and press Enter.  
If this error occurs during installation

![](/uploads/import-placeholder/248)
You need to first run `apt <strong>update</strong>`

Then run `apt install docker.io -y` again.

*The difference between having -y and not having -y: whether manual confirmation is required for installation, if there is*  
Wait for it to finish installing, then enter `docker -v`

![](/uploads/import-placeholder/91)
If the version number is output as shown in the image, the installation is successful.  
Next, let's install MySQL. This command allows you to change the part after the equals sign in `MYSQL_ROOT_PASSWORD=rainyunyyds123`; this is the connection password for your MySQL Root user` docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=rainyunyyds123 -d mysql:5.7`

After running this command, wait for the image to be pulled. The speed depends on your server's downstream bandwidth, i.e., the one on the right.  
![image](/uploads/import-placeholder/11)

![](/uploads/import-placeholder/208)
After execution is complete, use `docker ps`

to view the running containers. If a mysql container is output, it means the installation is successful.

![](/uploads/import-placeholder/247)
Then return to the CDN deployment page and fill it in as follows (if you changed the MySQL password, enter the password you set).

![](/uploads/import-placeholder/182)
After confirming everything is correct, click Next and enter the administrator username and password to create your administrator account.

![](/uploads/import-placeholder/361)
After clicking Next, check whether the information is correct.

![](/uploads/import-placeholder/265)
Then click “Confirm and Start Installation”  
After waiting for a while

![](/uploads/import-placeholder/358)
Click OK to jump to the login page.  
After that, the management console is deployed.

![](/uploads/import-placeholder/285)
Not bad, we are only using 0.65GB of memory (check with the htop command, press f10 to exit htop).

![](/uploads/import-placeholder/355)
As the system prompt says, you must install a node to accelerate the website.

![](/uploads/import-placeholder/423)
