Connecting Cloud n8n with Local Ollama – Complete Tutorial

an abstract image of a sphere with dots and lines

Introduction

This tutorial will guide you through connecting your cloud-hosted n8n instance with Ollama running locally on your PC. We’ll cover multiple methods, from quick testing solutions to more permanent setups.

What is Ollama?

Ollama is a free, open-source application that lets you run large language models (LLMs) locally on your own computer. Think of it as having ChatGPT running on your PC instead of in the cloud.

Prerequisites

  • n8n instance hosted in the cloud (e.g., n8n.cloud, self-hosted VPS)
  • Ollama installed and running on your local PC
  • Basic command line knowledge
  • Administrator access to your PC

Understanding the Problem

Your cloud n8n instance cannot directly access your local Ollama because:

  • Your local PC is behind a router/firewall
  • It doesn’t have a public IP address accessible from the internet
  • Cloud services can only connect to publicly accessible endpoints

Solution: Create a secure tunnel that exposes your local Ollama to the internet.


Method 1: Using ngrok (Best for Testing)

Why ngrok?

  • Quick setup (5 minutes)
  • Free tier available
  • Automatic HTTPS
  • Perfect for development and testing

Step 1: Install ngrok

  1. Visit ngrok.com and create a free account
  2. Download ngrok for your operating system
  3. Extract the executable to a folder (e.g., C:\ngrok)

Step 2: Configure ngrok

  1. Copy your authtoken from the ngrok dashboard
  2. Open Command Prompt or PowerShell and run: ngrok config add-authtoken YOUR_AUTH_TOKEN

Step 3: Start Ollama

  1. Make sure Ollama is running on your PC
  2. By default, Ollama runs on port 11434
  3. Test it locally by opening: http://localhost:11434

Step 4: Create the Tunnel

  1. Open a new terminal window
  2. Run: ngrok http 11434
  3. You’ll see output like: Forwarding https://abc123-456.ngrok.io -> http://localhost:11434
  4. Copy this URL – this is your public Ollama endpoint!

Step 5: Configure n8n

  1. Log into your n8n instance
  2. Create a new workflow
  3. Add an HTTP Request node
  4. Configure it:
    • Method: POST
    • URL: https://abc123-456.ngrok.io/api/generate
    • Authentication: None
    • Body: JSON
    • JSON Body: { "model": "llama2", "prompt": "Why is the sky blue?", "stream": false}
  5. Execute the node to test

Step 6: Parse the Response

  1. Add a Set node after the HTTP Request
  2. Extract the response:
    • Name: ollama_response
    • Value: {{ $json.response }}

Important Notes for ngrok

  • Free tier: Your URL changes every time you restart ngrok
  • Keep terminal open: The tunnel stays active only while ngrok is running
  • Paid tier: Get a permanent URL that doesn’t change

Method 2: Using Cloudflare Tunnel (Best for Permanent Setup)

Why Cloudflare Tunnel?

  • Free forever
  • More reliable than ngrok free tier
  • Can create named tunnels
  • Better for long-term projects

Step 1: Install Cloudflare Tunnel

Windows (using winget):

winget install --id Cloudflare.cloudflared

Windows (manual):

  1. Download from Cloudflare’s website
  2. Extract to a folder like C:\cloudflared
  3. Add to PATH or use full path in commands

Linux/Mac:

# Linux
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared-linux-amd64.deb

# Mac
brew install cloudflare/cloudflare/cloudflared

Step 2: Authenticate Cloudflare

  1. Run: cloudflared tunnel login
  2. Your browser will open – log in with your Cloudflare account
  3. Select a domain (or create one free at Cloudflare)
  4. Authorize the tunnel

Step 3: Quick Tunnel (Temporary)

For quick testing:

cloudflared tunnel --url http://localhost:11434

This gives you a temporary URL like: https://random-words.trycloudflare.com

