How to install Ghostwriter locally and in production
STOP! Ghostwriter is installed using Docker Compose. Install Docker before proceeding.
You will need a Docker version >=20 for the Alpine Linux images used for Ghostwriter. Run docker --version to check your installation.

Ghostwriter Environment Variables

First, copy the examples in the .envs_template directory into a new .envs directory within the Ghostwriter directory. These files control the environment variables for the Docker containers.
Run this command to create the directory and then recursively copy the files into your new directory:
mkdir .envs && cp -r .envs_template/.* .envs
You may notice this command does not work as described on your server. Some OS and shell flavors interpret the . characters in different ways. This is discussed in this thread and issue:
Try this sequence if you encounter the recursive copy issues:
shopt -s dotglob
mkdir .envs && cp -r .envs_template/* .envs/
If you are using zsh, use this command: setopt dotglob
The .envs directory contains .local and .production directories. Each of these directories contains the same set of files: .django, .postgres, and .hasura. These files manage the environment variables for the Docker containers.
When configuring these files for your initial local deployment, the default options will be fine. You will want to change some of the values before deploying Ghostwriter into a production environment. This is covered in-depth in the Switch to Production section.
If you wish to change any of the default values now, refer to the Adjusting Production Settings section on that page for guidance.
When you set DATE_FORMAT use Django's format string values. They are different than Python's standard values you might be familair with. Django also offers several additional options.

Building the Container

Once you have the .envs directory setup, check Docker to make sure the service is running. Then build and start the Docker containers using the local.yml file (not production.yml):
docker-compose -f local.yml stop; docker-compose -f local.yml rm -f; docker-compose -f local.yml build; docker-compose -f local.yml up -d
The -d at the end means you will detach from the containers. If you'd like to monitor live console output, remove -d to remain attached to the containers. This is helpful during development and testing.
Resist any temptation to jump straight to using the production settings with production.yml. Production is geared towards actual production use. Therefore, it does not perform certain operations required for the initial setup that might be undesirable in production.

Next Steps

Proceed to Database Setup.