Prerequisites:

  • Basic knowledge of Docker
  • Have Docker installed on your system. If not, follow the installation guide here.

Infisical is available as a single Docker image to ease deployment. This Docker image only includes the application code, meaning you must supply a connection to a Postgres database and a Redis instance. The following guide provides a detailed step-by-step walkthrough on how you can deploy Infisical with Docker.

1

Pull the Infisical Docker image

Visit Docker Hub and select a version of Infisical image you would like to deploy. Then run the following command in your terminal to pull the specific Infisical Docker image.

docker pull infisical/infisical:<version>

Remember to replace <version> with the docker image tag of your choice.

2

Run Postgres schema migration

Before you can start the instance of Infisical, you need to run the database schema migrations. Follow the step by step guide here on running schema migrations for Infisical.

3

Start Infisical

For a minimal installation of Infisical, you must configure ENCRYPTION_KEY, AUTH_SECRET, DB_CONNECTION_URI, and REDIS_URL. View all available configurations.

We recommend using Cloud-based Platform as a Service (PaaS) solutions for PostgreSQL and Redis to ensure high availability.

Once you have added the required environment variables to your docker run command, execute it in your terminal to get Infisical up and running.

For example:

docker run -p 80:8080  \
-e ENCRYPTION_KEY=f40c9178624764ad85a6830b37ce239a \
-e AUTH_SECRET="q6LRi7c717a3DQ8JUxlWYkZpMhG4+RHLoFUVt3Bvo2U=" \
-e DB_CONNECTION_URI="<>" \
-e REDIS_URL="<>" \
infisical/infisical:<version>

The above environment variable values are only to be used as an example and should not be used in production

Once the container is running, verify the installation by opening your web browser and navigating to http://localhost:80.

self host sign up

Additional discussion

It’s important to note that the above is a basic example of deploying Infisical using Docker. In practice, for production deployments, you may want to use container orchestration platforms such as AWS ECS, Google Cloud Run, or Kubernetes. These platforms offer additional features like scalability, load balancing, and automated deployment, making them suitable for handling production-level traffic and providing high availability.