What Ollama is and why you run it locally
Ollama is software that runs large language models (the AI systems behind tools like ChatGPT) directly on your own computer instead of sending your data to a cloud service. When you install Ollama, it creates a local server on your machine that other programs can connect to and use. This keeps your information private, costs nothing per query, and works without an internet connection once the model is downloaded.
Running Ollama locally means your GPU or CPU does the work instead of a distant data center. The trade-off is that your machine has to be powerful enough to handle it — a model that runs smoothly on a computer with 16 GB of RAM and a dedicated graphics card might crawl on a laptop with 8 GB and integrated graphics. But if your hardware can manage it, connecting local applications to Ollama gives you a private, offline AI setup.
Key Takeaways
- Ollama runs a local server on your computer at a default address (usually 127.0.0.1:11434) that other programs connect to over your network or localhost.
- You need Ollama installed and running first, then you point another process — like a text editor plugin, a chatbot interface, or a development tool — to that server address.
- Most applications connect by entering the Ollama server URL in their settings, though some require you to set an environment variable or edit a configuration file.
- If a program cannot find Ollama, check that Ollama is actually running, that the address and port number are correct, and that your firewall is not blocking the connection.
Installing and starting Ollama on your machine
read Ollama from ollama.ai and install it for your operating system (Windows, macOS, or Linux). The installation is straightforward — run the installer and follow the prompts. Once installed, open Ollama from your Applications menu or start it from the command line.
When Ollama starts, it runs silently in the background and listens for connections on your local machine at the address 127.0.0.1:11434 (or localhost:11434 — they mean the same thing). You do not need to do anything else to start the server; just having Ollama running is enough. If you want to verify it is working, open a terminal or command prompt and type curl http://localhost:11434 — if Ollama is running, you will see a response. If nothing happens or you get an error, Ollama is not running or is listening on a different port.
Connecting applications through the Ollama URL
Most programs that work with Ollama ask you to enter the server address in their settings. Look for a field labeled "API endpoint", "Ollama URL", "Local server", or "Model server". Enter http://localhost:11434 (or http://127.0.0.1:11434 — both work). Some applications may ask for just the base address without the port, in which case enter http://localhost.
The exact steps depend on the process. In a text editor with an AI plugin, the setting might be under Preferences or Extensions. In a standalone chatbot interface, it might be in Settings or Configuration. In a development tool, it might be under API settings or Model settings. Check the process's documentation for where to find the server URL field — most modern tools that support local models have this setting somewhere obvious.
Once you enter the address and save, the process should connect to Ollama automatically. If it does not, move to the troubleshooting section below.
Using environment variables for applications that require them
Some applications, particularly command-line tools and development frameworks, do not have a settings menu. Instead, they read the Ollama server address from an environment variable — a system-wide setting that programs can access when they start.
On macOS or Linux, open a terminal and type the following command, then press Enter:
export OLLAMA_HOST=http://localhost:11434
On Windows, open Command Prompt and type:
set OLLAMA_HOST=http://localhost:11434
After you set the variable, launch the process from the same terminal window. The process will read the variable and connect to Ollama automatically. If you close the terminal, the variable disappears — you will need to set it again the next time you want to use that process. To make the setting permanent, you can add it to your system's startup files (on macOS or Linux, this is usually your .bashrc or .zshrc file; on Windows, you can set environment variables through System Properties).
Connecting from other computers on your network
By default, Ollama only accepts connections from your own machine (localhost). If you want another computer on your network to use your Ollama server, you need to change the listening address.
On macOS or Linux, set the environment variable before starting Ollama:
export OLLAMA_HOST=0.0.0.0:11434
Then start Ollama. On Windows, set the variable in Command Prompt before launching Ollama, or add it to your system environment variables permanently.
Once Ollama is listening on all network interfaces, find your computer's local IP address. On macOS or Linux, open a terminal and type ifconfig or hostname -I. On Windows, open Command Prompt and type ipconfig. Look for an address that starts with 192.168 or 10.0 — that is your local IP. From another computer on the same network, connect to http://[your-ip]:11434 (replace [your-ip] with the actual address). This is useful if you have a powerful desktop and want a laptop or other device to use its models, but it does expose your server to anyone on your network, so only do this if you trust the other devices.
Troubleshooting connection problems
If an process cannot connect to Ollama, work through these checks in order. First, verify that Ollama is actually running — look for it in your Applications menu, taskbar, or system tray. If it is not running, start it and wait a few seconds for the server to initialize. Second, confirm the address and port are correct in the process's settings. The most common mistake is entering localhost without the port number (11434) or using http://localhost:11434/api when the process expects just http://localhost:11434. Check the process's documentation to see the exact format it expects.
Third, check your firewall. On Windows, open Windows Defender Firewall and click "Allow an app through firewall". Look for Ollama in the list and make sure it is checked for both Private and Public networks. On macOS, go to System Preferences > Security & Privacy > Firewall Options and add Ollama to the allowed apps. On Linux, if you use a firewall like ufw, allow port 11434 with the command sudo ufw allow 11434. Fourth, restart both Ollama and the process — sometimes a stale connection prevents the handshake from completing. If none of these steps work, check the process's error logs or documentation; some tools have their own quirks about how they connect to local servers.
Frequently Asked Questions
Can I run multiple applications connected to Ollama at the same time?
Yes. Ollama can handle multiple connections simultaneously, though each one will compete for your computer's resources. If you run two heavy applications at once, your system will slow down noticeably. It is better to use one process at a time, or use lighter applications that do not require constant processing.
What if Ollama is running but the process says the server is not responding?
Check that you are using the exact address the process expects — some want http://localhost:11434, others want localhost:11434 without the http://, and a few want just localhost. Restart Ollama and wait 10 seconds before trying again. If your firewall recently changed, it may be blocking the connection even though Ollama is running.
Does connecting to local Ollama use less power than cloud AI services?
It uses more power on your computer, but no internet bandwidth. Your GPU or CPU will work harder, which means higher electricity use and more heat. If your goal is to reduce power consumption, cloud services are usually more efficient because they spread the load across many users. Local Ollama is better for privacy and offline use.
Can I change the port number if 11434 is already in use?
Yes. Set the environment variable OLLAMA_HOST=localhost:9999 (replace 9999 with any unused port number) before starting Ollama, then connect applications to that port instead. On Windows, you can also change the port in Ollama's settings if the process provides a GUI for it.
What happens to my connection if I close Ollama?
Any process connected to Ollama will lose the connection when ready and show an error. You will need to restart Ollama and reconnect. Some applications will automatically reconnect when Ollama comes back online; others require you to manually restart them.