Skip to content

Commit dcdb7f2

Browse files
authored
Instruct to set NO_PROXY to avoid LAPI errors (#775)
1 parent 35313d7 commit dcdb7f2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • crowdsec-docs/unversioned/troubleshooting

crowdsec-docs/unversioned/troubleshooting/intro.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ On Systemd devices you have to set the proxy variable in the environment section
8484
[Service]
8585
Environment=HTTP_PROXY=http://myawesomeproxy.com:8080
8686
Environment=HTTPS_PROXY=https://myawesomeproxy.com:443
87+
Environment=NO_PROXY=127.0.0.1,localhost,0.0.0.0
8788
```
8889

8990
After this change you need to reload the systemd daemon using:
@@ -106,20 +107,21 @@ You can configure `cscli` and `crowdsec` to use [tor](https://www.torproject.org
106107

107108
All (http) requests made to the central API to go through the [tor network](https://www.torproject.org/).
108109

109-
With tor installed, setting `HTTP_PROXY` and `HTTPS_PROXY` environment variables to your socks5 proxy will do the trick.
110+
With tor installed, setting `HTTP_PROXY` and `HTTPS_PROXY` environment variables to your socks5 proxy, as well as setting `NO_PROXY` to local addresses to prevent LAPI errors, will do the trick.
110111

111112
#### Edit crowdsec systemd unit to push/pull via tor
112113

113114
```bash title="systemctl edit crowdsec.service"
114115
[Service]
115116
Environment="HTTPS_PROXY=socks5://127.0.0.1:9050"
116117
Environment="HTTP_PROXY=socks5://127.0.0.1:9050"
118+
Environment="NO_PROXY=127.0.0.1,localhost,0.0.0.0"
117119
```
118120

119121
#### Running the wizard with tor
120122

121123
```bash
122-
$ sudo HTTPS_PROXY=socks5://127.0.0.1:9050 HTTP_PROXY=socks5://127.0.0.1:9050 ./wizard.sh --bininstall
124+
$ sudo HTTPS_PROXY=socks5://127.0.0.1:9050 HTTP_PROXY=socks5://127.0.0.1:9050 NO_PROXY=127.0.0.1,localhost,0.0.0.0 ./wizard.sh --bininstall
123125
```
124126

125127
:::caution
@@ -131,7 +133,7 @@ Do not use the wizard in interactive (`-i`) mode if you're concerned, as it will
131133
#### cscli
132134

133135
```bash
134-
$ sudo HTTP_PROXY=socks5://127.0.0.1:9050 HTTPS_PROXY=socks5://127.0.0.1:9050 cscli capi register
136+
$ sudo HTTP_PROXY=socks5://127.0.0.1:9050 HTTPS_PROXY=socks5://127.0.0.1:9050 NO_PROXY=127.0.0.1,localhost,0.0.0.0 cscli capi register
135137
```
136138

137139
### How to report a bug

0 commit comments

Comments
 (0)