Quick Start
This document will guide you to quickly get started with CloudBase static website hosting service, managing and deploying your static website files through the console.
Prerequisites
Before you begin, please ensure that you have:
- A Tencent Cloud account with real-name verification completed
- Created a CloudBase environment
Step 1: Go to Static Website Hosting
Go to CloudBase Console - Static Website Hosting

Step 2: Prepare Website Files
Create a simple HTML file as an example, named index.html:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>欢迎使用云开发静态网站托管</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
margin: 0;
padding: 40px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
text-align: center;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.container {
max-width: 600px;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
}
p {
font-size: 1.2em;
line-height: 1.6;
margin-bottom: 30px;
}
.btn {
display: inline-block;
padding: 12px 24px;
background: rgba(255, 255, 255, 0.2);
border: 2px solid white;
border-radius: 25px;
color: white;
text-decoration: none;
transition: all 0.3s ease;
}
.btn:hover {
background: white;
color: #667eea;
}
</style>
</head>
<body>
<div class="container">
<h1>🎉 恭喜!</h1>
<p>您的静态网站已成功部署到云开发平台</p>
<p>现在您可以开始构建您的网站了</p>
<a href="https://docs.cloudbase.net/" class="btn" target="_blank">查看文档</a>
</div>
</body>
</html>
You can also prepare other types of files:
- CSS style files
- JavaScript script files
- Images, fonts and other static resources
- Single Page Application (SPA) build artifacts
Step 3: Upload Files
Method 1: CloudBase Platform Upload
- On the static website hosting page, click the "Upload Files" button
- Select the prepared
index.htmlfile - Click "Confirm" to complete the upload

Method 2: Batch Upload
If you have multiple files to upload:
- Click the "Upload Folder" button
- Select the entire folder containing the website files
- The system will maintain the original directory structure during upload
Method 3: CLI File Management
Use the CloudBase CLI tool to manage and deploy static website files via command line.
Install CLI tool:
npm install -g @cloudbase/cli
Login authorization:
cloudbase login
Deploy files:
# Deploy all files in the current directory
cloudbase hosting deploy . -e <Environment ID>
# Deploy specific file
cloudbase hosting deploy index.html -e <Environment ID>
# Deploy specific folder
cloudbase hosting deploy dist/ -e <Environment ID>
Advantages:
- ✅ Supports batch upload, faster speed
- ✅ Automated deployment, CI/CD integration
- ✅ Provides more management commands (delete, list, etc.)
- ✅ Suitable for developers and team collaboration
For detailed usage, please refer to CLI Static Hosting Commands.
- Single file size limit is 50MB
- File names cannot contain special characters, it is recommended to use English, numbers, underscores and hyphens
- Upload will overwrite files with the same name, please operate with caution
Step 4: Access Your Website
Access Rules
The access link format for static resources is: Default Domain/File Path
- Default Domain:
Environment ID.xxx.tcloudbaseapp.com - Default Index Document:
index.html
Access Examples
Assuming your environment ID is my-env-123.xxx, the access links are as follows:
| File Path | Access Link | Description |
|---|---|---|
/index.html | https://my-env-123.xxx.tcloudbaseapp.com | Root directory default page |
/about/index.html | https://my-env-123.xxx.tcloudbaseapp.com/about | Subdirectory default page |
/css/style.css | https://my-env-123.xxx.tcloudbaseapp.com/css/style.css | CSS file |
/images/logo.png | https://my-env-123.xxx.tcloudbaseapp.com/images/logo.png | Image file |
Verify Deployment
- Copy your default domain
- Open the link in your browser
- If you see the page content you uploaded, the deployment is successful

Next Steps
Congratulations on successfully deploying your first static website! Next, you can:
- Configure Custom Domain - Use your own domain to access the website
- Online Deployment Guide - Learn more deployment methods and build configurations
- CDN Acceleration Configuration - Optimize website access speed
- HTTPS Configuration - Enable secure connections for your website