# How to run roboflow models offline in a React app?

**URL:** <https://discuss.roboflow.com/t/how-to-run-roboflow-models-offline-in-a-react-app/7056>\
**Category:** 🤝  Community Help\
**Created:** [September 16, 2024, 8:25am UTC](https://discuss.roboflow.com/t/how-to-run-roboflow-models-offline-in-a-react-app/7056 "2024-09-16T08:25:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_C](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/sean_c/32/5478_2.png) [@Sean\_C](https://discuss.roboflow.com/u/Sean_C)\
**Post date:** [September 16, 2024, 8:25am UTC](https://discuss.roboflow.com/t/how-to-run-roboflow-models-offline-in-a-react-app/7056/1 "2024-09-16T08:25:10Z")

</div>

The title. I ran Roboflow Inference Server locally on my Mac (the docker image), but I’m unsure how to use the `inferencejs` package to do inferencing on the local inference server, more specifically in Vite.

I’ve used the deprecated (I think) Roboflowjs lib with the window.roboflow.auth etc but I’m unsure how to use it to make requests to the Roboflow local inference server.

How do I do this on the inferencejs library?

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [September 16, 2024, 10:42am UTC](https://discuss.roboflow.com/t/how-to-run-roboflow-models-offline-in-a-react-app/7056/2 "2024-09-16T10:42:10Z")

</div>

Hey @Sean_C

roboflow.js is not deprecated, but it’s use is slightly unrelated to the inference server since roboflow.js requires a internet connection to Roboflow to download the model and run inferences on-device using local compute.

If you’re looking to run the model locally, you’re on the right track with [Roboflow Inference](https://inference.roboflow.com) where you can start your own inference server locally. To use the inference server, you can just send requests to a local endpoint (by default, it’s [http://localhost:9001/](http://localhost:9001/)) just as you would to [Roboflow’s Hosted Inference API](https://docs.roboflow.com/deploy/hosted-api).

See more details here: [Predict on an Image Over HTTP - Roboflow Inference](https://inference.roboflow.com/quickstart/run_model_on_image/#run-inference-on-a-v2-route)

---

<div class="post-metadata">

**Author:** ![Sean\_C](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/sean_c/32/5478_2.png) [@Sean\_C](https://discuss.roboflow.com/u/Sean_C)\
**Post date:** [September 16, 2024, 11:31pm UTC](https://discuss.roboflow.com/t/how-to-run-roboflow-models-offline-in-a-react-app/7056/3 "2024-09-16T23:31:29Z")

</div>

Hey Leo,

Thank you for answering my question. What is difference between `roboflow.js` and `inferencejs` then? Is the only way to ping my local inference server instead of Roboflow’s servers to use the REST API and not `inferencejs` or `roboflow.js`?

I already set up my project using `roboflow.js` but I’m unsure how to use my local Roboflow Inference Server. Is it possible to use the `inferencejs` library on a local endpoint?

Nonetheless, thanks for your help.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [October 7, 2024, 11:32pm UTC](https://discuss.roboflow.com/t/how-to-run-roboflow-models-offline-in-a-react-app/7056/4 "2024-10-07T23:32:22Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
