<?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: Janith Ranasinghe</title>
    <description>The latest articles on DEV Community by Janith Ranasinghe (@janith19).</description>
    <link>https://dev.to/janith19</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3707293%2Fd702b2bb-53e0-4458-babf-0bb342633495.jpeg</url>
      <title>DEV Community: Janith Ranasinghe</title>
      <link>https://dev.to/janith19</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/janith19"/>
    <language>en</language>
    <item>
      <title>Configure Wake on LAN</title>
      <dc:creator>Janith Ranasinghe</dc:creator>
      <pubDate>Wed, 28 Jan 2026 12:18:29 +0000</pubDate>
      <link>https://dev.to/janith19/configure-wake-on-lan-24ff</link>
      <guid>https://dev.to/janith19/configure-wake-on-lan-24ff</guid>
      <description>&lt;p&gt;Hey everyone 👋&lt;br&gt;
Janith here. Today, let’s talk about &lt;strong&gt;Wake-On-LAN (WOL)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This post is for anyone who has ever had the idea of turning on their PC remotely. I recently set this up on my own machines, and while it worked perfectly on my Windows desktop, my old Ubuntu laptop taught me some important hardware lessons.&lt;/p&gt;

&lt;p&gt;If you’re experimenting with homelabs or self-hosting, this is a really cool and useful thing to learn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why I Wanted Wake-on-LAN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My laptop isn’t in a place where I can access it quickly. Whenever I needed to turn on my server, I had to physically go to the laptop and press the power button.&lt;/p&gt;

&lt;p&gt;And honestly… I’m a bit lazy 😄&lt;br&gt;
That alone motivated me to look for a better solution.&lt;/p&gt;

&lt;p&gt;My main goals were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access my homelab remotely&lt;/li&gt;
&lt;li&gt;Avoid keeping machines powered on 24/7&lt;/li&gt;
&lt;li&gt;Learn how low-level networking features work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wake-on-LAN sounded perfect for this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Wake-on-LAN (WOL)?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Wake-on-LAN allows you to power on a computer by sending a special magic packet over the network.&lt;/p&gt;

&lt;p&gt;There is another feature called Wake on WLAN which is a newer technology and available on newer pcs', where it allows the user to send the magic packet without requiring an Ethernet cable.&lt;/p&gt;

&lt;p&gt;A few important requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wired Ethernet (Wi-Fi usually doesn’t work from shutdown).&lt;/li&gt;
&lt;li&gt;BIOS/UEFI support&lt;/li&gt;
&lt;li&gt;OS-level configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From my experience:&lt;/p&gt;

&lt;p&gt;Desktops work very reliably&lt;br&gt;
Older laptops often have limitations (Your Computer might not support WOL)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable Wake-on-LAN in BIOS / UEFI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before touching the operating system, check the BIOS.&lt;/p&gt;

&lt;p&gt;Steps:&lt;br&gt;
Restart and enter BIOS (Del, F2, F10, or F12)&lt;br&gt;
Look for options like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wake on LAN&lt;/li&gt;
&lt;li&gt;Power On by LAN&lt;/li&gt;
&lt;li&gt;Resume by PCI-E&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enable the option and save&lt;/p&gt;

&lt;p&gt;Important note:&lt;br&gt;
My Dell Inspiron 3542 laptop had no WOL option at all, which is very common for consumer laptops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows Setup (Worked Perfectly for Me)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure the Network Adapter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to:&lt;br&gt;
Device Manager → Network adapters → Ethernet adapter → Properties&lt;/p&gt;

&lt;p&gt;Power Management tab&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow this device to wake the computer&lt;/li&gt;
&lt;li&gt;Only allow a magic packet to wake the computer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Advanced tab&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wake on Magic Packet → Enabled&lt;/li&gt;
&lt;li&gt;Wake on Pattern Match → Enabled&lt;/li&gt;
&lt;li&gt;Energy Efficient Ethernet → Disabled (if available)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get the MAC Address&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Look for the Physical Address of your Ethernet adapter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test It&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Shut down the PC completely and send a WOL packet from your phone.&lt;br&gt;
(you will have to find an app that does this. I use the app called Wake On Lan)&lt;/p&gt;

