summarylogtreecommitdiffstats
path: root/ollama.service
blob: 3e87a0923abb8646daddb5183958789f6eaca68e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[Unit]
Description=Ollama Service
Wants=network-online.target
After=network.target network-online.target

[Service]
ExecStart=/usr/bin/ollama serve
WorkingDirectory=/var/lib/ollama
Environment='LD_LIBRARY_PATH=/usr/lib/ollama'
Environment='HOME=/var/lib/ollama'
#Environment='OLLAMA_HOST=http://127.0.0.1:11434'
Environment='OLLAMA_MODELS=/var/lib/ollama'
User=ollama
Group=ollama
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=1
Type=simple
PrivateTmp=yes
ProtectSystem=full
ProtectHome=yes

[Install]
WantedBy=multi-user.target