<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gaetan Faverge</title>
    <description>The latest articles on DEV Community by Gaetan Faverge (@gaetan_faverge_7350777e07).</description>
    <link>https://dev.to/gaetan_faverge_7350777e07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4098776%2F9baf1c32-092e-4fe8-8d3f-529821aa07e8.jpg</url>
      <title>DEV Community: Gaetan Faverge</title>
      <link>https://dev.to/gaetan_faverge_7350777e07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gaetan_faverge_7350777e07"/>
    <language>en</language>
    <item>
      <title>How I Got Ollama Running on My AMD Radeon RX 9060 XT Using WSL and ROCm</title>
      <dc:creator>Gaetan Faverge</dc:creator>
      <pubDate>Fri, 28 Aug 2026 12:22:44 +0000</pubDate>
      <link>https://dev.to/gaetan_faverge_7350777e07/how-i-got-ollama-running-on-my-amd-radeon-rx-9060-xt-using-wsl-and-rocm-2ki5</link>
      <guid>https://dev.to/gaetan_faverge_7350777e07/how-i-got-ollama-running-on-my-amd-radeon-rx-9060-xt-using-wsl-and-rocm-2ki5</guid>
      <description>&lt;p&gt;I wanted to start experimenting with AI for a while.&lt;/p&gt;

&lt;p&gt;At work, I didn't really have enough time to properly explore this new ecosystem and understand how these tools could be used. But I had another resource available: my personal hardware.&lt;/p&gt;

&lt;p&gt;I'm a gamer, so I have a reasonably powerful desktop PC. I'm also a developer, with a laptop running Ubuntu and a NAS.&lt;/p&gt;

&lt;p&gt;That made me wonder:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can I use my gaming PC to run AI models locally?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The answer is &lt;strong&gt;yes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This article is a small walkthrough of my experience setting up a local AI environment using an &lt;strong&gt;AMD Radeon GPU&lt;/strong&gt;, &lt;strong&gt;Windows&lt;/strong&gt;, &lt;strong&gt;WSL&lt;/strong&gt;, &lt;strong&gt;ROCm&lt;/strong&gt;, and &lt;strong&gt;Ollama&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My hardware is (yes, I'm Team Red):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AMD Ryzen 7 5700X&lt;/li&gt;
&lt;li&gt;32 GB RAM&lt;/li&gt;
&lt;li&gt;AMD Radeon RX 9060 XT with 16 GB VRAM&lt;/li&gt;
&lt;li&gt;Ubuntu 26.04 running under WSL&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Installing WSL and Ubuntu
&lt;/h1&gt;

&lt;p&gt;The first step is to make sure that WSL is installed and up to date.&lt;/p&gt;

&lt;p&gt;The general process is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check your current WSL version.&lt;/li&gt;
&lt;li&gt;Update WSL.&lt;/li&gt;
&lt;li&gt;Install Ubuntu.&lt;/li&gt;
&lt;li&gt;Create your user account.&lt;/li&gt;
&lt;li&gt;Update the Ubuntu installation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  WSL
&lt;/h2&gt;

&lt;p&gt;From PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check the current version of WSL&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-v&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Update WSL&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--update&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Install Ubuntu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ubuntu&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Start Ubuntu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ubuntu&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Stop Ubuntu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--terminate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ubuntu&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Remove the Ubuntu distribution&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--unregister&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ubuntu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Ubuntu
&lt;/h2&gt;

&lt;p&gt;Once Ubuntu is installed, update the system and install &lt;code&gt;zstd&lt;/code&gt;.&lt;br&gt;
We will need it later to extract Ollama.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt autoclean
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt autoremove

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;zstd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Installing Ollama with ROCm support
&lt;/h1&gt;

&lt;p&gt;Ollama is the foundation of this setup.&lt;br&gt;
It allows us to download and run AI models locally while providing different compute backends, including CPU, CUDA, and ROCm.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;One thing that wasn't immediately obvious to me was that Ollama provides a specific ROCm backend.&lt;br&gt;
The installation is split into two parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Ollama.&lt;/li&gt;
&lt;li&gt;Install the ROCm backend.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install Ollama&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ollama.com/download/ollama-linux-amd64.tar.zst &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;--zstd&lt;/span&gt; &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="nt"&gt;-C&lt;/span&gt; /usr

&lt;span class="c"&gt;# Install the ROCm backend&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ollama.com/download/ollama-linux-amd64-rocm.tar.zst &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;--zstd&lt;/span&gt; &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="nt"&gt;-C&lt;/span&gt; /usr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then create the Ollama user and add your current user to the Ollama group:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create the Ollama user and group&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;useradd &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /bin/false &lt;span class="nt"&gt;-U&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; /usr/share/ollama ollama

&lt;span class="c"&gt;# Add the current user to the Ollama group&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nt"&gt;-G&lt;/span&gt; ollama &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;whoami&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The official documentation I used:&lt;br&gt;
&lt;a href="https://docs.ollama.com/linux#manual-install" rel="noopener noreferrer"&gt;https://docs.ollama.com/linux#manual-install&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.ollama.com/linux#amd-gpu-install" rel="noopener noreferrer"&gt;https://docs.ollama.com/linux#amd-gpu-install&lt;/a&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  Running Ollama as a service
&lt;/h1&gt;

&lt;p&gt;I chose to run Ollama as a systemd service.&lt;/p&gt;

&lt;p&gt;Create or edit the service configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/systemd/system/ollama.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Unit]&lt;/span&gt;
&lt;span class="py"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Ollama Service&lt;/span&gt;
&lt;span class="py"&gt;After&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network-online.target&lt;/span&gt;

