Offline Setup Tutorial ๐Ÿ“– 8 min read โ€ข

How to Run Local AI Offline on Your Computer: Complete Ollama & Google Gemma 2 Setup Guide

Step-by-step guide to download and run AI models locally on macOS, Windows, and Linux using Ollama. Learn the exact commands for Google Gemma 2 2B, how to enable browser CORS access, and test your connection.

E

Everyday Used Apps Open-Source Labs

Mobile Editorial & App Research

โšก Points Clรฉs du Guide

This comprehensive guide outlines vetted mobile software for security, privacy, and everyday performance. Review the recommendations below to optimize your daily device workflows.

โšก Free In-Browser Tool Private In-Browser Coding

AI Code Explainer & Unit Test Maker

Generate unit tests and debug code with your local Ollama runner without sending proprietary algorithms to the cloud.

Launch AI Code Assistant โ†—

Imagine being on an airplane with no Wi-Fi, in a secure office building with strict data confidentiality policies, or at home with no internet connectionโ€”and still having a full artificial intelligence assistant ready to write code, polish resumes, summarize documents, and generate SQL queries.

With Ollama and modern open-weights models like Google Gemma 2 2B, running AI 100% locally and offline on your computer has never been easier.

In this beginner-friendly tutorial, we walk you step-by-step through installing Ollama on macOS, Windows, or Linux, downloading Google Gemma 2, and connecting it seamlessly to your browser with zero subscription fees.


Step 1: Download & Install Ollama

Ollama is a free, open-source utility that manages local AI models.

  1. Head to the official Ollama download page: ollama.com/download.
  2. Choose your operating system:
    • macOS: Download the .zip, unzip it, drag Ollama to your Applications folder, and launch it.
    • Windows: Download the installer (OllamaSetup.exe), run the setup wizard, and follow the prompts.
    • Linux: Run the one-line terminal installer:
      curl -fsSL https://ollama.com/install.sh | sh

Once installed, Ollama runs quietly in your system tray or background service.


Step 2: Download Google Gemma 2 2B (Lightweight & Fast)

Google released Gemma 2โ€”an open-weights family of models derived from the same research behind Gemini. The 2B (2-Billion parameter) model is exceptional because it delivers smart responses while occupying only ~1.6 GB of disk space and running smoothly on laptops with just 4GB to 8GB of RAM.

Open your Terminal (macOS/Linux) or PowerShell (Windows) and type:

ollama run gemma2:2b

Ollama will automatically download the model files and launch an interactive chat prompt directly inside your terminal. You can type hello to verify it works! Press Ctrl + D or type /bye to exit the terminal session.

Want an even lighter model? You can also run Metaโ€™s ultralight model:

ollama run llama3.2:1b

This model consumes just 1.3 GB of disk space and runs with blazing speed.


Step 3: Start Ollama with Browser CORS Permissions

Web browsers use security policies called CORS (Cross-Origin Resource Sharing). By default, browsers prevent web applications like Everyday Used Apps from sending requests to http://localhost:11434 unless Ollama explicitly allows it.

To allow your browser to communicate with Ollama, you must launch Ollama with the OLLAMA_ORIGINS environment variable set:

On macOS & Linux (Terminal):

OLLAMA_ORIGINS="*" ollama serve

On Windows (PowerShell):

$env:OLLAMA_ORIGINS="*"
ollama serve

Setting It Permanently (Optional):

If you donโ€™t want to type this command every time:

  • macOS: Add export OLLAMA_ORIGINS="*" to your ~/.zshrc or ~/.bash_profile.
  • Windows: Search for โ€œEnvironment Variablesโ€ in Start Menu > System Properties > Add User Variable OLLAMA_ORIGINS with value *.

Step 4: Connect Ollama to Everyday Used Apps

Now that Ollama is serving on port 11434, connecting it to our web tools takes just two clicks:

  1. Open any AI tool on Everyday Used Apps (e.g., AI Code Assistant or AI Document Q&A).
  2. Click the โ€œEnable AIโ€ pill button in the top navigation header.
  3. Switch to the Google Gemma 2 & Local tab in the vault dialog.
  4. Verify the Local Endpoint is set to http://localhost:11434.
  5. Select Google Gemma 2 2B (Safe โ€ข Low RAM) from the model dropdown.
  6. Click Test Connection to confirm latency (usually 5ms to 15ms).
  7. Click Save & Enable AI.

