# Getting discourse ai to work with ollama locally

**URL:** <https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614>\
**Category:** Product Support\
**Tags:** ai\
**Created:** [February 18, 2025, 9:15pm UTC](https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614 "2025-02-18T21:15:24Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [February 20, 2025, 8:16pm UTC](https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614/13 "2025-02-20T20:16:04Z")

</div>

> [@hendersj](#):
>
> `FinalDestination::SSRFDetector::DisallowedIpError (FinalDestination: all resolved IPs were disallowed) lib/final_destination/ssrf_detector.rb:105:in 'lookup_and_filter_ips' lib/final_destination/http'`

That is our default SSRF protection kicking in. You can add exceptions to it via the `DISCOURSE_ALLOWED_INTERNAL_HOSTS` ENV var.

It triggers when Discourse is trying to reach an IP considered internal.

---

_[View the full topic](https://meta.discourse.org/t/getting-discourse-ai-to-work-with-ollama-locally/353614)._
