1. Run Ollama and pull a model
Install Ollama from ollama.com, then pull the models you want:2. Give it a public https address
Choose one of the two tunnels below. Both give you an https address and keep your server’s port closed.- ngrok
- Cloudflare Tunnel
- Install the ngrok agent and sign in.
-
Choose a long random token, for example from
openssl rand -hex 32. -
Save this policy as
ollama.yaml. It turns away any request without your token, and sets theHostheader that Ollama expects: -
Start the tunnel:
Authorization: Bearer <token>, which the policy checks. See ngrok’s Ollama guide for more options.3. Add it in Spojit
- Open Settings → AI providers and select Add provider.
- Choose Ollama and give it a name.
- Enter the tunnel’s address, for example
https://ollama.example.com. Spojit adds/v1itself. - Enter the key or the headers from step 2.
- Select Add provider. Spojit checks that it can list your models.
4. Add models
Add each model by its Ollama name with its tag, asollama list shows it, for example qwen3:32b.
Keep it running
- The computer running Ollama has to be on, with the tunnel running, whenever a workflow uses it. A step on a server that doesn’t answer fails with “Ollama didn’t answer”, with the name you gave the provider.
- Large models on modest hardware are slow, and steps that wait longer use more execution minutes. A model loads into memory on its first request, so the first step after a pause is the slowest. Ollama’s
OLLAMA_KEEP_ALIVEsetting keeps it loaded longer. - Requests from workflow steps can be long. Ollama’s default context window is small; raise it with
OLLAMA_CONTEXT_LENGTHfor agent steps that read a lot.