# Installing Fides with Docker

This guide covers two approaches for deploying Fides with Docker:

1. **Quick Start with Defaults** - Run Fides immediately with built-in configuration
2. **Custom Configuration** - Connect to external databases and customize settings

## Prerequisites

See the [project requirements](/content/docs/platform/installation/requirements/index.html) to get started.

Run `docker -v` in a new shell to confirm that Docker is ready to use:

Example output:

```
% docker -v
Docker version 20.10.11, build dea9396
```

Once you are sure Docker is running, you are ready to install Fides!

## Pull the Docker Images

Run the following command to pull the latest image from Ethyca's [DockerHub (opens in a new tab)](https://hub.docker.com/r/ethyca/fides):

```
docker pull ethyca/fides
```

To pull the Fides Privacy Center, run the following:

```
docker pull ethyca/fides-privacy-center
```

---

## Method 1: Quick Start with Defaults

Run Fides immediately with built-in configuration and default settings.

### Run the Webserver

Start the Fides webserver with default configuration:

```
docker run -p 8080:8080 ethyca/fides
```

With the Fides webserver running, the hosted UI is available at `http://localhost:8080/`.

⚠️  
**Development Use Only**: This setup uses default credentials and embedded dependencies. For custom configuration, see Method 2 below.

### Next Steps

- Learn about [DSR automation](/content/docs/privacy-requests/index.html) and [data mapping](/content/docs/data-mapping/index.html)
- For custom configuration, continue to Method 2 below

---

## Method 2: Custom Configuration

Connect Fides to your own PostgreSQL and Redis instances with custom environment configuration.

### Prerequisites

In addition to Docker, you'll need:

- External PostgreSQL database (AWS RDS, GCP Cloud SQL, or self-hosted)
- External Redis cache (AWS ElastiCache, GCP Memorystore, or self-hosted)

See the [Architecture Overview](/content/docs/platform/installation/production/architecture/index.html) for more details on external services.

### Configure Fides

You can provide configuration via an `.env` file using the [`--env-file` option (opens in a new tab)](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file) or individual `--env` variables.

See the [Requirements](/content/docs/platform/installation/requirements#required-configuration/index.html) page for a complete list of required configuration variables and their descriptions.

#### Create Configuration File

Create a `config.env` file with your values:

```
FIDES__SECURITY__APP_ENCRYPTION_KEY="athirtytwocharacterencryptionkey"
FIDES__SECURITY__OAUTH_ROOT_CLIENT_ID="fidesadmin"
FIDES__SECURITY__OAUTH_ROOT_CLIENT_SECRET="fidesadminsecret"
FIDES__DATABASE__SERVER="postgres.internal"
FIDES__DATABASE__PORT="5432"
FIDES__DATABASE__USER="fides"
FIDES__DATABASE__PASSWORD="fidessecret"
FIDES__DATABASE__DB="fides"
FIDES__REDIS__HOST="redis.internal"
FIDES__REDIS__PORT=6379
FIDES__REDIS__PASSWORD="fidessecret"
```

⚠️  
**Security**: Replace all example values with secure, randomly generated values. Never use default credentials in production.

### Start the Server

#### Using Environment File

```
docker run \
  -p 8080:8080 \
  --env-file=config.env \
  ethyca/fides
```

#### Using Individual Environment Variables

```
docker run \
  -p 8080:8080 \
  --env FIDES__SECURITY__APP_ENCRYPTION_KEY="athirtytwocharacterencryptionkey" \
  --env FIDES__SECURITY__OAUTH_ROOT_CLIENT_ID="fidesadmin" \
  --env FIDES__SECURITY__OAUTH_ROOT_CLIENT_SECRET="fidesadminsecret" \
  --env FIDES__DATABASE__SERVER="postgres.internal" \
  --env FIDES__DATABASE__PORT="5432" \
  --env FIDES__DATABASE__USER="fides" \
  --env FIDES__DATABASE__PASSWORD="fidessecret" \
  --env FIDES__DATABASE__DB="fides" \
  --env FIDES__REDIS__HOST="redis.internal" \
  --env FIDES__REDIS__PORT=6379 \
  --env FIDES__REDIS__PASSWORD="fidessecret" \
  ethyca/fides
```

💡  
**Note:** The webserver is fully ephemeral and relies on the external database for persistent state. No volume mount is required for the Fides container.

### Verify Installation

To test that your server is running:

1. **Health Check**: Visit `http://localhost:8080/health`
   - You should see: `{"webserver": "healthy", "database": "healthy", "cache": "healthy"}`
2. **Admin UI**: Visit `http://localhost:8080/` to access the Fides admin interface

### Deploy Privacy Center (Optional)

Pull the Privacy Center image:

```
docker pull ethyca/fides-privacy-center
```

Configure and start the Privacy Center:

```
docker run --rm \
  -v $(pwd)/config:/app/config \
  -p 3000:3000 \
  ethyca/fides-privacy-center:latest
```

For more configuration options, see the [Privacy Center configuration guide](/content/docs/privacy-center-fidesjs/privacy-center/index.html).

### Next Steps

- Configure [storage destinations](/content/docs/privacy-requests/guides/storage-destinations/index.html) for privacy request exports
- Set up [integrations](/content/docs/integrations/index.html) to connect to your data systems
- Configure [background workers](/content/docs/platform/workers/index.html) for processing privacy requests
- For production deployments, see [Kubernetes](/content/docs/platform/installation/production/kubernetes/index.html) or [Terraform](/content/docs/platform/installation/production/terraform/index.html)