&lt;p&gt;Result:&lt;br&gt;
My Windows desktop woke up instantly every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ubuntu / Linux Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I installed Ubuntu Server on an old laptop and configured WOL. Although the process wasn't successful, I will document the process i have followed.&lt;/p&gt;

&lt;p&gt;The network card technically supported WOL, but the laptop hardware cut power during shutdown.&lt;/p&gt;

&lt;p&gt;Install ethtool&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install ethtool
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find your network interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ip link show
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mine was enp7s0.&lt;/p&gt;

&lt;p&gt;Enable Wake-on-LAN&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ethtool -s enp7s0 wol g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check support:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Supports Wake-on: pumbg
Wake-on: g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make It Persistent&lt;br&gt;
Create a systemd service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/systemd/system/wol.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;once the file opens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=Enable Wake-on-LAN
[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -s enp7s0 wol g
[Install]
WantedBy=multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl daemon-reload
sudo systemctl enable --now wol.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Works perfectly from suspend&lt;/li&gt;
&lt;li&gt;Does not work from full shutdown (Should work if your pc supports WOL)&lt;/li&gt;
&lt;li&gt;Ethernet LEDs turn off completely when powered down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lesson learned:&lt;br&gt;
Many older laptops remove power from the network card when shut down. Software can’t fix that.&lt;/p&gt;

&lt;p&gt;You need to add your MAC address and your IP address into the app and keep the default settings.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MAC address&lt;/li&gt;
&lt;li&gt;Broadcast IP (for example: 192.168.1.255)&lt;/li&gt;
&lt;li&gt;Port: 9 or 7&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once configured, waking the machine takes a single tap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Waking Over the Internet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two main approaches:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Port Forwarding (Not Recommended)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forward UDP port 9&lt;/li&gt;
&lt;li&gt;Works, but exposes your network to the internet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;VPN (Recommended)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up WireGuard&lt;/li&gt;
&lt;li&gt;Connect your phone to the VPN&lt;/li&gt;
&lt;li&gt;Send the WOL packet as if you’re at home&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach is safer and more reliable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Troubleshooting Tips&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Things I learned the hard way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ethernet LEDs staying on after shutdown is a good sign&lt;/li&gt;
&lt;li&gt;Always test WOL locally first&lt;/li&gt;
&lt;li&gt;Laptops work better from suspend than shutdown&lt;/li&gt;
&lt;li&gt;Plug in the charger (some laptops disable WOL on battery)&lt;/li&gt;
&lt;li&gt;A smart plug can be a simple fallback solution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Wake-on-LAN is incredibly useful once it works.&lt;/p&gt;

&lt;p&gt;This is just another step toward my larger automation goals. My end goal is to set up a &lt;strong&gt;Home Assistant system&lt;/strong&gt; where I can control all my smart devices from a centralized place.&lt;/p&gt;

&lt;p&gt;I hope you learned something new, and I’ll be back with more cool stuff soon.&lt;/p&gt;

&lt;p&gt;Thanks for reading 🙌&lt;br&gt;
Happy learning!&lt;/p&gt;

</description>
      <category>networking</category>
      <category>homelab</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Home Server on a Zero Budget (No Raspberry Pi Needed)</title>
      <dc:creator>Janith Ranasinghe</dc:creator>
      <pubDate>Tue, 20 Jan 2026 14:34:26 +0000</pubDate>
      <link>https://dev.to/janith19/building-a-home-server-on-a-zero-budget-no-raspberry-pi-needed-5g5h</link>
      <guid>https://dev.to/janith19/building-a-home-server-on-a-zero-budget-no-raspberry-pi-needed-5g5h</guid>
      <description>&lt;p&gt;Hey everyone, 👋&lt;br&gt;
Janith here. Today, let’s talk about home servers.&lt;/p&gt;

&lt;p&gt;This post is for anyone who wants to build their own home server but doesn’t have the budget for a Raspberry Pi or other dedicated hardware. If you’re like me and enjoy experimenting, learning, and squeezing value out of old hardware, this guide is for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why I Wanted a Home Server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I always wanted to try new things, and building a home server was one of them. My main goals were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralize all my data in one place&lt;/li&gt;
&lt;li&gt;Self-host useful services&lt;/li&gt;
&lt;li&gt;Get rid of ads on my home network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Buying new hardware wasn’t an option for me, so I looked around and found a spare laptop that I hadn’t used in years. That became my server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardware &amp;amp; OS Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wiped the existing OS and installed Ubuntu Server LTS.&lt;/p&gt;

&lt;p&gt;The installation process is pretty straightforward. For newcomers, I strongly recommend sticking to the default options unless you know exactly what you’re changing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial Server Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once Ubuntu Server is installed, log in and do the following:&lt;/p&gt;

&lt;p&gt;Enable SSH&lt;/p&gt;

&lt;p&gt;SSH allows you to control your server remotely from another computer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install openssh-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, you can connect to your server from your main PC without needing a monitor or keyboard.&lt;/p&gt;

&lt;p&gt;Assign a Static IP Address&lt;/p&gt;

&lt;p&gt;By using a LAN cable with A static IP makes your life much easier.&lt;br&gt;
Your server’s address won’t change, and SSH connections will always work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Important Tip (Keyboard Layout)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The keyboard layout is more important than you think.&lt;/p&gt;

&lt;p&gt;When selecting the keyboard layout during Ubuntu Server installation, make sure it matches your actual keyboard.&lt;/p&gt;

&lt;p&gt;If the layout is wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some symbols will be mapped incorrectly&lt;/li&gt;
&lt;li&gt;You may not be able to type your password properly (Special Character may not be mapped correctly)&lt;/li&gt;
&lt;li&gt;SSH login can become a nightmare later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;First Service: Network-Wide Ad Blocking with Pi-hole&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The very first service I installed was Pi-hole. Pi-hole works as a DNS-level ad blocker, meaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ads are blocked for every device on your Wi-Fi&lt;/li&gt;
&lt;li&gt;No browser extensions needed&lt;/li&gt;
&lt;li&gt;Works on phones, TVs, tablets, and PCs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many community-maintained ad block lists available online, and you can easily add them to improve blocking effectiveness.&lt;/p&gt;

&lt;p&gt;This single service made my home network feel cleaner and faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Media Server with Jellyfin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, I installed Jellyfin, an open-source media server. With Jellyfin:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload movies, TV shows, or music to your server&lt;/li&gt;
&lt;li&gt;Access them from any device connected to your Wi-Fi&lt;/li&gt;
&lt;li&gt;Watch content on phones, laptops, tablets, or smart TVs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s basically your own private, self-hosted Netflix - no subscriptions, no ads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optional but Powerful: Use Docker&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For services like Pi-hole, Jellyfin, and n8n, Docker makes things easier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean installations&lt;/li&gt;
&lt;li&gt;Easy updates&lt;/li&gt;
&lt;li&gt;Services stay isolated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install docker.io docker-compose -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is optional, but highly recommended as you add more services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s Next?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I recently started using n8n, an automation tool that allows you to build powerful workflows and integrations.&lt;/p&gt;

&lt;p&gt;In a future post, I’ll cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why n8n is useful on a home server&lt;/li&gt;
&lt;li&gt;Real-world automation examples&lt;/li&gt;
&lt;li&gt;How I personally use it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You don’t need expensive hardware to learn or self-host.&lt;/p&gt;

&lt;p&gt;An old laptop + Linux can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block ads network-wide&lt;/li&gt;
&lt;li&gt;Stream media&lt;/li&gt;
&lt;li&gt;Automate tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have unused hardware lying around, turn it into something useful and start learning.&lt;/p&gt;

&lt;p&gt;Thanks for reading 🙌&lt;br&gt;
Happy Learning!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>linux</category>
      <category>networking</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
