As an experienced CMS website operation person, I know the importance of an efficient and stable content management system for enterprise operations.AnQi CMS, with its high performance and enterprise-level features in Go language, provides a solid foundation for our content operation work.By utilizing a visual management tool like 1Panel, 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 how to quickly deploy 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 enhance the efficiency and security of content operations.In modern server management, container deployment has become mainstream, and 1Panel, as a simple and easy-to-use Linux server operation and maintenance management panel, has made the deployment of Docker containers unprecedentedly convenient.By deploying AnQiCMS through Docker containers, we can enjoy many advantages such as environmental isolation, quick deployment, easy migration and expansion, ensuring stable and efficient operation of AnQiCMS.

Preparation work before deployment

Before starting the AnQiCMS Docker container deployment, we need to ensure that the server environment meets the basic requirements.First, 1Panel management panel needs to be installed on your server.If you have not installed it yet, you can refer to the installation instructions on the 1Panel official website to operate.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 required to build the AnQiCMS operating environment.

Start the Docker container of AnQiCMS

After the basic software installation is completed, we can start creating the AnQiCMS Docker container.Log in to the 1Panel panel, find and click the "Container" option in the left menu, then switch to the "Container" tab, and click the "Create Container" button.

In the pop-up container creation interface, we need to fill in the container's relevant information.First, set a recognizable name for your AnQiCMS container, for example, "anqicms".Next, in the mirror selection section, select "Manual input" and then accurately enter the Docker image name of AnQiCMS in the input boxanqicms/anqicms:latestThis is the latest stable version mirror provided by the AnQiCMS official.

In the port setting phase, select "Expose Port". The AnQiCMS container uses the default port 8001, so fill in 8001 in the "Container Port" field.For the "server port", you can also enter 8001.If in the future you need to deploy multiple AnQiCMS containers on the same server, make sure each AnQiCMS container uses a different server port number, 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 restarts or stops unexpectedly, enhancing the availability of the service.After completing all the configurations, click the "Confirm" button, 1Panel will start creating and launching the AnQiCMS Docker container.

Configure reverse proxy site for AnQiCMS

After the Docker container is created and running, the AnQiCMS service is already listening for requests on the specified port of the server.To allow users to access your website through a domain name, we need to configure a reverse proxy.Click 'Website' in the left menu of 1Panel, 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 want to use to access the AnQiCMS website, for exampletest.anqicms.comMake sure that the domain has been correctly resolved to your server IP address. Enter in the "Proxy Address"127.0.0.1:8001. The port number must match the 'server port' you set when you created 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 time, 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 the deployment work is basically completed. Open your web browser and enter the domain name you just set, for examplehttp://test.anqicms.com/You will see the AnQiCMS initial installation interface.Follow the prompts on the interface to fill in the database connection information (connect to the MySQL database installed in your 1Panel), set the background administrator account and password, as well as your website address and other necessary information, and complete the initial installation of AnQiCMS.

After installation, your AnQiCMS website can provide services to the outside world normally. To access the admin 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?

It is very simple to deploy multiple AnQiCMS sites on 1Panel.You just need to repeat the steps to create the AnQiCMS Docker container, but make sure to allocate a different 'server port' (such as 8002, 8003, etc.) for each container, while keeping the 'container port' at 8001.Then, create a separate reverse proxy site for each AnQiCMS container in 1Panel, binding different domain names to 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 initial installation of AnQiCMS?

If AnQiCMS prompts for a database connection error during initialization, first please carefully check whether the database name, username, and password you entered on the initialization interface are completely consistent with the MySQL database information in 1Panel.Next, confirm that the MySQL service is running properly and that the MySQL user you have set up has the permissions to create databases and tables.Sometimes, the server firewall may block containers from accessing the database. Please check the firewall settings of 1Panel to ensure that the AnQiCMS container can access the MySQL 3306 port.

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

If you forget the AnQiCMS admin password, you can reset it by directly modifying the user information in the database.Log in to 1Panel, enter the MySQL management interface, find the database used by AnQiCMS. Atanqi_admin_usersIn the table with a similar name, find your administrator account record, and setpasswordThe value of the field should be changed to a new encrypted password (usually MD5 or other encryption method), or if the system supports temporary resetting of plain text passwords, you can try temporarily setting a plain text password to log in and then change it.The specific operation may require referring to the official AnQiCMS documentation or seeking technical support.