How to deploy AnQiCMS using Docker, for example with 1Panel or aaPanel?

Calendar 👁️ 83

As an experienced website operator familiar with Anqin CMS, I fully understand the importance of efficient deployment for enterprise content management.AnQiCMS with its efficiency in Go language, flexible customization capabilities, and easy scalability, has become an ideal choice for small and medium-sized enterprises and content operation teams.By combining Docker technology, the deployment experience of AnQiCMS has been significantly improved, especially with the assistance of panels like 1Panel or aaPanel, making the entire process unprecedentedly convenient and efficient.

Advantages of Docker-based deployment of AnQiCMS

AnQiCMS as an enterprise-level content management system developed based on the Go language, is inherently equipped with high performance and high concurrency features.Deployed inside a Docker container, further enhancing these advantages and introducing additional convenience.Docker provides a lightweight, portable, and self-sufficient runtime environment, packaging AnQiCMS and all its dependencies together, ensuring consistent performance of the application across different server environments.This means that AnQiCMS can run in the same way whether you are in the development, testing, or production environment, greatly reducing the issue of 'it works on my machine'.

Moreover, Docker's containerization feature brings excellent isolation.Each AnQiCMS instance runs in an independent container, with no interference between them, which enhances the security and stability of the system.For applications like AnQiCMS that emphasize content security, anti-crawling, watermark management, and other functions, container isolation is undoubtedly an additional safeguard.At the same time, Docker also simplifies the expansion and upgrade process of AnQiCMS.Whether it is horizontal expansion to cope with high traffic or version iteration updates, they can be completed quickly without affecting other services, which is consistent with the modular design concept of AnQiCMS.Combine with management panels like 1Panel or aaPanel, deploying and managing these Docker containers becomes intuitive and easy to use, even for operation personnel without a technical background.

Process of deploying AnQiCMS using 1Panel

1Panel provides a modern Web interface for managing servers and Docker containers, making the deployment of AnQiCMS very intuitive.