Step 4: Named Tunnel (Permanent)

For a permanent setup:

  1. Create a tunnel: cloudflared tunnel create ollama-tunnel Note the tunnel ID that appears
  2. Create a config file (~/.cloudflared/config.yml or C:\Users\YourName\.cloudflared\config.yml): tunnel: TUNNEL_ID_HERE credentials-file: C:\Users\YourName\.cloudflared\TUNNEL_ID.json ingress: - hostname: ollama.yourdomain.com service: http://localhost:11434 - service: http_status:404
  3. Create DNS record: cloudflared tunnel route dns ollama-tunnel ollama.yourdomain.com
  4. Run the tunnel: cloudflared tunnel run ollama-tunnel
  5. Run as a service (optional, so it starts automatically): # Windows (PowerShell as Admin) cloudflared service install # Linux sudo cloudflared service install

Step 5: Use in n8n

Use your tunnel URL: https://ollama.yourdomain.com/api/generate


Method 3: Router Port Forwarding (Advanced)

Why Port Forwarding?

  • No third-party service needed
  • Full control
  • Best performance

When NOT to use this:

  • You don’t have a static IP
  • Your ISP blocks incoming connections
  • You’re not comfortable with network security

Steps:

  1. Find your local IP:
    • Windows: Run ipconfig in CMD
    • Look for “IPv4 Address” (e.g., 192.168.1.100)
  2. Access your router:
    • Usually 192.168.1.1 or 192.168.0.1
    • Log in with admin credentials
  3. Create port forwarding rule:
    • External Port: 11434
    • Internal IP: Your PC’s IP (e.g., 192.168.1.100)
    • Internal Port: 11434
    • Protocol: TCP
  4. Configure Windows Firewall: # Run as Administrator New-NetFirewallRule -DisplayName "Ollama" -Direction Inbound -LocalPort 11434 -Protocol TCP -Action Allow
  5. Set up Dynamic DNS (if no static IP):
    • Use services like DuckDNS, No-IP, or Dynu
    • Install their client on your PC
    • Get a free domain like yourname.duckdns.org
  6. Use in n8n:
    • URL: http://YOUR_PUBLIC_IP:11434/api/generate
    • Or: http://yourname.duckdns.org:11434/api/generate

Building a Complete n8n Workflow

Here’s a practical example workflow that uses your local Ollama:

Workflow: AI-Powered Email Responder

  1. Trigger Node: Manual Trigger or Webhook
  2. HTTP Request Node (Call Ollama):
    • Method: POST
    • URL: YOUR_TUNNEL_URL/api/generate
    • Body: { "model": "llama2", "prompt": "Write a professional email response to: {{ $json.email_content }}", "stream": false}
  3. Code Node (Parse Response): const response = $input.item.json.response; return [{ json: { ai_response: response } }];
  4. Send Email Node or Slack Node:
    • Use {{ $json.ai_response }} as the message

Security Best Practices

1. Add Basic Authentication

Wrap your Ollama endpoint with a reverse proxy (nginx, Caddy) that requires authentication.

2. Use HTTPS Only

  • ngrok: Provides HTTPS automatically
  • Cloudflare: HTTPS by default
  • Port forwarding: Set up Let’s Encrypt

3. IP Whitelisting

If your n8n instance has a static IP, configure your firewall to only accept connections from that IP.

4. Monitor Access

  • Check ngrok/Cloudflare dashboards for unusual traffic
  • Set up alerts for excessive requests

5. Use Environment Variables in n8n

Store your tunnel URL as an environment variable instead of hardcoding it:

  • URL: {{ $env.OLLAMA_URL }}/api/generate

Troubleshooting

“Connection Refused” Error

Check:

  1. Is Ollama running? Test: curl http://localhost:11434
  2. Is your tunnel active? Check the terminal window
  3. Is the URL correct in n8n?

“Timeout” Error

