Complete Guide to Building a Website on Linux Using aaPanel (BT Panel)

Back to Posts
1504 words
Complete Guide to Building a Website on Linux Using aaPanel (BT Panel)
2026-04-11

Introduction#

:::warning Important Note The content of this article may differ from the actual situation due to aaPanel version updates. This guide is for reference and learning purposes only. For actual operations, please refer to the latest tutorials and documentation provided on the official aaPanel website. :::

For developers or webmasters who want to set up their own websites, traditional command-line operations can be complex and error-prone. aaPanel (formerly known as BT Panel) is an excellent server management tool that greatly simplifies the website deployment process. This article will walk you through installing aaPanel on a Linux server and using it to build a complete website.


Prerequisites#

Server Requirements#

Before you begin, you’ll need the following:

  • A Linux server (CentOS 7.x, Ubuntu 18.04+, or Debian 9+ recommended)
  • Root or sudo access to the server
  • A stable internet connection
  • Recommended specs: 1 CPU core, 1 GB RAM, 20 GB+ disk space

Domain Name (Optional)#

While you can access your site via IP address, a domain name provides a better user experience. You can purchase one from providers like Alibaba Cloud, Tencent Cloud, or any domain registrar.


Installing aaPanel#

Connect to Your Server#

First, connect to your Linux server via SSH:

Terminal window
ssh root@your_server_ip

Enter your password to log in.

Run the Installation Command#

:::tip Note The security entry parameter in the installation command below (e.g., ed8484bec) is just an example. The system will generate a random security entry automatically during actual installation. Always use the latest official installation command from the aaPanel website. :::

Choose the appropriate installation command for your operating system:

CentOS / AlmaLinux / Rocky Linux#

Terminal window
yum install -y wget && wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh

Ubuntu / Debian#

Terminal window
wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

Other Linux Distributions#

Terminal window
wget -O install.sh https://download.bt.cn/install/install_6.0.sh && bash install.sh

:::info Getting the Latest Command Visit the official aaPanel website homepage to get the latest installation command for your specific operating system. :::

Installation Process#

After running the installation command, you’ll be prompted to confirm. Type y and press Enter to proceed. The installation typically takes 5–15 minutes, depending on your server’s performance and network speed.

Once completed, the terminal will display something like:

==================================================================
Congratulations! Installed successfully!
==================================================================
External Panel URL: http://your_server_ip:random_port/random_security_entry
Internal Panel URL: http://your_local_ip:random_port/random_security_entry
username: random_username
password: random_password
Warning:
If you cannot access the panel,
release the following port (panel_port|80|443|20|21) in the security group
==================================================================

:::warning Important Newer versions of aaPanel use random ports and random security entries by default, rather than the fixed 8888 port. Please carefully record the full access URL, username, and password displayed after installation. :::

Save this information somewhere safe – especially the access URL, username, and password.


Logging Into aaPanel#

Open Required Ports#

Before logging in for the first time, ensure your server’s security group has the necessary ports open:

  • aaPanel Port: The random port displayed after installation (not fixed at 8888)
  • 80: HTTP
  • 443: HTTPS
  • 20/21: FTP (if you need FTP access)
  • 3306: MySQL (only if remote database access is required)

:::tip Port Notes Newer aaPanel versions use random ports for improved security. Check the installation output for your specific port number. If you’re using a cloud server (e.g., Alibaba Cloud, Tencent Cloud), you’ll need to open these ports in the cloud console’s security group settings. :::

Access the Panel#

In your browser, enter the External Panel URL displayed after installation, for example:

http://your_server_ip:random_port/random_security_entry

Enter the username and password you recorded earlier to log in.

:::warning Important If you can’t access the panel, check:

  1. Whether the server firewall has opened the panel port
  2. Whether the cloud security group has opened the panel port
  3. Whether the access URL is correct (including port number and security entry) :::

Initial Configuration#

On first login, aaPanel will recommend installing a set of common software packages. For website hosting, we recommend the LNMP stack:

  • Nginx – Web server
  • MySQL – Database
  • PHP – Scripting language
  • phpMyAdmin – Database management tool

Choose the appropriate versions based on your needs, then click “One‑Click Install”. The installation may take some time, so please be patient.


Creating a Website#

Add a Site#

  1. Click “Website” in the left sidebar
  2. Click the “Add Site” button
  3. Fill in the required information:
    • Domain: Enter your domain name (or use your IP address if you don’t have a domain yet)
    • Root Directory: The path for your website files – the default is fine
    • Database: Choose whether to create a database and its type
    • PHP Version: Select the appropriate PHP version
    • Remark: Optional – for identifying the site’s purpose
  4. Click “Submit” to create the site

Upload Website Files#

Method 1: Upload via File Manager#

  1. Click “Files” in the left sidebar
  2. Navigate to the site root directory (usually /www/wwwroot/your_domain)
  3. Click the “Upload” button and select your local website files
  4. Wait for the upload to complete

Method 2: Upload via FTP#

  1. Click “FTP” in the left sidebar
  2. View the FTP account details
  3. Connect to the server using an FTP client (e.g., FileZilla)
  4. Upload your files to the corresponding directory

Method 3: Clone via Git#

If your project is hosted on GitHub or another Git platform:

  1. Open a terminal in your site root directory
  2. Run the git clone command:
Terminal window
cd /www/wwwroot/your_domain
git clone https://github.com/username/repo.git .

Configure Your Site#

Basic Settings#

  1. Click “Settings” next to your site in the list
  2. You can modify the following:
    • Domain Management: Add or remove domains
    • Directory Binding: Change the site root directory
    • Traffic Limiting: Set bandwidth limits
    • Rewrite Rules: Configure URL rewrite rules (pseudo‑static)

