Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/content/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,18 @@ We can run OPA as a server using Docker:

```bash
docker run -p 8181:8181 openpolicyagent/opa \
run --server --log-level debug
run --server --log-level debug --addr=0.0.0.0:8181
```

{{< info >}}
We have to use `--addr` here to bind to all interfaces to ensure OPA is
accessible from outside the container. This is not necessary when running OPA
in other environments.

More information can be found in the
[security documentation](../security/#interface-binding).
{{< /info >}}

Test that OPA is available:

```
Expand Down
24 changes: 24 additions & 0 deletions docs/content/v0-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,30 @@ OPA binary of version 1.0 or later.
If you run into any issues while upgrading a Rego project, please drop a message
in the #help channel on the [OPA Slack](https://slack.openpolicyagent.org/).

## Upgrading OPA Instances

Prior to OPA 1.0, when running in server mode (`opa run --server/-s`), OPA would
bind to all interfaces by default. In OPA 1.0,
[OPA will bind to `localhost`](https://github.com/open-policy-agent/opa/issues/6286)
by default instead. Though not inherently insecure in a trusted environment,
it's good practice to bind OPA to localhost by default if OPA is not intended to
be exposed to remote services.

If you need to replicate the v0.x behaviour, you can use the `--addr` flag to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps worth explicitly calling out that this is likely necessary when running OPA in Docker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've added an info block for that now

bind to all interfaces. For example:

```sh
opa run --server --addr 0.0.0.0:8181
```

{{< info >}}
When running OPA in a container, binding to all interfaces is required
when the instance needs to be accessed by the host or another container.
{{< /info >}}

More information can be found in the
[security documentation](../security/#interface-binding).

## Upgrading for Go Integrations

Both users of the
Expand Down
Loading