# Configuring a local model in APEX Running on VirtualBox VM

Now that APEX 26.1 is here, I'd like to test a lot of things using an agent to generate Applications, but it's always nice to save some coins on the way. So I want to install a couple of local models for that.

I'm going to use Ollama, so I went to [Download Ollama](https://ollama.com/download) and got the version for my the OS I'm using (Windows).

Installation is really simple, using a wizard. After that, you just can go to a browser and check Ollama servers is running in localhost under port 11434.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/56177fd5-0e2c-4a52-89b5-3b9c9e54910e.png align="center")

I'm stalling 2 small models that seems to be good enough to start and can be executed within my hardware, and doing so takes just these lines:

`ollama pull deepseek-r1:8b`

`ollama pull llama3.1:8b`

and then using `Ollama list` we can see all the models installed

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/6cb9034f-3879-4c6b-8ec9-bb0e13ee47ba.png align="center")

Now, I want to use it inside the VM, so I checked the network configurations in VirtualBox and there is an IP address from the Virtual Host-Only ethernet adapter that is manually configured, so that one will be static.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/be1db023-b905-4dbd-aa74-0643de210a93.png align="center")

Then in the WM browser, if we insert that IP and the Ollama server port, it works.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/ec44ac78-d541-4fab-9afd-41d41b358e87.png align="center")

After testing that, then let's go to APEX. Under APP Builder -> Workspace Utilities. Go to Generative AI section, and then click the "Create" button on the upper right.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/41203695-c2b5-46c2-83e2-c0051f606ee0.png align="center")

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/3d8b11f8-f16c-4fa4-ba65-85edf60c3de8.png align="center")

In the Select list, pick Ollama as service provider.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/c05f9cbd-a1cf-467b-9c09-4cf9638bccff.png align="center")

Fill the info in the form like this, and click "Test Connection"

Name: Ollama

Used by App Builder: Enabled (You can change this later)

Default for New Apps: Enabled (You can change this later)

Base URL:HTTP://YOUR#VB#IP:11434

Credential: keep the option - Create New -

API Key: Ollama

Static ID: Automatically filled (ollama)

AI Model: llama3.1:8b

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/55b7638a-7143-463c-9655-11bbf9de2c57.png align="center")

Then click "Test Connection". After a successful test, click "Create"

Now we have a Generative AI Service with a local model attached to your APEX instance

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/17b7ac67-c20f-49f9-9646-2ced23ca8e32.png align="center")
