<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://istiyakamin.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://istiyakamin.github.io/" rel="alternate" type="text/html" /><updated>2025-10-24T18:38:14+00:00</updated><id>https://istiyakamin.github.io/feed.xml</id><title type="html">Istiyak Amin Santo</title><subtitle>istiyak Amin&apos;s academic portfolio</subtitle><author><name>Istiyak Amin</name><email>istiyak.amin.santo@student.mmu.edu.my</email></author><entry><title type="html">How to Install n8n on Windows Using WSL and Ubuntu (With Auto-Start Using systemd)</title><link href="https://istiyakamin.github.io/posts/2025/10/n8n-install-wsl-using-systemd/" rel="alternate" type="text/html" title="How to Install n8n on Windows Using WSL and Ubuntu (With Auto-Start Using systemd)" /><published>2025-10-22T00:00:00+00:00</published><updated>2025-10-22T00:00:00+00:00</updated><id>https://istiyakamin.github.io/posts/2025/10/n8n-install-wsl-using-systemd</id><content type="html" xml:base="https://istiyakamin.github.io/posts/2025/10/n8n-install-wsl-using-systemd/"><![CDATA[<blockquote>
  <p><strong>For absolute beginners — even if you’re still in school!</strong></p>
</blockquote>

<p>If you’ve heard about <strong>n8n</strong> (pronounced “n-eight-n”) and want to run it on your Windows computer, this guide is for you! We’ll use <strong>Windows Subsystem for Linux (WSL)</strong> with <strong>Ubuntu</strong>, and then set it up so it <strong>starts automatically</strong> every time your computer boots — using something called <strong>systemd</strong>.</p>

<p>Don’t worry if those words sound scary. We’ll go step by step, like building with LEGO blocks!</p>

<hr />

<h2 id="-what-is-n8n">🧩 What is n8n?</h2>

<p><strong>n8n</strong> is a free and open-source tool that helps you connect different apps and services together — like sending a Slack message when you get a new email, or saving Gmail attachments to Google Drive. It’s like digital glue for your online tools!</p>

<hr />

<h2 id="️-what-youll-need">🛠️ What You’ll Need</h2>

<ul>
  <li>A Windows 10 or Windows 11 computer</li>
  <li>Basic comfort using the command line (we’ll show you every command!)</li>
  <li>About 15–20 minutes of time</li>
</ul>

<hr />

<h2 id="-step-1-install-wsl-and-ubuntu">✅ Step 1: Install WSL and Ubuntu</h2>

<p>WSL lets you run Linux (like Ubuntu) inside Windows — without needing a separate computer or virtual machine.</p>

<h3 id="1-open-powershell-as-administrator">1. Open PowerShell as Administrator</h3>
<ul>
  <li>Press <code class="language-plaintext highlighter-rouge">Windows + S</code>, type <strong>PowerShell</strong></li>
  <li>Right-click <strong>Windows PowerShell</strong> → <strong>Run as administrator</strong></li>
</ul>

<h3 id="2-install-wsl-with-ubuntu">2. Install WSL with Ubuntu</h3>
<p>Run this command:</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">wsl</span><span class="w"> </span><span class="nt">--install</span><span class="w"> </span><span class="nt">-d</span><span class="w"> </span><span class="nx">Ubuntu</span><span class="w">
</span></code></pre></div></div>

<blockquote>
  <p>This will download and install Ubuntu from the Microsoft Store.<br />
You’ll be asked to <strong>restart your computer</strong> — go ahead!</p>
</blockquote>

<h3 id="3-after-restart-finish-ubuntu-setup">3. After restart, finish Ubuntu setup</h3>
<ul>
  <li>A terminal window will pop up.</li>
  <li>Create a <strong>username</strong> (e.g., <code class="language-plaintext highlighter-rouge">istiyak</code>) and <strong>password</strong> (you won’t see typing — that’s normal!).</li>
  <li>Remember your password — you’ll need it later.</li>
</ul>

<hr />

<h2 id="-step-2-update-ubuntu">✅ Step 2: Update Ubuntu</h2>

<p>Open <strong>Ubuntu</strong> from your Start Menu.</p>

<p>Run these commands one by one:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt update
<span class="nb">sudo </span>apt upgrade <span class="nt">-y</span>
</code></pre></div></div>

<blockquote>
  <p>Type your password when asked (no stars or dots appear — just type and press Enter).</p>
</blockquote>

<p>This makes sure your system has the latest updates.</p>

<hr />

<h2 id="-step-3-install-nodejs">✅ Step 3: Install Node.js</h2>

<p>n8n runs on <strong>Node.js</strong>, so we need to install it.</p>

<p>Run these commands:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl <span class="nt">-fsSL</span> https://deb.nodesource.com/setup_20.x | <span class="nb">sudo</span> <span class="nt">-E</span> bash -
<span class="nb">sudo </span>apt <span class="nb">install</span> <span class="nt">-y</span> nodejs
</code></pre></div></div>