Solutions:

  1. Increase timeout in n8n HTTP Request settings
  2. Use smaller models or shorter prompts
  3. Check your internet connection speed

ngrok URL Changed

Solution:

  • Upgrade to ngrok paid plan for static URLs
  • Or switch to Cloudflare Tunnel (free permanent URLs)

Ollama Not Responding

Check:

  1. Restart Ollama service
  2. Check if port 11434 is already in use: # Windowsnetstat -ano | findstr :11434
  3. Check Ollama logs for errors

Firewall Blocking Connection

Windows:

# Allow Ollama through firewall
New-NetFirewallRule -DisplayName "Ollama" -Direction Inbound -Program "C:\Program Files\Ollama\ollama.exe" -Action Allow

Performance Tips

  1. Use "stream": false in your requests for easier n8n handling
  2. Keep models small for faster responses (e.g., llama2:7b instead of llama2:70b)
  3. Cache responses in n8n if you’re asking the same questions repeatedly
  4. Set appropriate timeouts – AI generation can take 30-60 seconds for longer responses

Cost Comparison

MethodFree TierPaid TierBest For
ngrokURL changes on restart$8/month for static URLTesting
CloudflareFree foreverFree (or paid plans available)Production
Port ForwardFreeFreeAdvanced users

Next Steps

  1. Test the connection with simple prompts
  2. Build a workflow that uses your local LLM
  3. Secure your setup using the security practices above
  4. Scale up by running multiple Ollama models
  5. Automate the tunnel startup using system services

Additional Resources


Conclusion

You now have multiple ways to connect your cloud n8n with local Ollama:

  • Quick testing: Use ngrok
  • Long-term projects: Use Cloudflare Tunnel
  • Maximum control: Use port forwarding

Start with ngrok to test everything works, then move to Cloudflare Tunnel for a permanent setup. Happy automating with local LLMs!

The Seven-Year Switch: Why I Returned to Windows

man in gray long sleeve shirt using Windows 11 computer

After seven years as a dedicated Ubuntu user, I switched back to Windows last week. Windows 11, to be precise. This is my story of the seven-year itch that made me turn to the dark side.
It started when I purchased a laptop. It also came with a licensed copy of Windows 11. The fact that I needed software that works only on Windows, with the Linux-based replacements not being up to par, is another story.
If you’re wondering why I experimented with Linux distros without the essential nerd skills, I’d say that is a legitimate question. Seven years ago, I needed to do some development work that required Docker, which, as you know, works seamlessly on Ubuntu. That, plus the need to send PGP-encrypted emails regularly, kept me on the open-source side of the world.
Navigating Windows’ screens, I had an epiphany. It struck me that in seven years of using Ubuntu, I never did anything truly “open-sourcey.” For example, I didn’t tweak the kernel or contribute a single line of code to their Git repositories. My only contribution was raising a bug, which I later closed, unsure if it was a bug, a feature, or just my old eyes playing tricks. All I did was, when in trouble, search online, zero in on a command, copy-paste it, and move on.
What struck me on my return to Windows was the sleek UI and charming fonts. Every piece of software I downloaded worked, and installation was just a matter of clicking a button. My one concern was whether my humble development work and the PGP emails would still work. Docker, Inc Desktop and Kleopatra (the software not the lady) helped resolve these issues.
This didn’t mean I had said goodbye to Linux altogether. Hidden in the shadows of WSL2 it helps me run Docker. I still have traces of my open-source infection. I find Thunderbird a better option compared to Outlook. Audacity is my first choice for an audio editor.
On the privacy front, I got a stark reminder of the world I was back in. Clicking “Solitaire and Casual Games” on the Start menu, I was greeted by a screen that asked if I wanted to resume the FreeCell game I last played on April 13, 2017!
That made me wonder what other dark secrets from my shady past lurked in Windows closed-source corridors. Inexplicably, my local ISP seems to block Microsoft-related sites! Privacy ISP style!
My take on this shift in OS is simple: use tools that suit your use case. Don’t overestimate your techy abilities or underestimate the time you have to complete tasks. Use a combination of tools that suits you and be more productive. Also, just because you have access to a plethora of tools and games do not lower your guard. Be careful what bits and pieces of information you share with the world. Your online safety is your responsibility and should be your first priority. Be safe and enjoy the ride on the technology express.

