In our latest release, we made sure that you can easily create a Docker container containing Acunetix. You can use such a Docker container, for example, when running multiple engines from multiple locations or when using Acunetix® in the CI/CD environment.
Basic considerations
When installing on Docker, you need to give some attention to the port numbers that Acunetix will use. By default, Acunetix will use port 3443 to listen for requests to the user interface and port 7880 to listen for incoming AcuSensor data.
If your intention is to install additional worker engines on the same Docker host, you will need to plan your setup to avoid port conflicts. For example, if you intend to have 1 main engine and 2 worker engines, your containers port numbers could look like this:
- Main engine:
- Container name: axmain
- Backend port: 3443
- AcuSensor bridge port: 7880
- Worker 1:
- Container name: axworker1
- Backend port: 3444
- AcuSensor bridge port: 7881
- Worker 2:
- Container name: axworker2
- Backend port: 3445
- AcuSensor bridge port: 7882
The following information will be based on this example setup, and with the assumption that the Docker machine has the IP address 192.168.5.142.
Installing Acunetix on Docker with browser-based configuration
Main engine
- Using your Docker host command line, run the following:
docker run -d -p 3443:3443 -p 7880:7880 \ --name "axmain" invicti/acunetix \ --hostname 192.168.5.142
- Point your browser to the Docker machine on port 3443 — in this example, https://192.168.5.142:3443.
- Provide the following information:
- Set the Installation type field to Main installation
- Set the Email field to your email address and enter your full name in the Name field
- Ensure the Hostname field is set to a valid hostname or IP Address for the Docker container (typically the same as for the Docker host)
- Enter your desired password in the Password and confirm it in the Confirm password field
- Enter your License key
- Enable the checkbox labelled I Agree with the license terms
- Click on the Submit button
- The installer will now complete the installation and license activation and take you to the main Acunetix user interface.
Worker engine 1
- Using your Docker host command line, run the following:
docker run -d -p 3444:3444 -p 7881:7881 \ --name "axworker1" invicti/acunetix \ --backend-port 3444 --bridge-port 7881 \ --hostname 192.168.5.142 --engineonly
Note that we are specifying custom port numbers to avoid port conflicts as described above.
- Point your browser to the Docker machine on port 3444 — in this example, https://192.168.5.142:3444.
- Provide the following information:
- Set the Installation type field to Engine only installation
- Set the Email field to your email address and enter your full name in the Name field
- Ensure the Hostname field is set to a valid hostname or IP Address for the Docker container (typically the same as for the Docker host)
- Enter your License key
- Enable the checkbox labelled I Agree with the license terms
- Click on the Submit button
- The installer will now complete the installation and license activation and take you to the worker configuration page.
- Click on the Configure Now button.
- Configure the worker to integrate with the main engine:
- Set the Unique name for this instance field — in this example, you will set the name to axworker1
- Set the Address of the main installation field — in this example, you will set it to https://192.168.5.142:3443 (3443 is the port number for the main installation)
- Click on the Register button.
This completes the configuration of the worker — all that is left is to confirm from the main installation.
- Navigate to the main installation — in this example, the main installation is on https://192.168.5.142:3443.
- Click on the Engines item in the sidebar.
- The Engines list will show your new axworker1 installation pending authorization — click on the Authorize button to complete the procedure.
- Navigate back to the axworker1 user interface on https://192.168.5.142:3444.
- The axworker1 user interface will show it is now registered and connected to the main installation.
Worker engine 2
For the second worker, you would follow the same procedure as for axworker1, simply substituting as necessary for the different instance name and port numbers. In this example, therefore, the Docker run command would read as follows:
docker run -d -p 3445:3445 -p 7882:7882 \ --name "axworker2" invicti/acunetix \ --backend-port 3445 --bridge-port 7882 \ --hostname 192.168.5.142 --engineonly
Simply perform the same steps as for axworker1 adjusting names and ports as necessary.
Installing Acunetix on Docker with Docker command line configuration
Main engine
- On your Docker host command line, run the following:
docker run -d -p 3443:3443 -p 7880:7880 \ --name "axmain" invicti/acunetix \ --hostname "192.168.5.142" -l \ -m "webmaster@acunetixexample.com" \ --password "123Letmein55%" \ --license-key "A1B2-C3D4-E5F6-G7H8" \ --name "Web Master" --silent
- Wait a few minutes for the installer to download and install Acunetix.
- Point your browser to the Docker machine on port 3443 — in this example, https://192.168.5.142:3443.
- This will show the Sign In page — which means that the installation and license activation are complete.
Worker Engine 1
- On your Docker host command line, run the following:
docker run -d -p 3444:3444 -p 7881:7881 \ --name "axworker1" invicti/acunetix \ --hostname "192.168.5.142" \ --backend-port 3444 --bridge-port 7881 \ --engineonly -l \ -m "webmaster@acunetixexample.com" \ --password "123Letmein55%" \ --license-key "A1B2-C3D4-E5F6-G7H8" \ --name "Web Master" --silent
Note that we are specifying custom port numbers to avoid port conflicts as described above.
- Point your browser to the Docker machine on port 3444 — in this example, https://192.168.5.142:3444. You will be taken to the worker configuration page.
- Click on the Configure Now button.
- Configure the worker to integrate with the main engine:
- Set the Unique name for this instance field — in this example, you will set the name to axworker1
- Set the Address of the main installation field — in this example, you will set it to https://192.168.5.142:3443 (3443 is the port number for the main installation)
- Click on the Register button
This completes the configuration of the worker; all that is left is to confirm from the main installation.
- Navigate to the main installation — in this example, the main installation is on https://192.168.5.142:3443.
- Click on the Engines item in the sidebar.
- The Engines list will show your new axworker1 installation pending authorization — click on the Authorize button to complete the procedure.
- Navigate back to the axworker1 user interface on https://192.168.5.142:3444.
- The axworker1 user interface will show it is now registered and connected to the main installation.
Worker Engine 2
For the second worker, you would follow the same procedure as for axworker1, simply substituting as necessary for the different instance name and port numbers. In this example, therefore, the Docker run command would read as follows:
docker run -d -p 3445:3445 -p 7882:7882 \ --name "axworker2" invicti/acunetix \ --hostname "192.168.5.142" \ --backend-port 3445 --bridge-port 7882 \ --engineonly -l \ -m "webmaster@acunetixexample.com" \ --password "123Letmein55%" \ --license-key "A1B2-C3D4-E5F6-G7H8" \ --name "Web Master" --silent
Simply perform the same steps as for axworker1 adjusting names and ports as necessary.
Backing up and restoring Acunetix data from the Docker main engine container
If you wish to back up your Acunetix data to restore it into a new container, you would need to perform the following steps on the Docker host:
# Create a folder to store your backup mkdir /axbak # Adjust permissions of the folder chmod 777 /axbak # Stop the main engine container docker stop axmain # Archive the data inside the stopped container docker run -rm --volumes-from axmain \ -v /axbak:/backup \ --entrypoint /usr/bin/tar \ invicti/acunetix \ cvf /backup/acunetix-backup.tar \ -C /home/acunetix .acunetix # Create a new container using the same ports # as the old container to match the settings # inside the backup archive docker run -d -p 3443:3443 -p 7880:7880 \ --name "axmain2" invicti/acunetix # Stop the new container docker stop axmain2 # Restore the archived data into the new # container docker run --rm --volumes-from axmain2 \ -v /axbak:/backup \ --entrypoint /usr/bin/tar \ invicti/acunetix \ xvf /backup/acunetix-backup.tar \ -C /home/acunetix # Start the new container docker start axmain2
Get the latest content on web security
in your inbox each week.