<p>Check if it worked:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>node <span class="nt">-v</span>
npm <span class="nt">-v</span>
</code></pre></div></div>

<p>You should see version numbers like <code class="language-plaintext highlighter-rouge">v20.x.x</code> — great!</p>

<hr />

<h2 id="-step-4-install-n8n">✅ Step 4: Install n8n</h2>

<p>Now, install n8n globally using npm:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>npm <span class="nb">install</span> <span class="nt">-g</span> n8n
</code></pre></div></div>

<p>That’s it! n8n is now installed.</p>

<p>Try running it manually to test:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>n8n
</code></pre></div></div>

<p>You’ll see a message like:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>n8n ready on http://localhost:5678
</code></pre></div></div>

<p>Open your web browser and go to: <a href="http://localhost:5678">http://localhost:5678</a></p>

<p>🎉 You should see the n8n welcome screen!</p>

<blockquote>
  <p>Press <code class="language-plaintext highlighter-rouge">Ctrl + C</code> in the terminal to stop it for now.</p>
</blockquote>

<hr />

<h2 id="-step-5-make-n8n-start-automatically-with-systemd">✅ Step 5: Make n8n Start Automatically with systemd</h2>

<p>Right now, you have to type <code class="language-plaintext highlighter-rouge">n8n</code> every time you want to use it. Let’s make it <strong>start automatically</strong> when WSL starts — using <strong>systemd</strong>.</p>

<blockquote>
  <p>⚠️ <strong>Important</strong>: By default, WSL doesn’t support systemd. But we can enable it!</p>
</blockquote>

<h3 id="enable-systemd-in-wsl">Enable systemd in WSL</h3>

<ol>
  <li>Close all Ubuntu windows.</li>
  <li>Open <strong>Notepad</strong> as Administrator.</li>
  <li>
    <p>Open this file:<br />
<code class="language-plaintext highlighter-rouge">C:\Users\&lt;YourWindowsUsername&gt;\.wslconfig</code><br />
(If it doesn’t exist, create it.)</p>
  </li>
  <li>Paste this inside:</li>
</ol>

<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[wsl2]</span>
<span class="py">systemd</span><span class="p">=</span><span class="s">true</span>
</code></pre></div></div>

<ol>
  <li>Save the file.</li>
  <li>Restart WSL by running in PowerShell (as admin):</li>
</ol>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">wsl</span><span class="w"> </span><span class="nt">--shutdown</span><span class="w">
</span><span class="n">wsl</span><span class="w"> </span><span class="nt">--list</span><span class="w">
</span><span class="n">wsl</span><span class="w"> </span><span class="nt">-d</span><span class="w"> </span><span class="nx">DistroName</span><span class="w">
</span></code></pre></div></div>

<p>Then reopen <strong>Ubuntu</strong> from the Start Menu.</p>

<p>Now check if systemd is running:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>systemctl list-units <span class="nt">--type</span><span class="o">=</span>service | <span class="nb">head</span>
</code></pre></div></div>

<p>If you see a list of services — <strong>systemd is working!</strong> 🎉</p>

<hr />

<h2 id="-step-6-create-a-systemd-service-for-n8n">✅ Step 6: Create a systemd Service for n8n</h2>

<p>We’ll create a small config file so systemd knows how to run n8n.</p>

<h3 id="1-create-the-service-file">1. Create the service file</h3>

<p>Run this command:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>nano /etc/systemd/system/n8n.service
</code></pre></div></div>

<blockquote>
  <p>This opens a text editor called <code class="language-plaintext highlighter-rouge">nano</code>.</p>
</blockquote>

<h3 id="2-paste-the-following-into-the-file">2. Paste the following into the file:</h3>

<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[Unit]</span>
<span class="py">Description</span><span class="p">=</span><span class="s">n8n workflow automation</span>
<span class="py">After</span><span class="p">=</span><span class="s">network.target</span>

<span class="nn">[Service]</span>
<span class="py">Type</span><span class="p">=</span><span class="s">simple</span>
<span class="py">User</span><span class="p">=</span><span class="s">istiyak</span>
<span class="py">ExecStart</span><span class="p">=</span><span class="s">/usr/bin/n8n</span>
<span class="py">Restart</span><span class="p">=</span><span class="s">always</span>
<span class="py">Environment</span><span class="p">=</span><span class="s">NODE_ENV=production</span>
<span class="py">Environment</span><span class="p">=</span><span class="s">N8N_HOST=0.0.0.0</span>
<span class="py">Environment</span><span class="p">=</span><span class="s">N8N_PORT=5678</span>

<span class="nn">[Install]</span>
<span class="py">WantedBy</span><span class="p">=</span><span class="s">multi-user.target</span>
</code></pre></div></div>