How to Set Up PGP Encryption on Outlook in Windows 11

A wooden block spelling the word encryption on a table

This guide will walk you through setting up PGP (Pretty Good Privacy) encryption for your Outlook email client on Windows 11. Whether you’re starting fresh or migrating from another email client like Thunderbird, this tutorial has you covered.

What You’ll Need

  • Outlook 2016, 2019, or Microsoft 365
  • Windows 11
  • Administrator access to install software
  • Your existing PGP keys (if migrating from another client)

Step 1: Install Gpg4win

Gpg4win is a free, open-source encryption suite that integrates PGP functionality into Outlook.

  1. Download Gpg4win from the official website: https://www.gpg4win.org/
  2. Run the installer (right-click and select “Run as administrator” if needed)
  3. During the installation, you’ll see a component selection screen
  4. Important: Make sure these components are checked:
    • GpgOL – This is the Outlook plugin (critical!)
    • Kleopatra – Certificate and key manager
    • GpgEX – Windows Explorer extension (optional but useful)
  5. Click Next and complete the installation
  6. Restart your computer to ensure all components load properly

Step 2: Set Up Your PGP Keys

If You’re Starting Fresh

  1. Open Kleopatra (search for it in the Start menu)
  2. Click File ? New OpenPGP Key Pair
  3. Enter your name and email address
  4. Click Create
  5. Set a strong passphrase when prompted (you’ll need this to decrypt messages)
  6. Click Finish

If You Have Existing Keys (e.g., from Thunderbird)

Export Keys from Thunderbird

  1. Open Thunderbird
  2. Go to Tools ? OpenPGP Key Manager
  3. Find your key in the list
  4. Right-click your key ? Export Keys to File
  5. Choose to export both public and secret keys
  6. Save the file (e.g., my-pgp-key.asc) to a location you’ll remember

Import Keys into Kleopatra

  1. Open Kleopatra
  2. Click File ? Import Certificates
  3. Navigate to your exported key file (.asc or .gpg file)
  4. Select the file and click Open
  5. Enter your passphrase if prompted
  6. You should see a confirmation that the keys were imported successfully

Step 3: Verify GpgOL is Installed in Outlook

  1. Open Outlook
  2. Look for a GpgOL tab in the ribbon at the top of the window
  3. If you see it, skip to Step 5

If You Don’t See the GpgOL Tab

Don’t worry – you might not have selected it during installation. Here’s how to add it:

  1. Go to Windows Settings ? Apps ? Installed apps
  2. Find Gpg4win in the list
  3. Click the three dots (?) next to it
  4. Select Modify
  5. The installer will open showing current components
  6. Make sure GpgOL is checked
  7. Click Next to install the component
  8. Restart Outlook

Alternative Check: Outlook Add-ins

  1. In Outlook, go to File ? Options ? Add-ins
  2. Look for “GpgOL” in the active add-ins list
  3. If it’s in “Disabled Items”, you’ll need to enable it:
    • At the bottom, change “Manage” dropdown to Disabled Items
    • Click Go
    • Select GpgOL and click Enable

Step 4: Configure GpgOL in Outlook

  1. Open Outlook and click the GpgOL tab
  2. Click Settings (or Options)
  3. In the settings window:
    • Select your default key for signing and encrypting emails
    • Choose whether to sign/encrypt by default (recommended to leave off and choose per email)
    • Configure any other preferences

Step 5: Send Your First Encrypted Email

