Skip to content

Commit b5f158f

Browse files
authored
add faq for proxies (ollama#1147)
1 parent 30141b4 commit b5f158f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/faq.md

+31
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,34 @@ No. Anything you do with Ollama, such as generate a response from the model, sta
102102
## How can I use Ollama in Visual Studio Code?
103103

104104
There is already a large collection of plugins available for VSCode as well as other editors that leverage Ollama. You can see the list of [extensions & plugins](https://github.com/jmorganca/ollama#extensions--plugins) at the bottom of the main repository readme.
105+
106+
## How do I use Ollama behind a proxy?
107+
108+
Ollama is compatible with proxy servers if `HTTP_PROXY` or `HTTPS_PROXY` are configured. When using either variables, ensure it is set where `ollama serve` can access the values.
109+
110+
When using `HTTPS_PROXY`, ensure the proxy certificate is installed as a system certificate.
111+
112+
On macOS:
113+
114+
```bash
115+
HTTPS_PROXY=http://proxy.example.com ollama serve
116+
```
117+
118+
On Linux:
119+
120+
```bash
121+
echo "Environment=HTTPS_PROXY=https://proxy.example.com" >>/etc/systemd/system/ollama.service.d/environment.conf
122+
```
123+
124+
Reload `systemd` and restart Ollama:
125+
126+
```bash
127+
systemctl daemon-reload
128+
systemctl restart ollama
129+
```
130+
131+
### How do I use Ollama behind a proxy in Docker?
132+
133+
Ollama Docker container can be configured to use a proxy by passing `-e HTTPS_PROXY=https://proxy.example.com` when starting the container. Ensure the certificate is installed as a system certificate when using HTTPS.
134+
135+
Alternatively, Docker daemon can be configured to use a proxy. Instructions are available for Docker Desktop on [macOS](https://docs.docker.com/desktop/settings/mac/#proxies), [Windows](https://docs.docker.com/desktop/settings/windows/#proxies), and [Linux](https://docs.docker.com/desktop/settings/linux/#proxies), and Docker [daemon with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy).

0 commit comments

Comments
 (0)