Skip to content
/ ollana Public

Ollama over LAN - Auto-discover your Ollama server on your local network with hassle-free ease.

License

Notifications You must be signed in to change notification settings

grouzen/ollana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ollana (Ollama Over LAN)

Auto-discover your Ollama server on your local network with hassle-free ease.

Use your home or office Ollama server from any device on the same network without changing settings in your client applications or setting up a reverse proxy.

Table of Contents

🤔 Why

  • No need to specify the IP address of an Ollama server - Automatically discovers Ollama servers on your local network using UDP broadcast.
  • No need to modify your client application configuration - Connect to a remote Ollama instance as if it were running locally.
  • Secure the network traffic via TLS - Network traffic is secured using TLS, employing self-signed X.509 certificates.
  • Simple AuthZ and AuthN - Unauthorized access is prevented through explicit bi-directional device management.

Installation

📀 Binaries

The pre-compiled binaries for Linux and MacOS are available for download on the Releases page

📦 crates.io

You can install latest ollana from crates.io

cargo install ollana --locked

📝 From source

Requires Rust (Edition 2021).

git clone https://github.com/grouzen/ollana.git
cd ollana
cargo build --release
# or via cargo install
cargo install --path .

🐧 Linux distros

Gentoo linux

It is available via lamdness overlay

sudo eselect repository enable lamdness
sudo emaint -r lamdness sync
sudo emerge -av app-misc/ollana

👨 Usage

Allow devices

First thing you need to do before running a proxy is to set up authorization between your Ollana server and client. This process requires approving the unique Device IDs for both the server and client on each end.

For this, you need to get the Device IDs of both server and client by running the following command on each machine:

$ ollana device show
# SHA-256 hash of the X.509 certificate that's automatically generated upon running any ollana command (including this one)
Device ID: b596c4e40002ec65f12edbe0adc116739dd52f62e7ed2a691230cd62c16aa4dc 

You need to copy the Device IDs and allow them on both sides by running:

$ ollana device allow b596c4e40002ec65f12edbe0adc116739dd52f62e7ed2a691230cd62c16aa4dc
Added Device ID: b596c4e40002ec65f12edbe0adc116739dd52f62e7ed2a691230cd62c16aa4dc

Device management

Surprisingly you can also see the allowed Device IDs:

$ ollana device list
Allowed Device IDs:
b596c4e40002ec65f12edbe0adc116739dd52f62e7ed2a691230cd62c16aa4dc

And disable them as well:

$ ollana device disable b596c4e40002ec65f12edbe0adc116739dd52f62e7ed2a691230cd62c16aa4dc
Removed Device ID: b596c4e40002ec65f12edbe0adc116739dd52f62e7ed2a691230cd62c16aa4dc

Serve

Now you can run a proxy. It automatically detects the mode (client or server) to run in by checking whether an Ollama server is running on your machine.

$ ollana serve

It also support an old-style SysV daemon mode to run in a background:

$ ollana serve -d

Run as a system service

It is recommended to run it as a background process. This repository doesn't contain scripts for any particular start up system.

You can find a SystemD and OpenRC scripts in my Gentoo overlay: https://github.com/grouzen/lamdness-overlay/tree/main/app-misc/ollana/files.

For example, here is the Systemd unit:

[Unit]
Description=Ollana Service
After=network-online.target

[Service]
EnvironmentFile=-/etc/conf.d/ollana
ExecStart=/usr/bin/ollana serve $OLLANA_OPTS
User=ollana
Group=ollana
Restart=always
RestartSec=3

[Install]
WantedBy=default.target

📝 Architecture

Architecture Overview

See also architecture-overview.md for more details.

🤝 Contributing

Auto-reloading development server (see: https://actix.rs/docs/autoreload)

watchexec -e rs -r cargo run

Debugging

You can debug the application by setting the RUST_LOG environment variable to the desired level of verbosity. For example, to enable debug level:

RUST_LOG=debug ollana serve

🧑‍⚖️ License

MIT License

Copyright (c) 2025 Mykhailo Nedokushev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

See LICENSE file.