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
2 changes: 1 addition & 1 deletion docs/getting-started/server/database/ef/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ chronological order.

### Requirements

- A working local development server
- A working local development server ([see steps](../../guide.md))
- Docker
- A way to manage user secrets in the server project - see
[User Secrets](../../../../contributing/user-secrets.md)
Expand Down
Loading