As an experienced CMS website operation personnel for information security, I am well aware of the importance of an efficient and stable content management system for corporate operations.The Anqi CMS, with its high performance and enterprise-level features in Go language, provides a solid foundation for our content operation work.While using 1Panel such a visual management tool, combined with Docker container technology, it can greatly simplify the deployment process, allowing us to focus more quickly on content creation and optimization.

Below, I will introduce in detail how to quickly deploy the AnQiCMS Docker container through 1Panel.

Embrace Containerization: The Perfect Combination of AnQiCMS and 1Panel

AnQi CMS is a powerful, enterprise-level content management system designed for content operations, supporting multi-site management, flexible content models, advanced SEO tools, and other core functions, which can effectively improve the efficiency and security of content operations.In modern server management, containerization deployment has become mainstream, and 1Panel, as an easy-to-use Linux server operation and maintenance management panel, makes the deployment of Docker containers unprecedentedly convenient.By deploying AnQiCMS through Docker containers, we can achieve a variety of advantages such as environment isolation, quick deployment, easy migration and expansion, ensuring stable and efficient operation of AnQiCMS.

Preparation Before Deployment

Before starting the AnQiCMS Docker container deployment, we need to make sure that the server environment meets the basic requirements.Firstly, you need to have the 1Panel management panel installed on your server.If you have not installed it, you can refer to the installation instructions on the 1Panel official website.Moreover, AnQiCMS requires database support and reverse proxy to provide web services.Therefore, please install OpenResty (or Nginx) and MySQL in advance in the 1Panel app store.These are the basic components for building the AnQiCMS running environment.

Starting the AnQiCMS Docker Container

Completed the installation of the basic software, we can then proceed to create the Docker container for AnQiCMS.Login to the 1Panel panel, find and click the "Container

In the pop-up container creation interface, we need to fill in the relevant information of the container.First, set a recognizable name for your AnQiCMS container, such as “anqicms”.anqicms/anqicms:latestThis is the latest stable version mirror provided by AnQiCMS.

In the port setting section, select 'Expose Port'.AnQiCMS container uses the default port 8001 internally, so fill in 8001 in the "Container Port" field.For the 'Server Port', you can also enter 8001.If you need to deploy multiple AnQiCMS containers on the same server in the future, make sure each AnQiCMS container uses a different port number for the 'server port', such as 8002, 8003, and so on, but keep the 'container port' at 8001.

Continue scrolling down, in the "Reboot Strategy" section, it is recommended to select "Reboot after failure" or "Reboot if not manually stopped", which can ensure that the AnQiCMS service can automatically recover and run after the server is rebooted or unexpectedly stopped, enhancing the availability of the service.After all configurations are completed, click the “Confirm” button, 1Panel will start creating and launching the Docker container for AnQiCMS.

Configure reverse proxy site for AnQiCMS.

Docker container has been created and running, and the AnQiCMS service is already listening for requests on the specified port on the server.To allow users to access your website via domain name, we need to configure a reverse proxy.Click on 'Website' in the 1Panel left menu, then switch to the 'Website' tab, and click the 'Create Website' button.

In the website creation interface, select the "Reverse Proxy" type. In the "Primary Domain" field, enter the domain name you wish to use to access the AnQiCMS website, for exampletest.anqicms.comPlease make sure that the domain name has been correctly resolved to your server IP address. Enter the IP address in the "Proxy Address".127.0.0.1:8001.Here the port number must be consistent with the 'Server Port' you set when creating the Docker container in the previous step.If you have deployed multiple AnQiCMS containers and used different server ports, please adjust according to the actual situation.

Finally, click the “Confirm” button to complete the creation of the reverse proxy site.At this moment, 1Panel will automatically configure OpenResty (or Nginx) to forward all web requests to your domain to the AnQiCMS Docker container.

Initialize and start using AnQiCMS

Now, all deployment work has been basically completed. Open your web browser, enter the domain name you just set, for examplehttp://test.anqicms.com/You will see the initialization installation interface of AnQiCMS.Fill in the database connection information according to the interface prompts (connect to the MySQL database you installed in 1Panel), set the background administrator account and password, and your website address, etc., to complete the initial installation of AnQiCMS.

After installation, your AnQiCMS website can provide services to the outside world normally. To access the back-end management interface, please enter in the browser.你的域名/system/for examplehttp://test.anqicms.com/system/. After logging in, you can start publishing articles, managing categories, configuring SEO, and fully utilize the powerful functions of AnQiCMS according to your content operation needs.

Frequently Asked Questions (FAQ)

How to deploy multiple AnQiCMS sites on the same server?

Deploying multiple AnQiCMS sites on 1Panel is very easy.You need to repeat the steps to create an AnQiCMS Docker container, but be sure to assign a different 'server port' (such as 8002, 8003, etc.) to each container each time, while keeping the 'container port' at 8001.Then, create an independent 'reverse proxy' site for each AnQiCMS container in 1Panel, and bind different domain names to the corresponding 'server ports'.Finally, in the backend of each AnQiCMS instance, create and manage different content sites through the 'Multi-site Management' feature.

How to troubleshoot database connection errors during the initialization installation of AnQiCMS?

If AnQiCMS prompts a database connection error during initialization, please first carefully check whether the database name, username, and password you entered in the initialization interface are exactly the same as the information of the MySQL database in 1Panel.其次,confirm whether the MySQL service is running normally, and whether the MySQL user you set has the permission to create databases and tables.Sometimes, the server firewall may prevent the container from accessing the database. Please check the firewall settings of 1Panel to ensure that the AnQiCMS container can access the MySQL port 3306.

How do I forget the password for the AnQiCMS backend administrator?

If you forget the AnQiCMS backend administrator password, you can reset it by directly modifying the user information in the database.Login to Panel 1, enter the MySQL management interface, and find the database used by AnQiCMS.anqi_admin_users(or a similar name) table, find your administrator account record, andpasswordThe field value is modified to a new encrypted password (usually MD5 or other encryption method), or if the system supports temporary reset of plain text passwords, you can try to temporarily set a plain text password to log in and then modify it.The specific operation may require referring to the official documentation of AnQiCMS or seeking technical support.