Auto-tagging ollama setup
-
I used the command
ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'to get the address and used it to replace the value tohttp://###.##.##.###:11434. It gives me the same error as before:ECONNREFUSEDI think the relevant log is this:
Apr 02 16:38:04 [1] _currentUrl: 'http://###.##.##.###:11434/api/generate', Apr 02 16:38:04 [1] [Symbol(shapeMode)]: true, Apr 02 16:38:04 [1] [Symbol(kCapture)]: false Apr 02 16:38:04 [1] }, Apr 02 16:38:04 [1] cause: Error: connect ECONNREFUSED ###.##.##.###:11434 Apr 02 16:38:04 [1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16) Apr 02 16:38:04 [1] at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) { Apr 02 16:38:04 [1] errno: -111, Apr 02 16:38:04 [1] code: 'ECONNREFUSED', Apr 02 16:38:04 [1] syscall: 'connect', Apr 02 16:38:04 [1] address: '###.##.##.###', Apr 02 16:38:04 [1] port: 11434 Apr 02 16:38:04 [1] } Apr 02 16:38:04 [1] } Apr 02 16:38:07 [1] AxiosError: Request failed with status code 520 Apr 02 16:38:07 [1] at settle (/app/code/node_modules/axios/lib/core/settle.js:19:12) Apr 02 16:38:07 [1] at IncomingMessage.handleStreamEnd (/app/code/node_modules/axios/lib/adapters/http.js:572:11) Apr 02 16:38:07 [1] at IncomingMessage.emit (node:events:530:35) Apr 02 16:38:07 [1] at IncomingMessage.emit (node:domain:489:12) Apr 02 16:38:07 [1] at endReadableNT (node:internal/streams/readable:1698:12) Apr 02 16:38:07 [1] at processTicksAndRejections (node:internal/process/task_queues:90:21) { Apr 02 16:38:07 [1] code: 'ERR_BAD_RESPONSE', -
I used the command
ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'to get the address and used it to replace the value tohttp://###.##.##.###:11434. It gives me the same error as before:ECONNREFUSEDI think the relevant log is this:
Apr 02 16:38:04 [1] _currentUrl: 'http://###.##.##.###:11434/api/generate', Apr 02 16:38:04 [1] [Symbol(shapeMode)]: true, Apr 02 16:38:04 [1] [Symbol(kCapture)]: false Apr 02 16:38:04 [1] }, Apr 02 16:38:04 [1] cause: Error: connect ECONNREFUSED ###.##.##.###:11434 Apr 02 16:38:04 [1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16) Apr 02 16:38:04 [1] at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) { Apr 02 16:38:04 [1] errno: -111, Apr 02 16:38:04 [1] code: 'ECONNREFUSED', Apr 02 16:38:04 [1] syscall: 'connect', Apr 02 16:38:04 [1] address: '###.##.##.###', Apr 02 16:38:04 [1] port: 11434 Apr 02 16:38:04 [1] } Apr 02 16:38:04 [1] } Apr 02 16:38:07 [1] AxiosError: Request failed with status code 520 Apr 02 16:38:07 [1] at settle (/app/code/node_modules/axios/lib/core/settle.js:19:12) Apr 02 16:38:07 [1] at IncomingMessage.handleStreamEnd (/app/code/node_modules/axios/lib/adapters/http.js:572:11) Apr 02 16:38:07 [1] at IncomingMessage.emit (node:events:530:35) Apr 02 16:38:07 [1] at IncomingMessage.emit (node:domain:489:12) Apr 02 16:38:07 [1] at endReadableNT (node:internal/streams/readable:1698:12) Apr 02 16:38:07 [1] at processTicksAndRejections (node:internal/process/task_queues:90:21) { Apr 02 16:38:07 [1] code: 'ERR_BAD_RESPONSE', -
I used the command
ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'to get the address and used it to replace the value tohttp://###.##.##.###:11434. It gives me the same error as before:ECONNREFUSEDI think the relevant log is this:
Apr 02 16:38:04 [1] _currentUrl: 'http://###.##.##.###:11434/api/generate', Apr 02 16:38:04 [1] [Symbol(shapeMode)]: true, Apr 02 16:38:04 [1] [Symbol(kCapture)]: false Apr 02 16:38:04 [1] }, Apr 02 16:38:04 [1] cause: Error: connect ECONNREFUSED ###.##.##.###:11434 Apr 02 16:38:04 [1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16) Apr 02 16:38:04 [1] at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) { Apr 02 16:38:04 [1] errno: -111, Apr 02 16:38:04 [1] code: 'ECONNREFUSED', Apr 02 16:38:04 [1] syscall: 'connect', Apr 02 16:38:04 [1] address: '###.##.##.###', Apr 02 16:38:04 [1] port: 11434 Apr 02 16:38:04 [1] } Apr 02 16:38:04 [1] } Apr 02 16:38:07 [1] AxiosError: Request failed with status code 520 Apr 02 16:38:07 [1] at settle (/app/code/node_modules/axios/lib/core/settle.js:19:12) Apr 02 16:38:07 [1] at IncomingMessage.handleStreamEnd (/app/code/node_modules/axios/lib/adapters/http.js:572:11) Apr 02 16:38:07 [1] at IncomingMessage.emit (node:events:530:35) Apr 02 16:38:07 [1] at IncomingMessage.emit (node:domain:489:12) Apr 02 16:38:07 [1] at endReadableNT (node:internal/streams/readable:1698:12) Apr 02 16:38:07 [1] at processTicksAndRejections (node:internal/process/task_queues:90:21) { Apr 02 16:38:07 [1] code: 'ERR_BAD_RESPONSE',@mononym should be something like
172.18.16.199(that‘s the IP from my Linkwarden container) -
J james marked this topic as a regular topic on
-
Should we bake in llama into the app package as an optional component? For the moment, if you have an external llama, you can set that variable in linkwarden to point to the external llama.
Hi @girish
Just wondering if including a tiny LLM into the package is still on the table. Hoarding links gets quickly out of proportion and the search function of Linkwarden is not the best (in my case). Auto-tagging would be very helpful to find links saved ages ago.
-
@mononym I have made a task to make ollama a standalone app. This way other apps can benefit too (and maybe we can remove it from packages like openwebui).
@girish thanks for packaging Ollama ! I can confirm that it works for auto-tagging

