Docker

Run the AnsibleForms image with Docker or Podman, next to a MySQL server of your own

  1. Prerequisites
  2. Install MySQL
  3. Get the image
  4. Test the application

You can run AnsibleForms as a standalone container with Docker or Podman, connected to a MySQL database.

Prerequisites

Before you start, you need:

  • Docker or Podman : one of them installed and running
  • MySQL : installed and running

Install MySQL

Install MySQL 8+, or MariaDB, on a server that the container can reach. Pick your Linux distribution:

Ubuntu ships MySQL 8:

sudo apt-get update
sudo apt-get install -y mysql-server
sudo systemctl enable --now mysql
sudo mysql_secure_installation

AnsibleForms connects to the database over the network, as DB_USER with DB_PASSWORD. Keep remote root login enabled when the secure installation script asks, or create a dedicated account. On Ubuntu and Debian the server listens on localhost only: set bind-address in its configuration so that the container can reach it.

Get the image

Run the published image from the GitHub Container Registry (see Image tags):

ghcr.io/ansibleforms/ansibleforms

Mount a folder or volume at /app/dist/persistent for your config.yaml, forms, playbooks, logs and certificates.

Only the database connection (DB_HOST, DB_PORT, DB_USER, DB_PASSWORD) is required; the other variables have defaults.

For example (a sample config.yaml is in the docker-compose project):

docker run -p 8000:8000 -d -t --mount type=bind,source=/srv/apps/ansibleforms/server/persistent,target=/app/dist/persistent --name ansibleforms -e DB_HOST=192.168.0.1 -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=password ghcr.io/ansibleforms/ansibleforms:7

Once started, the container is listed:

docker ps
CONTAINER ID   IMAGE                                  COMMAND                  CREATED         STATUS         PORTS                                       NAMES
d91f7b05b67e   ghcr.io/ansibleforms/ansibleforms:7    "node ./index.js"        7 seconds ago   Up 6 seconds   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp   ansibleforms

Test the application

Once the container is up, open AnsibleForms in a browser:

  • Open http://your_ip:8000 (or HTTPS, if you set HTTPS=1)
  • Log in as admin / AnsibleForms!123 (or with the password you set with ADMIN_PASSWORD)
  • Next steps:
    • Create forms by adding YAML files to the forms folder or by using the built-in designer
    • Add your playbooks to the playbooks folder of the mounted persistent folder
    • Add an LDAP connection
    • Add users and groups
    • Add an AWX connection
    • Add credentials for external connections, such as other MySQL servers or REST APIs, or to pass to Ansible playbooks

Copyright © 2023-2026 AnsibleForms. All rights reserved.

This site uses Just the Docs, a documentation theme for Jekyll.