Skip to content
Merged
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
40 changes: 18 additions & 22 deletions docs/product/relay/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Getting started with [Relay](/product/relay/) is as simple as using the default
<Alert>

The Relay server is called `relay`. Download binaries from [GitHub
Releases](https://github.com/getsentry/relay/releases). A Docker image is provided on [DockerHub](https://hub.docker.com/r/getsentry/relay/).
Releases](https://github.com/getsentry/relay/releases). A Docker image is provided on the [Github Container Registry](https://github.com/getsentry/relay/pkgs/container/relay).

</Alert>

Expand All @@ -30,18 +30,14 @@ container and copying in the files.

```shell {tabTitle:Run in Docker}
# Adjust permissions for the configuration directory
# The :z option is only necessary on selinux.
# See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label.
docker run --rm -it \
-v $(pwd)/config/:/work/.relay/:z \
--entrypoint bash \
getsentry/relay \
-c 'chown -R relay:relay /work/.relay'
chown -R 65532:65532 ./config
Copy link

Choose a reason for hiding this comment

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

Bug: Docker Volume Initialization and Path Consistency Issue

The chown command runs on the host and assumes the ./config directory exists, causing a "No such file or directory" error on first run because the directory isn't created by Docker yet. Also, the path inconsistency between chown's ./config and Docker's "$(pwd)"/config/ might cause permissions to be applied to an unintended directory.

Fix in Cursor Fix in Web


# Generate the configuration
docker run --rm -it \
-v $(pwd)/config/:/work/.relay/:z \
getsentry/relay \
# The :z option is only necessary on selinux.
# See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label.
docker run --rm -it \
-v "$(pwd)"/config/:/work/.relay/:z \
ghcr.io/getsentry/relay \
config init
```

Expand Down Expand Up @@ -128,9 +124,9 @@ To register Relay with Sentry:
1. Copy the contents of the public key, either by inspecting the `credentials.json` file or by running:

```shell {tabTitle:Run in Docker}
docker run --rm -it \
-v $(pwd)/config/:/work/.relay/ \
getsentry/relay \
docker run --rm -it \
-v "$(pwd)"/config/:/work/.relay/ \
ghcr.io/getsentry/relay \
credentials show
```

Expand All @@ -154,10 +150,10 @@ This process registers Relay with Sentry so it is ready to send messages. See
After registering Relay with Sentry, it is ready to run:

```shell {tabTitle:Run in Docker}
docker run --rm -it \
-v $(pwd)/config/:/work/.relay/ \
-p 3000:3000 \
getsentry/relay \
docker run --rm -it \
-v "$(pwd)"/config/:/work/.relay/ \
-p 3000:3000 \
ghcr.io/getsentry/relay \
run
```

Expand All @@ -181,10 +177,10 @@ Refer to the [Logging](../monitoring/#logging) page for more information on how
If you moved your config folder (for example, for security reasons), use the `--config` option to specify the location:

```shell {tabTitle:Run in Docker}
docker run --rm -it \
-v $(pwd)/config/:/etc/relay/ \
-p 3000:3000 \
getsentry/relay \
docker run --rm -it \
-v "$(pwd)"/config/:/etc/relay/ \
-p 3000:3000 \
ghcr.io/getsentry/relay \
run --config /etc/relay/
```

Expand Down
Loading