Skip to content
41 changes: 38 additions & 3 deletions docs/getting-started/clients/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,44 @@ npm run build:oss:watch

</Community>

By default, this will use the official Bitwarden servers. You can target your local server by using
the [config command](https://bitwarden.com/help/article/cli/#config). You may need to
[configure node to use your self-signed certificate](https://bitwarden.com/help/article/cli/#using-self-signed-certificates).
By default, this will use the official Bitwarden servers. If you need to develop with Server running
Copy link
Contributor

Choose a reason for hiding this comment

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

๐ŸŽจ SUGGESTED: Clarify section reference

Consider making this reference more explicit:

Suggested change
By default, this will use the official Bitwarden servers. If you need to develop with Server running
By default, this will use the official Bitwarden servers. If you need to develop with Server running locally, see [Environment setup](#environment-setup) below.

This makes it easier to understand that "Environment setup" is a specific section heading.

locally, follow the instructions below in Environment setup.

## Environment setup

### Configure Node to trust development certificates
Copy link
Contributor

Choose a reason for hiding this comment

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

๐ŸŽจ SUGGESTED: Add context about environment variables

Consider adding a brief note about when and where to set these environment variables. Currently, it's not clear:

  • Whether these should be set before building or before running
  • Whether they need to be persistent (e.g., added to shell profile) or just for the current session
  • Which terminal session they apply to

Example addition:

### Configure Node to trust development certificates

Set one of the following environment variables in your shell before running the CLI to connect to a local server with self-signed certificates:

This would help developers understand the timing and scope of these configuration steps.


A quick way to do this is to give Node access to your system certificates in the macOS Keychain:

```bash
export NODE_USE_SYSTEM_CA=1
```

Alternatively, you can add the certificate directly to Node:

```bash
export NODE_EXTRA_CA_CERTS=/path/to/your-certificate.pem
```

### Target local Server instance

If you are running the Bitwarden Web application locally, you only need to set the base server
location. This works because the web application uses Webpack to proxy API requests through to your
local Server APIs.

Run the following when you have Web running locally:

```bash
node build/bw.js config server https://localhost:8080
```

Otherwise, you need to set the individual Server API locations as follows:

```bash
node build/bw.js config server --web-vault http://localhost:8080 \
--api http://localhost:4000 \
--identity http://localhost:33656
```

## Testing and Debugging

Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/server/database/ef/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ that the changes take effect.
2. In the `dev` folder of your server repository, run

```bash
docker compose --profile postgres up
docker compose --profile postgres --profile storage up
```

:::tip[Confirm your database connection!]
Expand All @@ -157,7 +157,7 @@ Docker storage volume and initialize the database from scratch.
2. In the `dev` folder of your server repository, start your database container:

```bash
docker compose --profile mysql up
docker compose --profile mysql --profile storage up
```

:::tip[Confirm your database connection!]
Expand All @@ -176,7 +176,7 @@ Docker storage volume and initialize the database from scratch.
2. In the `dev` folder of your server repository, run

```bash
docker compose --profile mariadb up
docker compose --profile mariadb --profile storage up
```

:::tip[Confirm your database connection!]
Expand Down Expand Up @@ -209,7 +209,7 @@ permissions.
Use the `ef` profile to start all EntityFramework database containers at once:

```bash
docker compose --profile ef up
docker compose --profile ef --profile storage up
```

:::
Expand Down
Loading