Thatโ€™s it! Your browser tools are now powered entirely by the AI running on your computer.


Step 5: Test Air-Gapped Offline Operation

To verify that your AI is truly offline and private:

  1. Disconnect your computer from Wi-Fi or unplug your Ethernet cable.
  2. Go back to your browser tab with Everyday Used Apps.
  3. Paste a block of Python code, SQL query, or email draft into any AI tool.
  4. Click Generate or Analyze.
  5. Watch the response stream back in real-timeโ€”with zero internet connection!

Preventing Laptops from Freezing: The 3 Rules

Running local AI is empowering, but follow these 3 best practices to maintain a smooth system:

  1. Donโ€™t Run Models Larger than Your RAM:
    • 8GB RAM Laptop: Stick to Gemma 2 2B or Llama 3.2 1B.
    • 16GB RAM PC: You can safely run Gemma 2 9B or Llama 3.1 8B.
    • Avoid 70B models locally unless you possess multiple dedicated high-end GPUs.
  2. Close Heavy Applications: Before running complex local reasoning, close video editors, high-memory IDEs, and 50+ background browser tabs.
  3. Use Built-In Watchdogs: Everyday Used Apps includes a 45-second auto-watchdog that cancels tasks if your hardware hangs, ensuring your browser remains responsive.

Enjoy total data sovereignty, zero subscription bills, and private artificial intelligence!

โ“

Frequently Asked Questions

What is Ollama and is it safe to download? โ–ผ

Ollama is a popular, open-source tool designed to download, package, and execute open-weights artificial intelligence models locally on your computer. It is completely free, open-source, and does not require an internet connection once models are downloaded.

Why is Google Gemma 2 2B recommended for normal laptops? โ–ผ

Google Gemma 2 2B delivers high reasoning and language comprehension while occupying only about 1.6GB of disk space and requiring less than 3GB of RAM. This makes it smooth and responsive on ordinary 8GB laptops without overheating or freezing your system.

Why do I need to set OLLAMA_ORIGINS='*' when running Ollama for web tools? โ–ผ

Modern web browsers enforce Cross-Origin Resource Sharing (CORS) security rules to protect you. By default, Ollama blocks requests originating from web browsers. Setting OLLAMA_ORIGINS='*' grants your browser permission to send local prompts to your Ollama runner.

Can I use LM Studio instead of Ollama? โ–ผ

Yes! LM Studio is another excellent desktop app with a graphical user interface. You can load Gemma 2 or Llama 3.2 in LM Studio, start the Local Server, and connect it to Everyday Used Apps at http://localhost:1234.

โœจ Was this guide helpful? Drop a quick reaction

No sign-in needed. Your one-tap feedback helps our editors curate better software guides.

Related Topics: #Ollama #Gemma 2 #Local AI #Offline AI #Open-Source LLM #Developer Tools
โ† Browse All Guides

Looking for more verified mobile applications?

Browse our curated catalog of 250+ mobile apps across Productivity, Utilities, Games, Fun, and Security.

Explore Apps Directory โ†’

Guides Connexes

Continue reading our expert tech analyses and curated mobile rankings.

Voir tous les articles โ†—
AI Cost & Tokens ๐Ÿ“– 9 min read

AI Tokens Explained: How AI Cost, Pricing & Token Usage Actually Work (BYOK vs $20/mo Subscriptions) โ†—

Demystify AI tokens, context windows, and API pricing. Learn how input vs output tokens are billed, why Bring Your Own Key (BYOK) saves 95%+ over $20/mo subscriptions, and how to use Google Gemini free tier.

#AI Tokens #AI Pricing #BYOK #Gemini API #AI Cost Optimization
Lire le Guide โ†’
E
Everyday Used Apps AI & Economics Desk
High Risk Alert ๐Ÿ“– 7 min read

Android Accessibility Permission: What It Is and Why Malicious Apps Want It โ†—

Accessibility is the most powerful permission on Android. Learn what it does legitimately, how scam apps use it to spy on your screen and read passwords, and how to turn it off.

#Android Security #Accessibility #Malware Defense #Mobile Privacy
Lire le Guide โ†’
E
Everyday Used Apps Security Team