SSL Certificate Configuration#

To enable HTTPS access for your site:

  1. In the site settings, click “SSL”
  2. Select “Let’s Encrypt” for a free certificate
  3. Check the domains you want to secure
  4. Click the “Apply” button
  5. Once issued, enable “Force HTTPS”

Domain Name Resolution#

Get Your Server IP Address#

You can find your public IP address on the aaPanel dashboard or in your server information.

Configure DNS Resolution#

  1. Log in to your domain registrar’s control panel (e.g., Alibaba Cloud, Tencent Cloud)

  2. Find the DNS resolution settings

  3. Add an A record:

    • Host Record: @ (for the root domain) or www
    • Record Value: Your server’s IP address
    • TTL: Default is fine
  4. Wait for DNS propagation (typically takes anywhere from a few minutes to a few hours)

Verify Resolution#

Use the ping command to check if the domain resolves correctly:

Terminal window
ping your_domain.com

If it returns your server’s IP address, the resolution is successful.


Security Optimisation#

Change the Panel Port#

To improve security, it’s recommended to periodically change the aaPanel access port:

  1. After logging in, click “Panel Settings” in the left sidebar
  2. Find the “Panel Port” option
  3. Change it to an uncommon high port (e.g., between 10000‑65535)
  4. Save the settings and restart the panel service

:::warning Important After changing the port, make sure to:

  1. Open the new port in your cloud security group
  2. Close the old port’s security group rules
  3. Access the panel using the new port address :::

Set a Strong Password#

Ensure your password is complex – include uppercase and lowercase letters, numbers, and special characters.

Enable the Firewall#

  1. Click “Security” in the left sidebar
  2. Enable the system firewall
  3. Only open necessary ports
  4. Consider setting up IP whitelists to restrict access

Keep Everything Updated#

Regularly update aaPanel and all installed software:

  1. Click “Update” on the dashboard to check for the latest version
  2. Apply security patches promptly
  3. Update web servers, databases, and other components

Backup Strategy#

  1. Click “Scheduled Tasks” in the left sidebar
  2. Add regular backup tasks:
    • Back up website files
    • Back up databases
    • Set retention periods
  3. You can choose to back up locally or to remote storage

Performance Optimisation#

Nginx Optimisation#

  1. Find Nginx in the App Store
  2. Click “Settings” to optimise:
    • Enable gzip compression
    • Adjust worker_processes to match your CPU cores
    • Configure caching strategies

PHP Optimisation#

  1. Adjust PHP settings:
    • memory_limit – increase appropriately
    • max_execution_time – set a reasonable value
    • opcache – enable OPcache for speed

Database Optimisation#

  1. In MySQL settings:
    • Adjust innodb_buffer_pool_size
    • Enable query caching
    • Regularly optimise table structures

Enable CDN (Optional)#

For high‑traffic websites, consider using a CDN:

  1. Sign up for a CDN provider (e.g., Alibaba Cloud CDN, Tencent Cloud CDN)
  2. Point your domain’s CNAME to the CDN‑provided address
  3. Configure your origin server settings in the CDN console
  4. Set caching policies and HTTPS certificates

A CDN effectively reduces server load and improves user access speed, especially for static content delivery.


Monitoring & Maintenance#

Monitor Server Status#

aaPanel provides comprehensive monitoring features:

  • CPU usage
  • Memory usage
  • Disk space
  • Network traffic
  • System load

Regularly check these metrics to catch potential issues early.

Log Management#

  1. View access logs and error logs in your site settings
  2. Analyse logs to identify problems
  3. Periodically clean old logs to free up space

Common Issues & Fixes#

Website Not Accessible#

  1. Check if the server is running
  2. Confirm the security group ports are open
  3. Verify domain resolution is correct
  4. Check Nginx/Apache error logs

Database Connection Failed#

  1. Confirm the database service is running
  2. Check database username and password
  3. Verify database permissions
  4. Check database error logs

Pages Loading Slowly#

  1. Check server resource usage
  2. Optimise website code and assets
  3. Enable caching mechanisms
  4. Consider upgrading server configuration

Advanced Features#

Scheduled Tasks#

Use aaPanel’s scheduled tasks feature to:

  • Periodically clean temporary files
  • Automate backups
  • Schedule service restarts
  • Run custom scripts

Multi‑Site Management#

aaPanel supports hosting multiple websites on a single server:

  1. Each site has independent configuration
  2. Different domains can point to different directories
  3. Assign different PHP versions per site
  4. Separate databases and FTP accounts for each site

Docker Support#

aaPanel also includes Docker container management:

  1. Install Docker from the App Store
  2. Easily deploy various containerised applications
  3. Manage images and containers
  4. Configure container networking and storage

Conclusion#

By following this guide, you should now have a solid understanding of the complete workflow for using aaPanel to build a website on a Linux server – from installation and site creation to domain configuration, security, and performance optimisation. aaPanel’s intuitive graphical interface significantly lowers the barrier to website deployment.

Key takeaways:

  1. Ensure your server meets the basic requirements before installation
  2. After first installation, promptly change default settings to improve security
  3. Configure your website parameters properly for optimal performance
  4. Establish regular backup and maintenance habits
  5. Choose the right optimisation strategies based on your actual needs

As you become more familiar with aaPanel, you can explore advanced features like load balancing and cluster deployment. We hope this tutorial helps you successfully launch your own website!


Further Reading#

Complete Guide to Building a Website on Linux Using aaPanel (BT Panel)
https://blog.yufurry.cn/posts/00000010/
Author
LanyingShadow
Published
2026-04-11
License
CC BY-NC-SA 4.0
Download Markdown Source