- From the Ollama app terminal, get the IP with
ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' - Add the IP to the variable
NEXT_PUBLIC_OLLAMA_ENDPOINT_URL+:11434in the Linwarden env file. Ex.http://172.18.16.199:11434 - Follow Ollama docs to pull a model and the follow Linkwarden docs https://docs.linkwarden.app/self-hosting/ai-worker and https://docs.linkwarden.app/Usage/ai-tagging to enable the feature.
- From the Ollama app terminal, get the IP with
-
@girish thanks for packaging Ollama ! I can confirm that it works for auto-tagging

- From the Ollama app terminal, get the IP with
ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' - Add the IP to the variable
NEXT_PUBLIC_OLLAMA_ENDPOINT_URL+:11434in the Linwarden env file. Ex.http://172.18.16.199:11434 - Follow Ollama docs to pull a model and the follow Linkwarden docs https://docs.linkwarden.app/self-hosting/ai-worker and https://docs.linkwarden.app/Usage/ai-tagging to enable the feature.
- From the Ollama app terminal, get the IP with
-
@mononym Can you not use the public endpoint
https://ollama.domain.cominstead of using the internal one ?@girish Maybe if there's a way to pass the bearer token. But I did not find a way to do so. When setting
NEXT_PUBLIC_OLLAMA_ENDPOINTtohttp://ollama-api.domain.comI get the answerNov 03 18:17:40 [1] responseBody: '<html>\r\n' + Nov 03 18:17:40 [1] '<head><title>401 Authorization Required</title></head>\r\n' + Nov 03 18:17:40 [1] '<body>\r\n' + Nov 03 18:17:40 [1] '<center><h1>401 Authorization Required</h1></center>\r\n' + Nov 03 18:17:40 [1] '<hr><center>nginx/1.24.0 (Ubuntu)</center>\r\n' + Nov 03 18:17:40 [1] '</body>\r\n' + Nov 03 18:17:40 [1] '</html>\r\n', -
Edit: I tried to get this working and at least got to the point where I linkwarden would talk to ollama using the token, when using the openai configuration as mentioned in https://docs.linkwarden.app/self-hosting/ai-worker#openai-compatible-provider
However while it will be able to authenticate, I wasn't able to get passed the point where it manages to select a model which has "tool" capabilities.