Sending an Encrypted Message

  1. Click New Email in Outlook
  2. Compose your message as normal
  3. In the GpgOL tab at the top, you’ll see encryption options:
    • Click Encrypt to encrypt the message
    • Click Sign to digitally sign it (proves it’s from you)
    • You can do both for maximum security
  4. Add the recipient’s email address
  5. Important: You must have the recipient’s public key to encrypt to them
  6. Click Send

Receiving an Encrypted Message

  1. When you receive an encrypted email, GpgOL will automatically detect it
  2. You’ll be prompted to enter your passphrase
  3. After entering it, the message will decrypt and display normally

Step 6: Exchange Public Keys with Contacts

For someone to send you encrypted emails, they need your public key. For you to send to them, you need theirs.

Export Your Public Key

  1. Open Kleopatra
  2. Right-click your key
  3. Select Export Certificates
  4. Save the .asc file
  5. Send this file to your contacts (via email, chat, etc.)

Import a Contact’s Public Key

  1. Receive their public key file from them
  2. Open Kleopatra
  3. Click File ? Import Certificates
  4. Select their key file
  5. Verify the key fingerprint with them (optional but recommended for security)
  6. You can now send them encrypted emails

Troubleshooting Common Issues

GpgOL Tab Not Appearing

  • Ensure GpgOL is installed (see Step 3)
  • Check that the add-in isn’t disabled in Outlook
  • Try running Outlook as administrator once
  • Reinstall Gpg4win if necessary

“No Valid Key Found” Error

  • Make sure you’ve imported the recipient’s public key
  • Verify the email address matches exactly
  • Check that your key hasn’t expired in Kleopatra

Can’t Decrypt Received Messages

  • Verify you’re using the correct passphrase
  • Ensure the message was encrypted to your public key
  • Check that your private key is properly imported

Messages Showing as Plain Text

  • Some email servers strip encryption from messages
  • Make sure both you and the recipient are using compatible PGP implementations
  • Try sending a test message to yourself first

Security Best Practices

  1. Protect Your Passphrase: Never share it with anyone
  2. Backup Your Private Key: Store it securely offline
  3. Verify Key Fingerprints: When exchanging keys, verify fingerprints through a separate channel
  4. Set Key Expiration: Consider setting expiration dates on keys for better security
  5. Revoke Compromised Keys: If your key is compromised, generate and distribute a revocation certificate

Additional Resources

  • Gpg4win Documentation: https://www.gpg4win.org/documentation.html
  • GnuPG Manual: https://gnupg.org/documentation/
  • Email Security Best Practices: Search for “PGP email security guide”

Note: This guide uses Gpg4win, which implements the OpenPGP standard. Your encrypted emails will be compatible with other OpenPGP-compliant tools like Thunderbird, GPG Suite (Mac), and various mobile apps.

How to Remove BIOS Password on Acer Nitro 5

folded laptop

Overview

This tutorial will guide you through the process of unlocking and removing a forgotten BIOS password on your Acer Nitro 5 laptop.


Part 1: Unlocking the BIOS

Step 1: Obtain Your Unlock Key

When you attempt to enter BIOS and fail the password entry, your Acer Nitro 5 will display an unlock password key that looks like this:

Enter Unlock Password
Key: 1931050007

Write down this number exactly as shown – you’ll need it for the next step.

Step 2: Generate the Unlock Password

Use one of these trusted online BIOS password generator websites:

  • bios-pw.org (Recommended)
  • biosbug.com

Instructions:

  1. Visit one of the websites above
  2. Enter your unlock key (e.g., 1931050007)
  3. Click “Generate” or “Get Password”
  4. The website will provide one or more unlock passwords
  5. Write down all provided passwords

Step 3: Enter the Unlock Password

  1. Restart your laptop
  2. When prompted for the BIOS password, enter the generated unlock password
  3. Important: The password is case-sensitive, so enter it exactly as provided
  4. You typically have 3 attempts before temporary lockout

