# TheThingsStack V3.8.7 with self-signed certificate -\> Forbidden Token exchange refused

**URL:** <https://www.thethingsnetwork.org/forum/t/thethingsstack-v3-8-7-with-self-signed-certificate-forbidden-token-exchange-refused/38902>\
**Category:** Uncategorized\
**Created:** [July 31, 2020, 8:17am UTC](https://www.thethingsnetwork.org/forum/t/thethingsstack-v3-8-7-with-self-signed-certificate-forbidden-token-exchange-refused/38902 "2020-07-31T08:17:53Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![dsmith](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dsmith/32/25844_2.png) [@dsmith](https://www.thethingsnetwork.org/forum/u/dsmith)\
**Post date:** [December 4, 2020, 10:39am UTC](https://www.thethingsnetwork.org/forum/t/thethingsstack-v3-8-7-with-self-signed-certificate-forbidden-token-exchange-refused/38902/24 "2020-12-04T10:39:01Z")

</div>

I’ve recorded the complete process for setting up TTS open source with a self-signed certificate [here](https://pastebin.com/5j4EaPSy). It’s a bit long for a forum post, hence the pastebin link. Note that I’m using solution 1, replacing `localhost` with the static IP of my machine.

The key parts missing from the current TTS documentation are as follows:

- Uncomment the custom certs sections at the bottom of `docker-compose.yml` (@benolayinka [is adding this to the docs](https://www.thethingsnetwork.org/forum/t/token-exchange-refused-error/41643/19))
- Uncomment the custom certs section near the top of `ttn-lw-stack-docker.yml` and comment out the Let’s Encrypt section (@benolayinka [is adding this to the docs](https://www.thethingsnetwork.org/forum/t/token-exchange-refused-error/41643/19))
- Add additional environment variables to `docker-compose.yaml`. In particular, I needed to add the following variables:

```auto
      TTN_LW_APPLICATION_SERVER_GRPC_ADDRESS: 192.168.1.13:8884
      TTN_LW_DEVICE_TEMPLATE_CONVERTER_GRPC_ADDRESS: 192.168.1.13:8884
      TTN_LW_GATEWAY_SERVER_GRPC_ADDRESS: 192.168.1.13:8884
      TTN_LW_IDENTITY_SERVER_GRPC_ADDRESS: 192.168.1.13:8884
      TTN_LW_JOIN_SERVER_GRPC_ADDRESS: 192.168.1.13:8884
      TTN_LW_NETWORK_SERVER_GRPC_ADDRESS: 192.168.1.13:8884
      TTN_LW_OAUTH_SERVER_ADDRESS: https://192.168.1.13:8885/oauth

```

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I’ve selected these variables by taking the full list from the [relevant github issue](https://github.com/TheThingsNetwork/lorawan-stack/issues/1230) and removing the variables which are already specified via config in `ttn-lw-stack-docker.yml`. Some (or all) of these variables could specified as config in `ttn-lw-stack-docker.yml` instead of as environment variables.

- Add port `8885` to `is.email.network.console-url` and `is.email.network.identity-server-url`.
- Add port `8885` to every url nested under `console`

Would it be possible to add these additional steps to the official configuration docs? I was not able to get my installation working until I found this thread and the linked github issue.

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/thethingsstack-v3-8-7-with-self-signed-certificate-forbidden-token-exchange-refused/38902)._