First, you need to install 1Panel on the server. The official website of 1Panel is (https://1panel.cn/ provided detailed installation instructions, please choose the appropriate command for your server operating system to install.After installation, it is recommended to install OpenResty (as a replacement for Nginx, used for reverse proxy) and MySQL (as a database service) in the 1Panel app store.

When 1Panel and its required software are ready, you can start deploying the AnQiCMS container.Navigate to the 'Container' section in the left menu of 1Panel, select the 'Container' tab, and then click the 'Create Container' button.In the pop-up configuration interface, you need to fill in the basic information of the container: In the "Name" field, you can enter "anqicms" or any other easily identifiable name.Check the 'Mirror' option under 'Manual Input' and then enter the official Docker image name of AnQiCMS in the input box:anqicms/anqicms:latest. In the "Port" settings, select "Expose Port", and set both the "Server Port" and "Container Port" to8001. It is worth noting that,8001Is the default port listened to by the AnQiCMS container. If you plan to deploy multiple independent AnQiCMS containers on the same server (instead of using the built-in multi-site feature of AnQiCMS), then the "server port" of each AnQiCMS container needs to be set to a different port number, for example8002/8003But the "container port" should remain8001Do not change. Scroll down to the 'Restart Strategy' section where you can choose 'Restart after failure' or 'Restart if not manually stopped' to ensure that the AnQiCMS service can recover automatically after an unexpected stop. Finally, click the “Confirm” button, 1Panel will start creating and launching the AnQiCMS Docker container.

After the container is successfully created, the next step is to configure reverse proxy to access your AnQiCMS website through the domain name.In the left menu of 1Panel, select the 'Website' section, then click the 'Create Website' button.In the pop-up interface, select the 'Reverse Proxy' option. In the 'Primary Domain' field, enter the domain name you wish to use to access the AnQiCMS website, for exampletest.anqicms.com. Fill in the "proxy address" field.127.0.0.1:8001. The IP address points to the local server, and the port number corresponds to the 'server port' setting of your AnQiCMS container.If you have previously set a different server port for the AnQiCMS container (such as8002), then the corresponding port should also be filled in here. Click "OK" to complete the creation of the site.

After completing the above steps, you can enter the domain name you have configured in the browser (for examplehttp://test.anqicms.com/) Visit AnQiCMS. When you visit for the first time, the system will guide you to the initialization installation interface, where you will complete necessary steps such as database configuration and administrator account setup.After installation, your AnQiCMS website can be used normally, the background access address is usually您的域名/system/.

The practice of deploying AnQiCMS using aaPanel

aaPanel (BaoTa International Edition) is also a widely popular server management panel, which supports Docker deployment and provides a convenient graphical user interface.

First, make sure that your server is installed with aaPanel. If you have not installed it, please visit the aaPanel official website (https://www.aapanel.com/new/download.html), follow the instructions to obtain the installation command and execute it on the server.

After the Docker environment is ready, you can install AnQiCMS through the "App Store" of aaPanel.In the aaPanel control panel, navigate to the Docker management interface, and then click 'App Store'.Enter "AnQiCMS" in the search box to search. Found AnQiCMS in the search results, click the "Install" button to enter the installation configuration interface.In the installation settings, you need to fill in the "Domain" field, enter the website domain you wish to use, and set the "Port" to8001. This8001Is the default port inside the AnQiCMS container. Click 'Confirm' to start the installation.The installation process may take 1-5 minutes, please be patient.If an error occurs during installation, please check the error message and try clicking the "Restart" button to reinstall.If the automatic installation fails to configure the reverse proxy successfully, you may need to set it up manually.This usually involves adding a new website under the 'Website' menu in aaPanel, selecting 'Reverse proxy', and then pointing your domain to127.0.0.1:8001(Or you can configure other server ports for the AnQiCMS container).

AnQiCMS through aaPanel's Docker one-click deployment usually pre-installs the website and sets default credentials. Default admin account:adminDefault admin password:123456Back-end access address:您的域名/system/For example, if your website domain ishttp://test.anqicms.com/The backend access address ishttp://test.anqicms.com/system/. It is strongly recommended to change the default administrator account and password immediately after your first login to ensure website security.

Multi-site management of AnQiCMS in Docker environment

AnQiCMS itself has powerful multi-site management functions, which are also applicable in the Docker environment and can be managed more centrally and efficiently.Deploy an AnQiCMS Docker container instance on a server, which can host multiple independent websites simultaneously.

The core principle is that all external domain requests are forwarded to the same AnQiCMS Docker container through reverse proxies on the server (such as Nginx, OpenResty, etc., configured by 1Panel or aaPanel)8001Port. After receiving the request, the AnQiCMS container will identify which site to provide the corresponding website content based on the domain name (identified through the HTTP Host header).

To add a new site on Dockerized AnQiCMS: First, configure reverse proxy for the new domain in your 1Panel or aaPanel. Point the new domain to the server port of the AnQiCMS Docker container (usually127.0.0.1:8001). Next, log in to the back-end management interface of the AnQiCMS main site you have deployed.Find the "Multi-site Management" feature in the left menu. Click "Add New Site" and fill in the details of the new site:

  • Site name: Used for background recognition, can be customized.
  • Site root directory: This path should start with/app/, followed by a directory named based on the new domain name (for example, changenew.anqicms.comto replace dots with underscores, becoming/app/new_anqicms_com), used to store the independent cache and other data of the site, ensuring that it does not duplicate with other site directories.
  • website address: The complete URL of the new site, for examplehttp://new.anqicms.com.
  • Administrator account password: Set the background login credentials for the new site.
  • Database nameSpecify a new database name for the new site, and it is recommended to name it based on the domain name (for examplenew_anqicms_com)
  • Duplicate database informationDue to the AnQiCMS Docker container usually being used with a MySQL Docker container, you can choose to reuse the database connection information of the main site, and AnQiCMS will automatically create the table structure in the new database.
  • Select the template to use: Select a default template for the new site.

Click "OK" to complete the creation of the new site. You can directly enter the admin panel of the new site from the "Visit Backend" button in the multi-site management list, or directly access the new domain name in the browser and add/system/Path. This method avoids the resource overhead of copying AnQiCMS code and launching independent containers for each site, achieving efficient multi-site hosting.

Conclusion

Deploy AnQiCMS by combining Docker with 1Panel or aaPanel, whether it is a content operation team or a small and medium-sized enterprise, can obtain a high-performance, secure, and easy-to-manage content publishing platform with the lowest technical threshold.This modern deployment method not only simplifies the initial setup, but also lays a solid foundation for future expansion and maintenance, allowing you to focus more on high-quality content creation and website operation, thereby attracting and retaining your users.


Frequently Asked Questions (FAQ)

Q1: How to deploy multiple independent AnQiCMS Docker container instances on the same server instead of using the built-in multi-site function of AnQiCMS?

A1:If you wish to deploy multiple completely independent AnQiCMS Docker containers (each with its own database and a separate AnQiCMS application), rather than using AnQiCMS's built-in multi-site feature to manage multiple logical sites within a single container, you will need to assign different 'server ports' and independent MySQL databases to each AnQiCMS container when creating them. For example, the server port for the first AnQiCMS container is8001And connectmysql_db1The server port of the second container is8002And connectmysql_db2. Then, you need to configure independent reverse proxy for each AnQiCMS instance in 1Panel or aaPanel, and point the respective domains (such assite1.comandsite2.com) separately to127.0.0.1:8001and127.0.0.1:8002.

Q2: Why can't the website or backend be accessed after AnQiCMS Docker deployment?

A2:There may be multiple reasons for access issues. First, please check if the firewall (such asufwor security group settings) on the server is open for the website access you are using80and443Port, as well as the 'server port' mapping of the AnQiCMS Docker container (such as8001)。其次,确认反向代理配置是否正确,域名是否已解析到服务器IP,并且反向代理的目标地址是否指向了AnQiCMS容器正确的IP和服务器端口(通常

Related articles

How does AnQiCMS Markdown editor support math formulas and flowchart display?

As an experienced website operator proficient in the AnQi CMS content management system and with a keen perception of user needs, I am delighted to elaborate on how the AnQi CMS Markdown editor supports the display of mathematical formulas and flowcharts.Anqi CMS is committed to providing users with an efficient and flexible content management experience, and understands the importance of precise expression of mathematical formulas and clear presentation of flowcharts in specific fields (such as academic, technical blogs, or project management).

2025-11-06

How to implement string concatenation and array splitting in AnQiCMS templates?

AnQiCMS is an efficient and flexible content management system, whose powerful template engine provides a solid foundation for the dynamic display of website content.In daily content operation and template development, we often need to concatenate strings or split a string into multiple parts for processing according to specific rules.For example, building dynamic links, combining display information, or displaying the comma-separated tag list from the background data on the front end separately.Master the ability to concatenate strings and split arrays in AnQiCMS templates, which can greatly enhance the flexibility and expressiveness of the template

2025-11-06

What are the common functions of filters in AnQiCMS templates (such as truncation, replacement)?

In AnQi CMS template design, filters play a vital role.As an experienced website operator, I know that skillfully using these tools can greatly enhance the quality of content presentation and user experience.The Anqicms template engine has adopted Django's syntax, allowing content creators and template developers to conveniently process and format output data, achieving rich display effects without delving into the backend code.

2025-11-06

How to format timestamp output in AnQiCMS template?

As a professional familiar with Anqi CMS and proficient in content operation, I know that accuracy and beauty in website content display are crucial.A clear and easy-to-read timestamp that not only improves user experience but also reflects the standardization of data display.Below, I will give you a detailed introduction on how to format timestamp output in AnQiCMS template.

2025-11-06

What is the focus of the latest project of AnQiCMS core developer Fesiong?

As a website operator who deeply understands the operation of AnQiCMS, I know the importance of a powerful and flexible CMS system for content creators.Regarding the latest project focus of AnQiCMS core developer Fesiong, we can see his profound strategic considerations from the positioning, technical advantages, and recent update logs of AnQiCMS.**Fesiong: Building safety as a foundation, empowering small and medium-sized enterprises in content operation** The birth of AnQiCMS

2025-11-06

How does Fesiong ensure the continuous update and technological leadership of AnQiCMS?

Fesiong is always committed to building AnQiCMS (AnQiCMS) into a leading, continuously updated content management system, its strategy is rooted in the careful selection of core technology stacks, modular development concepts, rapid iteration practices, and keen insights into user needs.This enables AnQiCMS not only to respond to the current market changes, but also to lay a solid foundation for future content management trends.The technical core of AnQiCMS lies in its choice of Go language as the development foundation.

2025-11-06

What is the connection between AnQiCMS's project vision and Fesiong's personal technical philosophy?

As an experienced website operator familiar with AnQiCMS, I fully understand that the core value of a content management system does not lie solely in its feature set, but also in the design philosophy and vision it embodies.AnQiCMS (AnQiCMS) has stood out among many CMS systems since its inception with its unique positioning and technological advantages.Delving deeper into its project vision, we will find that it is inextricably linked to the personal technical philosophy of system developer Fesion, and both complement each other, shaping the present and future of AnQiCMS

2025-11-06

Which features of the Go language does Fesiong favor in the development of AnQiCMS?

As a senior CMS website operation personnel, I fully understand the importance of an efficient, stable and easy-to-manage content system for daily work.During the long-term collaboration with AnQiCMS, I strongly felt the preference of the core developer Fesiong for Go language. This preference is not groundless, but is reflected in all aspects of system performance, maintainability, and overall user experience.The many features of the Go language are undoubtedly the foundation for AnQiCMS to provide excellent services.

2025-11-06