<blockquote>
  <p>🔁 <strong>Important</strong>: Replace <code class="language-plaintext highlighter-rouge">istiyak</code> with <strong>your Ubuntu username</strong> (the one you created in Step 1).</p>
</blockquote>

<h3 id="3-save-and-exit">3. Save and exit</h3>
<ul>
  <li>Press <code class="language-plaintext highlighter-rouge">Ctrl + O</code> → press Enter to save</li>
  <li>Press <code class="language-plaintext highlighter-rouge">Ctrl + X</code> to exit</li>
</ul>

<h3 id="4-enable-and-start-the-service">4. Enable and start the service</h3>

<p>Run these commands:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl daemon-reload
<span class="nb">sudo </span>systemctl <span class="nb">enable </span>n8n
<span class="nb">sudo </span>systemctl start n8n
</code></pre></div></div>

<p>Now n8n will:</p>
<ul>
  <li>Start automatically when WSL starts</li>
  <li>Restart if it crashes</li>
  <li>Be available at <a href="http://localhost:5678">http://localhost:5678</a></li>
</ul>

<p>Check if it’s running:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl status n8n
</code></pre></div></div>

<p>You should see <strong>active (running)</strong> in green.</p>

<hr />

<h2 id="-step-7-use-n8n-anytime">✅ Step 7: Use n8n Anytime!</h2>

<p>From now on:</p>
<ul>
  <li>Just open <strong>Ubuntu</strong> (or even just use Windows!)</li>
  <li>Go to <a href="http://localhost:5678">http://localhost:5678</a> in your browser</li>
  <li>Your n8n is already running — no extra commands needed!</li>
</ul>

<blockquote>
  <p>💡 Tip: You don’t even need to keep the Ubuntu window open. As long as WSL is running (which it does in the background), n8n will work.</p>
</blockquote>

<p>To stop it manually (if needed):</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl stop n8n
</code></pre></div></div>

<p>To start again:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl start n8n
</code></pre></div></div>

<hr />

<h2 id="-summary-for-your-notes">🎓 Summary (For Your Notes)</h2>

<table>
  <thead>
    <tr>
      <th>Step</th>
      <th>What You Did</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Installed WSL + Ubuntu on Windows</td>
    </tr>
    <tr>
      <td>2</td>
      <td>Updated Ubuntu</td>
    </tr>
    <tr>
      <td>3</td>
      <td>Installed Node.js</td>
    </tr>
    <tr>
      <td>4</td>
      <td>Installed n8n</td>
    </tr>
    <tr>
      <td>5</td>
      <td>Enabled systemd in WSL</td>
    </tr>
    <tr>
      <td>6</td>
      <td>Created a systemd service to auto-start n8n</td>
    </tr>
    <tr>
      <td>7</td>
      <td>Now n8n runs automatically!</td>
    </tr>
  </tbody>
</table>

<hr />

<h2 id="-common-questions">❓ Common Questions</h2>

<p><strong>Q: Do I need to keep Ubuntu open?</strong><br />
A: No! Once set up, n8n runs in the background. Just use your browser.</p>

<p><strong>Q: Can I access n8n from other devices on my network?</strong><br />
A: By default, no — it only listens on <code class="language-plaintext highlighter-rouge">localhost</code>. To change that, modify the <code class="language-plaintext highlighter-rouge">N8N_HOST</code> in the service file (advanced).</p>

<p><strong>Q: What if I get permission errors?</strong><br />
A: Make sure you used <code class="language-plaintext highlighter-rouge">sudo</code> where needed, and that your username in the service file matches your Ubuntu username.</p>

<hr />

<h2 id="-you-did-it">🌟 You Did It!</h2>

<p>Congratulations! You’ve just set up a powerful automation tool on your own computer — like a real developer. Whether you’re in middle school, high school, or beyond, this is a huge step into the world of tech.</p>

<p>Now go build your first workflow in n8n! 🚀</p>

<blockquote>
  <p>Got stuck? Leave a comment below (if this were a real blog!) or ask a teacher, friend, or online community. Everyone starts somewhere.</p>
</blockquote>

<p>Happy automating!<br />
— Istiyak
——</p>]]></content><author><name>Istiyak Amin</name><email>istiyak.amin.santo@student.mmu.edu.my</email></author><category term="n8n" /><category term="Automation" /><category term="WSL" /><category term="Ubuntu" /><category term="Windows" /><category term="Systemd" /><category term="BeginnerGuide" /><category term="NoCode" /><category term="WorkflowAutomation" /><category term="NodeJS" /><category term="TechTutorial" /><category term="StudentDeveloper" /><category term="LocalSetup" /><category term="OpenSource" /><summary type="html"><![CDATA[For absolute beginners — even if you’re still in school!]]></summary></entry></feed>