Part 2: Removing the BIOS Password Permanently

Once you’ve successfully unlocked the BIOS, follow these steps to permanently remove the password:

Step 1: Enter BIOS Setup

  1. Power on or restart your Acer Nitro 5
  2. Immediately press F2 repeatedly until the BIOS screen appears
  3. Enter your unlock password when prompted

Step 2: Navigate to Security Settings

  1. Use the Arrow Keys (? ? ? ?) to navigate the BIOS menu
  2. Go to the Security tab
  3. You should see options related to password settings

Step 3: Clear Supervisor Password

  1. Highlight “Set Supervisor Password” (or similar option)
  2. Press Enter
  3. When prompted, enter the current password (your unlock password)
  4. For “Enter New Password” – leave it BLANK and press Enter
  5. For “Confirm New Password” – leave it BLANK and press Enter
  6. You should see a confirmation message like “Password Uninstalled” or “Password Cleared”

Step 4: Clear Other Password Options

Check for and disable these additional password settings if present:

  • Set User Password – Follow the same steps as above to clear it
  • Set HDD Password – Clear if enabled
  • Password on Boot – Set to Disabled

Step 5: Save Changes and Exit

  1. Press F10 to save changes
  2. A confirmation dialog will appear: “Save configuration changes and exit?”
  3. Select Yes and press Enter
  4. Your laptop will restart

Part 3: Verification

After your laptop restarts:

  • It should boot directly to Windows without asking for a password
  • Try entering BIOS again (press F2 during boot) – you should enter without a password prompt
  • If successful, your BIOS password has been completely removed

Alternative Solutions

If the online password generators don’t work, try these alternatives:

Option 1: Contact Acer Support

  • Have your laptop’s serial number ready (found on the bottom of the laptop)
  • Provide proof of ownership (receipt, invoice, or purchase documentation)
  • Acer support can provide an official unlock code

Option 2: Professional Service

  • Visit an authorized Acer service center
  • Local computer repair shops can often reset BIOS passwords using hardware methods

Option 3: CMOS Battery Reset (Advanced)

Warning: This requires opening your laptop and may void warranty.

  1. Power off and unplug the laptop
  2. Remove the battery (if removable)
  3. Open the laptop case to access the motherboard
  4. Locate the CMOS battery (small coin cell battery)
  5. Remove the CMOS battery for 5-10 minutes
  6. Reinstall the battery and reassemble

Note: This method doesn’t always work on newer Acer models with protected BIOS.


Troubleshooting

Problem: Generated passwords don’t work

  • Double-check you entered the unlock key correctly
  • Try all passwords provided by the generator
  • Try a different password generator website
  • Ensure you’re entering passwords with correct capitalization

Problem: Can’t find Security tab in BIOS

  • Look for tabs named “Password” or “Authentication”
  • Check the Main tab for password options
  • Consult your laptop’s manual for specific BIOS layout

Problem: Password cleared but still prompts on boot

  • Make sure you disabled “Password on Boot” option
  • Check if HDD password is still enabled
  • Try clearing CMOS to reset all BIOS settings

Important Notes

  • Backup your data before attempting any BIOS changes
  • The unlock key is unique to your laptop and boot attempt
  • Never share your unlock key or passwords online
  • Keep a record of any new BIOS passwords you set
  • Some BIOS settings may reset to defaults after password removal

Prevention Tips

To avoid this situation in the future:

  1. Write down any BIOS passwords you set and store them securely
  2. Consider using a password manager for BIOS passwords
  3. If you don’t need a BIOS password for security, don’t set one
  4. Keep proof of purchase documentation for warranty support

Conclusion

Removing a BIOS password on an Acer Nitro 5 is straightforward once you have the unlock password. The online generators are reliable and work for most Acer laptops. If you encounter any issues, don’t hesitate to contact Acer support with your proof of ownership.

Good luck!