&lt;span class="nn"&gt;[Service]&lt;/span&gt;
&lt;span class="py"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/local/bin/ollama serve&lt;/span&gt;
&lt;span class="py"&gt;User&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;ollama&lt;/span&gt;
&lt;span class="py"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;ollama&lt;/span&gt;
&lt;span class="py"&gt;Restart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;always&lt;/span&gt;
&lt;span class="py"&gt;RestartSec&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;3&lt;/span&gt;
&lt;span class="py"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"PATH=$PATH"&lt;/span&gt;
&lt;span class="c"&gt;# Required to detect the GPU through DXG
&lt;/span&gt;&lt;span class="py"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"HSA_ENABLE_DXG_DETECTION=1"&lt;/span&gt;
&lt;span class="c"&gt;# Optional: expose Ollama outside of WSL
&lt;/span&gt;&lt;span class="py"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"OLLAMA_HOST=0.0.0.0:11434"&lt;/span&gt;

&lt;span class="nn"&gt;[Install]&lt;/span&gt;
&lt;span class="py"&gt;WantedBy&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;default.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then reload systemd and start the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;ollama
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start ollama.service

&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status ollama.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More information about running Ollama as a service:&lt;br&gt;
&lt;a href="https://docs.ollama.com/linux#adding-ollama-as-a-startup-service-recommended" rel="noopener noreferrer"&gt;https://docs.ollama.com/linux#adding-ollama-as-a-startup-service-recommended&lt;/a&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  Installing DXG support
&lt;/h1&gt;

&lt;p&gt;The GPU needs to be exposed to the WSL environment.&lt;br&gt;
For my setup, I used &lt;code&gt;librocdxg&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One important detail: version &lt;strong&gt;1.2.2&lt;/strong&gt; solved an issue I encountered with version &lt;strong&gt;1.2.0&lt;/strong&gt;.&lt;br&gt;
So, if you're having issues with GPU detection, the version may matter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://github.com/ROCm/librocdxg/releases/download/v1.2.2/rocdxg-roct_1.2.2_amd64.deb

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; ./rocdxg-roct_1.2.2_amd64.deb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More information about the project:&lt;br&gt;
&lt;a href="https://github.com/ROCm/librocdxg" rel="noopener noreferrer"&gt;https://github.com/ROCm/librocdxg&lt;/a&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  Checking that Ollama is using the GPU
&lt;/h1&gt;

&lt;p&gt;At this point, everything should be configured.&lt;/p&gt;

&lt;p&gt;Restart Ollama:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart ollama.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the Ollama logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; ollama &lt;span class="nt"&gt;--no-pager&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nb"&gt;cat&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"inference compute"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see something similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;library=ROCm compute=gfxXXXX description="[NAME_OF_YOUR_GPU]"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;library=ROCm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't want Ollama to silently fall back to CPU inference.&lt;/p&gt;

&lt;p&gt;In my case, I get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time=2026-08-28T12:38:20.900+02:00 level=INFO source=types.go:32 msg="inference compute" id=0 filter_id=0 library=ROCm compute=gfx1200 name=ROCm0 description="AMD Radeon RX 9060 XT" libdirs=ollama,rocm_v7_2 driver=0.0 pci_id=0000:2b:00.0 type=discrete total="15.9 GiB" available="14.2 GiB"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, Ollama detects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ROCm backend.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gfx1200&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The AMD Radeon RX 9060 XT.&lt;/li&gt;
&lt;li&gt;Approximately 16 GB of VRAM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AMD provides a compatibility matrix to identify which &lt;code&gt;gfx&lt;/code&gt; version corresponds to your GPU:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html?fam=radeon&amp;amp;gpu=amd-radeon-rx-9070-gre&amp;amp;gfx=gfx1201&amp;amp;os=ubuntu" rel="noopener noreferrer"&gt;https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html?fam=radeon&amp;amp;gpu=amd-radeon-rx-9070-gre&amp;amp;gfx=gfx1201&amp;amp;os=ubuntu&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also found references suggesting that it may be possible to enable support for some older &lt;code&gt;gfx&lt;/code&gt; versions, but I didn't need to do this for my setup.&lt;/p&gt;




