OllamaAPEXNetwork ACL
Ollama + APEX: give the network ACL to the right user
APEX_WEB_SERVICE calls go out as the APEX engine schema, not APEX_PUBLIC_USER, and the grant must run in the APEX PDB.
Running a local LLM with Ollama and calling it from Oracle APEX is easy, once the network ACL is right. Three things trip people up:
APEX_WEB_SERVICEcalls go out as the APEX engine schema (APEX_260100on APEX 26.1), notAPEX_PUBLIC_USER. GrantconnecttoAPEX_APPLICATION.g_flow_schema_owner.- Run the grant connected to the PDB where APEX lives. In
CDB$ROOTit fails withPLS-00201. - Ollama listens on 127.0.0.1 by default. If your database runs in Docker on Linux, add
host-gatewayand setOLLAMA_HOST=0.0.0.0, and never expose Ollama to the internet.
On APEX 26.1 and later you can also register Ollama as a built-in Generative AI Service. APEX 26.2 defaults new services to the Responses API, which needs Ollama v0.13.3 or later.
The full, step-by-step version is in the guide
Run a local LLM (Ollama) inside Oracle APEX
Read the guide →Get the Oracle + AI digest
One email when a new tested guide, template or APEX release note lands — English or Arabic. No spam; unsubscribe anytime.