&lt;h1&gt;
  
  
  Running a model
&lt;/h1&gt;

&lt;p&gt;Time for the interesting part.&lt;br&gt;
Download and run a model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama run qwen3:8b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ask the model something and let it generate a response.&lt;br&gt;
You can exit the interactive session with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bye
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then check where the model is running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output should indicate that the model is running on the GPU.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;NAME        ID              SIZE      PROCESSOR
qwen3:8b    xxxxxxxxxxxx    5.2 GB    100% GPU
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also open the &lt;strong&gt;Windows Task Manager&lt;/strong&gt; and monitor your GPU usage.&lt;/p&gt;

&lt;p&gt;Once the model starts running, you should see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VRAM usage increasing.&lt;/li&gt;
&lt;li&gt;GPU compute activity increasing.&lt;/li&gt;
&lt;li&gt;The model using the GPU instead of relying entirely on the CPU.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Bonus
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Exposing Ollama to your local network
&lt;/h2&gt;

&lt;p&gt;By default, your Ollama instance is running inside WSL.&lt;br&gt;
If you want to access it from other machines on your local network, you need to expose the port through Windows.&lt;br&gt;
On the Windows host, open PowerShell as Administrator.&lt;/p&gt;

&lt;p&gt;First, create a firewall rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;New-NetFirewallRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;-DisplayName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ollama WSL LAN"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;-Direction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Inbound&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;-Protocol&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;TCP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;-LocalPort&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;11434&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;-Action&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Allow&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;-RemoteAddress&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IP_BASE_TO_LISTEN&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="nx"&gt;/24&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then forward the port between Windows and WSL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;netsh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;interface&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;portproxy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;v4tov4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;listenaddress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IP_HOST_WSL&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;listenport&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;11434&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;connectaddress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IP_UBUNTU_IMAGE&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;connectport&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;11434&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From another computer on your local network, you can test the Ollama API with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;http://&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;IP_OF_OLLAMA_HOST&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;&lt;span class="nx"&gt;11434/api/tags&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything is configured correctly, Ollama should respond with the list of installed models.&lt;/p&gt;




&lt;h2&gt;
  
  
  Keeping WSL alive after closing the terminal
&lt;/h2&gt;

&lt;p&gt;By default, WSL may stop after some time when no active terminal is connected.&lt;br&gt;
To keep the WSL environment alive, create a &lt;code&gt;.wslconfig&lt;/code&gt; file in your Windows user profile directory.&lt;/p&gt;

&lt;p&gt;Add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[general]&lt;/span&gt;
&lt;span class="py"&gt;instanceIdleTimeout&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;-1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After modifying the configuration, restart the WSL distribution so the configuration is taken into account&lt;br&gt;
Now once you started the image you will need to kill it manually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--terminate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ubuntu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Ollama is no longer accessible after restarting the PC
&lt;/h2&gt;

&lt;p&gt;I encountered one additional issue.&lt;/p&gt;

&lt;p&gt;After restarting my PC, I could start the WSL distribution, but Ollama was no longer accessible from the local network.&lt;/p&gt;

&lt;p&gt;In my case, restarting the Windows &lt;code&gt;iphlpsvc&lt;/code&gt; service solved the problem.&lt;/p&gt;

&lt;p&gt;Open PowerShell as Administrator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Restart-Service&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;iphlpsvc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, Ollama became accessible again.&lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;This setup allowed me to turn my gaming PC into a local AI machine without replacing Windows or dedicating the entire computer to Linux.&lt;/p&gt;

&lt;p&gt;The combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows&lt;/li&gt;
&lt;li&gt;WSL&lt;/li&gt;
&lt;li&gt;Ubuntu&lt;/li&gt;
&lt;li&gt;AMD Radeon&lt;/li&gt;
&lt;li&gt;ROCm&lt;/li&gt;
&lt;li&gt;Ollama&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;provides a relatively convenient environment for experimenting with local AI models.&lt;/p&gt;

&lt;p&gt;The most important part of the setup, in my experience, was making sure that Ollama was actually using the ROCm backend and the GPU.&lt;/p&gt;

&lt;p&gt;Once that was working, running a model such as &lt;code&gt;qwen3:8b&lt;/code&gt; was straightforward.&lt;/p&gt;

&lt;p&gt;Hopefully, this will save some time for other AMD GPU users who want to experiment with local AI on Windows.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
  </channel>
</rss>
