<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0">

<channel>
	<title>PC-Freak - Walking in Light with Christ</title>
	<atom:link href="https://www.pc-freak.net/blog/feed/" rel="self" type="application/rss+xml"/>
	<link>https://www.pc-freak.net/blog</link>
	<description>Pc Freak is the place to teach you basic UNIX / Linux / Windows MAC OS system administration and breath you faith showing the moral of true computer enthusiast hackers is based on Christ's laws to love God and neighbor as yourself.</description>
	<lastBuildDate>Thu, 26 Mar 2026 19:10:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.9</generator>

<image>
	<url>https://www.pc-freak.net/blog/wp-content/uploads/2021/05/cropped-linux-tux-free-icon-512x512-1-32x32.png</url>
	<title>☩ Walking in Light with Christ –  Faith,  Computing, Diary</title>
	<link>https://www.pc-freak.net/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Automatically Re-plug all USB devices on system resume on Debian Linux using systemd</title>
		<link>https://www.pc-freak.net/blog/automatically-replug-usb-devices-system-resume-debian-linux-systemd/</link>
					<comments>https://www.pc-freak.net/blog/automatically-replug-usb-devices-system-resume-debian-linux-systemd/#respond</comments>
		
		
		<pubDate>Thu, 26 Mar 2026 19:10:17 +0000</pubDate>
				<category><![CDATA[Curious Facts]]></category>
		<category><![CDATA[Educational]]></category>
		<category><![CDATA[Everyday Life]]></category>
		<category><![CDATA[Linux and FreeBSD Desktop]]></category>
		<category><![CDATA[Linux multimedia]]></category>
		<category><![CDATA[Linux on Laptops]]></category>
		<category><![CDATA[Automatically Re-plug]]></category>
		<category><![CDATA[bash scripting linux]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[debian linux]]></category>
		<category><![CDATA[debian systemd configuration]]></category>
		<category><![CDATA[echo 1]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[linux automation]]></category>
		<category><![CDATA[linux hardware troubleshooting]]></category>
		<category><![CDATA[linux power management]]></category>
		<category><![CDATA[linux resume hook]]></category>
		<category><![CDATA[linux scripting]]></category>
		<category><![CDATA[linux system administration]]></category>
		<category><![CDATA[linux usb reset]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[suspend]]></category>
		<category><![CDATA[suspend resume linux]]></category>
		<category><![CDATA[system resume script]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[systemd service]]></category>
		<category><![CDATA[systemd sleep hook]]></category>
		<category><![CDATA[systemd suspend service]]></category>
		<category><![CDATA[udev rules]]></category>
		<category><![CDATA[usb device management]]></category>
		<category><![CDATA[usb devices]]></category>
		<category><![CDATA[usb devices reconnect]]></category>
		<category><![CDATA[usb reset script]]></category>
		<category><![CDATA[usb troubleshooting linux]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18457</guid>

					<description><![CDATA[<p>Lets say you&#8217;re like me and you have an old but gold USB device like USB joystick Maxfire G-08XU (i&#39;ve described&#160;how to configure Joystick / Gamepad on Debian Ubuntu easily), an USB flash drive stick or even some obscure USB keyboard model, that are not among the most compatible device on earth&#160;for linux.&#160;The result is [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/automatically-replug-usb-devices-system-resume-debian-linux-systemd/">Automatically Re-plug all USB devices on system resume on Debian Linux using systemd</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="automatically-replug-all-usb-devices-on-system-resume-on-Debian-Ubuntu-Linux" src="https://www.pc-freak.net/images/automatically-replug-all-usb-devices-on-system-resume-on-Debian-Ubuntu-Linux.png" /><br />
	Lets say you&rsquo;re like me and you have an <strong>old but gold USB device</strong> like <strong>USB joystick Maxfire G-08XU (i&#39;ve described&nbsp;<a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY29uZmlndXJlLWpveXN0aWNrLWdhbWVwYWQtZGViaWFuLXVidW50dS1taW50LWdudS1saW51eC8%3D&#038;feed-stats-url-post-id=18457">how to configure Joystick / Gamepad on Debian Ubuntu easily</a>)</strong>, an <em><strong>USB flash drive stick </strong></em>or even <strong>some obscure USB keyboard model</strong>, that are not <em>among the most compatible device on earth</em>&nbsp;for linux.&nbsp;The result is in <strong>device plug</strong> and <em><strong>Sleeping the system or Hibernating it&nbsp;for a while (when go to bed)</strong></em>&nbsp;you<em><strong> end up with USB device being undetected by the system. Once you</strong></em>&nbsp;recover the Laptop / PC from being in <strong><em>Sleep mode / hibernate, the device becomes undetected by system, even though, even though the Linux kernel recognizes in lsusb. That weirdity continues</em></strong>&nbsp;until you do the manual <strong>hard workaround</strong>, which is to <strong>manually unplug the device cable and replug it again.</strong><br />
	Though Linux has advanced much with this stuff over last years still this problems can occur every now and then. Thanksfully there is a quick fix to that. You can create a small script that reloads all the USB devices on PC<br />
	want the script to <strong>run automatically after your Debian laptop wakes up from suspend/hibernate</strong>. On Linux, the way to do this is using <strong>systemd sleep hooks</strong>. Here&rsquo;s how to do it properly by using a small script + systemd.
</p>
<h2>
	<strong>1. Create a systemd sleep script</strong><br />
</h2>
<p>
	Create a new directory and file:
</p>
<blockquote>
<pre>
<strong># mkdir -p /etc/systemd/system-sleep</strong>

<strong># vim /etc/systemd/system-sleep/usb-replug.sh</strong></pre>
</blockquote>
<p>
	Add this content:
</p>
<blockquote>
<pre>
#!/bin/bash
# Only run on resume (wake up)
case &quot;$1&quot; in
    post)
        # Replace &#39;1-3&#39; with your USB bus-port ID
        echo &#39;1-3&#39; | tee /sys/bus/usb/drivers/usb/unbind
        sleep 2
        echo &#39;1-3&#39; | tee /sys/bus/usb/drivers/usb/bind
        ;;
esac



If </pre>
</blockquote>
<blockquote>
<h3>
		<br />
		If you need script logging use instead this small script:<br />
	</h3>
<p>
		&nbsp;
	</p>
<p>
		#!/bin/bash
	</p>
<p>
		case $1/$2 in<br />
		pre/*)<br />
		# before suspend: you can put commands here if needed<br />
		;;<br />
		post/*)<br />
		# after resume: run your USB replug commands<br />
		echo &quot;$(date) &#8211; Running USB replug script&quot; &gt;&gt; /var/log/usb-replug.log<br />
		# Example command: trigger USB rescan<br />
		for bus in /sys/bus/usb/devices/*/authorized; do<br />
		echo 0 | sudo tee $bus<br />
		echo 1 | sudo tee $bus<br />
		done<br />
		;;<br />
		esac
	</p>
</blockquote>
<h2>
	<strong>2. Make it executable and reload systemd services</strong><br />
</h2>
<blockquote>
<pre>
# <strong>chmod +x /etc/systemd/system-sleep/usb-replug.sh</strong>
</pre>
</blockquote>
<p>
	Once you&rsquo;ve created the script in <strong><code>/etc/systemd/system-sleep/</code></strong> and made it executable, <strong>systemd will automatically call it on suspend/resume</strong>.
</p>
<p>
	To make sure everything is recognized, you can:
</p>
<ol>
<li>
<p>
			<em><strong>Reload systemd units (optional but recommended)</strong></em>
		</p>
</li>
</ol>
<blockquote>
<pre>
<strong># systemctl daemon-reload</strong></pre>
</blockquote>
<ol start="2">
<li>
<p>
			<em><strong>Test it manually by suspending and resuming your machine</strong></em>
		</p>
</li>
</ol>
<pre>
<strong># systemctl suspend</strong></pre>
<p>
	After resuming, your script should run automatically and you should see the missing devices that you had to physically unplug and plug back to normal.<br />
	<strong><em>Hooray ! 🙂</em></strong>
</p>
<h2>
	<strong>3. How it works (systemd respawn)</strong><br />
</h2>
<ul>
<li>
<p>
			<strong><code>systemd</code> </strong>runs scripts in <strong><code>/etc/systemd/system-sleep/</code></strong> on suspend and resume.
		</p>
</li>
<li>
<p>
			<code>$1</code> is either <code>pre</code> (before sleep) or <code>post</code> (after wake).
		</p>
</li>
<li>
<p>
			The script unbinds and rebinds your USB device right after the system resumes.
		</p>
</li>
</ul>
<p>
	<strong>Tip:</strong> You can also use <code>usbreset</code> instead of unbind/bind if you prefer, just replace the echo lines with:
</p>
<blockquote>
<p>
		<strong># usbreset /dev/bus/usb/001/005</strong>
	</p>
</blockquote>
<p>
	Alternatively you can use one time a simple one liner script that does the job like this:<br />
	&nbsp;
</p>
<blockquote>
<p>
		<strong># cat replug_usbs_linux.sh</strong><br />
		#!/bin/bash
	</p>
<p>
		# one liner script to replug all USB devices like you have physically replugged all USBs useful if for example some of USB devices stuck after linux computer sleep
	</p>
<p>
		# for example my old maxfire g-08 usb joystick does mess up and i have to physically replug it (to work around this i simply run this script
	</p>
<p>
		d=$(lsusb -t | grep -m1 &#39;Driver=&#39; | sed -E &#39;s|.*Port ([0-9]+):.*Bus ([0-9]+).*|\2-\1|&#39;) &amp;&amp; echo $d | sudo tee /sys/bus/usb/drivers/usb/unbind &amp;&amp; sleep 2 &amp;&amp; echo $d | sudo tee /sys/bus/usb/drivers/usb/bind
	</p>
</blockquote>
<p>
	&nbsp;</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" id="wp_rp_first"><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-12892" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYWRkaW5nLWxldmVsLXNlY3VyaXR5LXNoYXJlZC1saW51eC13ZWJob3N0aW5nLXNlcnZlci1zdXBocC8%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Adding another level of security to your shared Debian Linux webhosting server with SuPHP</a></li><li data-position="1" data-poid="in-5026" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLXNldC1hLWNyb250YWItdG8tZXhlY3V0ZS1jb21tYW5kcy1vbi1hLXNlY29uZHMtdGltZS1pbnRlcnZhbC1vbi1nbnUtbGludXgtYW5kLWZyZWVic2Qv&#038;feed-stats-url-post-id=18457" class="wp_rp_title">How to set a crontab to execute commands on a seconds time interval on GNU / Linux and FreeBSD</a></li><li data-position="2" data-poid="in-18230" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3RvcHBlZC1hd3Mtd29ya3NwYWNlLWxpbnV4LWRlc2t0b3Atc2xlZXAtcm9vdC1hY2Nlc3Mv&#038;feed-stats-url-post-id=18457" class="wp_rp_title">How I Stopped My AWS workspace Linux Desktop From Going to Sleep… Without Root Access</a></li><li data-position="3" data-poid="in-16801" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbW9uaXRvci1oYXByb3h5LWFwcGxpY2F0aW9uLXNlcnZlci1iYWNrZW5kcy16YWJiaXgtdXNlcnBhcmFtZXRlci1zY3JpcHRzLw%3D%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">How to monitor Haproxy Application server backends with Zabbix userparameter autodiscovery scripts</a></li><li data-position="4" data-poid="in-15613" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmVpbnN0YWxsLWRlYmlhbi1wYWNrYWdlcy1jb3B5LWFwdC1kZWItcGFja2FnZS1saXN0LXdvcmtpbmctZGViaWFuLWxpbnV4LWluc3RhbGxhdGlvbi8%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Reinstall all Debian packages with a copy of apt deb package list from another working Debian Linux installation</a></li><li data-position="5" data-poid="in-15529" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGFwdG9wLWF1dG8tc2xlZXAtbGlkLWNsb3NlLWxpbnV4LXVidW50dS1kZWJpYW4tbGludXgv&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Make Laptop Sleep on LID (Monitor) close in Linux Debian and Ubuntu systemd Linux</a></li><li data-position="6" data-poid="in-15146" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LWZ0cC1hY3RpdmUtY29ubmVjdGlvbi1pc3N1ZXMtY3JlYXRlLWRhdGEtY29ubmVjdGlvbi1yb3V0ZS1ob3N0LXByb2Z0cGQtbGludXgtZGVkaWNhdGVkLXNlcnZlci8%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Fix FTP active connection issues &#8220;Cannot create a data connection: No route to host&#8221; on ProFTPD Linux dedicated server</a></li><li data-position="7" data-poid="in-13776" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmMtbG9jYWwtbWlzc2luZy1pbi1kZWJpYW4tOC1qZXNzaWUtYW5kLWRlaWJhbi05LXN0cmV0Y2gtYW5kLW5ld2VyLXVidW50dS0xNi1mZWRvcmFzLWV0Yy13aHktaXMtdGhhdC1hbmQtaG93LXRvLW1ha2UtZXRjcmMtbG9jYWwtd29ya2luZy1pZi1pdHMtbm90Lw%3D%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">rc.local missing in Debian 8 Jessie and Debian 9 Stretch and newer Ubuntu 16, Fedora, CentOS Linux  &#8211; Why is /etc/rc.local not working and how to make it work again</a></li><li data-position="8" data-poid="in-12976" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3lzc3RhdC1maWxlLWRpcmVjdG9yeS1maXgtZGViaWFuLWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Howto Fix &#8220;sysstat Cannot open /var/log/sysstat/sa no such file or directory&#8221; on Debian / Ubuntu Linux</a></li><li data-position="9" data-poid="in-9304" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGludXgtcGhwLWRpc2FibGUtY2htb2QtY2hvd24tZnVuY3Rpb25zLXNlY3VyaXR5Lw%3D%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Linux PHP Disable chmod() and chown() functions for better Apache server security</a></li><li data-position="10" data-poid="in-6198" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWNvbnZlcnQtZmx2LXRvLWF2aS1hbmQtYXZpLXRvLWZsdi12aWRlb3Mtb24tbGludXgtYW5kLWJzZC13aXRoLWF2aWRlbXV4LWFuZC1mZm1wZWctc2ltcGxlLXZpZGVvLWVkaXR0aW5nLXdpdGgtbGl2ZXMv&#038;feed-stats-url-post-id=18457" class="wp_rp_title">How to convert FLV to AVI and AVI to FLV Videos on Linux and BSD with avidemux and ffmpeg &#8211; Simple video editting with LiVES</a></li><li data-position="11" data-poid="in-6072" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWNvcHktY2xvbmUtaW5zdGFsbGVkLXBhY2thZ2VzLWZyb20tb25lLWRlYmlhbi1zZXJ2ZXItdG8tYW5vdGhlci8%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">How to copy / clone installed packages from one Debian server to another</a></li><li data-position="12" data-poid="in-5925" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY2hlY2stYW5kLXJlc3RhcnQtYXBhY2hlLWlmLWl0LWlzLW1hbGZ1bmN0aW9uaW5nLW5vdC1yZXR1cm5pbmctaHRtbC1jb250ZW50LXNoZWxsLXNjcmlwdC8%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">Check and Restart Apache if it is malfunctioning (not returning HTML content) shell script</a></li><li data-position="13" data-poid="in-5694" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWRpc2FibGUtbmdpbngtc3RhdGljLXJlcXVlc3RzLWFjY2Vzcy1sb2ctbG9nZ2luZy8%3D&#038;feed-stats-url-post-id=18457" class="wp_rp_title">How to disable nginx static requests access.log logging</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18457" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/automatically-replug-usb-devices-system-resume-debian-linux-systemd/">Automatically Re-plug all USB devices on system resume on Debian Linux using systemd</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/automatically-replug-usb-devices-system-resume-debian-linux-systemd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>Building a 10-Server FreeBSD Jail Cluster Running a LAMP (Linux / Apache / MySQL / Perl / PHP / Python) Stack</title>
		<link>https://www.pc-freak.net/blog/building-10server-freebsd-jail-cluster-running-lamp-linux-apache-mysql-perl-php-python-stack/</link>
					<comments>https://www.pc-freak.net/blog/building-10server-freebsd-jail-cluster-running-lamp-linux-apache-mysql-perl-php-python-stack/#respond</comments>
		
		
		<pubDate>Wed, 25 Mar 2026 15:47:13 +0000</pubDate>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Cloud services]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[Curious Facts]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[System Optimization]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[application deployment]]></category>
		<category><![CDATA[backend deployment]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[Choosing]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[containerization]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[FreeBSD jails]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[Host Setup]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[infrastructure design]]></category>
		<category><![CDATA[Initialize]]></category>
		<category><![CDATA[iocage]]></category>
		<category><![CDATA[jail management]]></category>
		<category><![CDATA[jails vs containers]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[LAMP stack]]></category>
		<category><![CDATA[libphp]]></category>
		<category><![CDATA[Load Balancing Layer]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[microservices]]></category>
		<category><![CDATA[network performance]]></category>
		<category><![CDATA[OS-level virtualization]]></category>
		<category><![CDATA[performance optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pkg]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[scalable architecture]]></category>
		<category><![CDATA[server infrastructure]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Start]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[system isolation]]></category>
		<category><![CDATA[Unix systems]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[VNET]]></category>
		<category><![CDATA[ZFS]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18451</guid>

					<description><![CDATA[<p>Virtualization and workload isolation are foundational to modern infrastructure. While most teams today default to container platforms like Docker and orchestration systems such as Kubernetes, an older and highly capable alternative exists in the form of jails from FreeBSD. FreeBSD jails provide lightweight OS-level isolation, allowing multiple independent userland environments to run on a single [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/building-10server-freebsd-jail-cluster-running-lamp-linux-apache-mysql-perl-php-python-stack/">Building a 10-Server FreeBSD Jail Cluster Running a LAMP (Linux / Apache / MySQL / Perl / PHP / Python) Stack</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<strong><img decoding="async" alt="building-freebsd-jails-cluster-running-linux-apache-10-cluster-high-availability-with-mariadb-perl-php-howto" src="https://www.pc-freak.net/images/building-freebsd-jails-cluster-running-linux-apache-10-cluster-high-availability-with-mariadb-perl-php-howto.png" style="width: 480px; height: 240px;" /></strong>
</p>
<p>
	<strong>Virtualization and workload isolation</strong> are foundational to modern infrastructure.<br />
	While most teams today default to container platforms like <strong>Docker</strong> and <strong>orchestration systems </strong>such as <strong>Kubernetes</strong>, an o<em><strong>lder and highly capable alternative exists in the form of jails from FreeBSD.</strong></em>
</p>
<p>
	<strong>FreeBSD jails </strong>provide <strong>lightweight OS-level isolation</strong>, <em>allowing multiple independent userland environments to run on a single host. Introduced long before containers became mainstream, jails were designed with a<strong> strong focus on security, simplicity, and performance.</strong></em><br />
	Despite their maturity and robustness, they are less commonly used today, largely due to the r<strong>apid rise of container ecosystems</strong> and c<strong>loud-native tooling</strong>.
</p>
<p>
	Choosing between <strong>jails </strong>and containers is not simply a matter of &ldquo;<strong>old vs new</strong>,&rdquo; but rather a trade-off between<strong> control and simplicity</strong> versus <strong>portability and ecosystem support.</strong>
</p>
<p>
	<strong>Short Comparison of FreeBSD jails and Containers ( Pros and Cons )</strong>
</p>
<h2>
	<strong>Advantages of FreeBSD Jails</strong><br />
</h2>
<h2>
	<strong>a. Strong, simple isolation</strong><br />
</h2>
<p>
	<strong>Jails</strong> provide a clear and tightly integrated security boundary within the <em>FreeBSD kernel</em>. Their design is straightforward, <strong>reducing the risk of misconfiguration compared to layered container security models.</strong>
</p>
<p>
	<strong><img decoding="async" alt="freebsd_jails_infographic_diagram" src="https://www.pc-freak.net/images/freebsd_jails_infographic_diagram.png" style="width: 512px; height: 517px;" /></strong>
</p>
<h2>
	<strong>b. High performance</strong><br />
</h2>
<p>
	Because jails operate very close to the base system, they deliver near-native performance with minimal overhead&mdash;especially beneficial for networking and I/O-heavy workloads.
</p>
<h2>
	<strong>c. Operational simplicity</strong><br />
</h2>
<p>
	<strong>There are fewer component moving parts (easier to maintain and debbug):</strong>
</p>
<ul>
<li>
		<strong>No separate container runtime </strong>
	</li>
<li>
		<strong>No image layers </strong>
	</li>
<li>
		<strong>No complex orchestration requirements </strong>
	</li>
</ul>
<p>
	<strong>This makes jails appealing for stable, long-running systems.</strong>
</p>
<h2>
	<strong>d. Predictability and stability</strong><br />
</h2>
<p>
	FreeBSD&rsquo;s conservative, design philosophy results in systems that are highly stable over long periods, that&nbsp;is ideal for infrastructure roles like: storage or networking.
</p>
<h2>
	<strong>Disadvantages of FreeBSD Jails</strong><br />
</h2>
<h2>
	<strong>a. Limited portability</strong><br />
</h2>
<p>
	Not neceserry a huge disadvantage but still,<br />
	<strong>Jails are tied to FreeBSD. </strong>Unlike containers, they<strong> cannot be easily moved across different operating systems or cloud platforms.</strong>
</p>
<h2>
	<br />
	<strong>b. Smaller ecosystem</strong><br />
</h2>
<p>
	<strong>FBSD Jails</strong> is not full equivallent to:
</p>
<ul>
<li>
		<strong>Container registries (like Docker Hub) </strong>
	</li>
<li>
		<strong>Massive orchestration ecosystems </strong>(similar things has to be done with scripts and customizations)
	</li>
<li>
		<strong>Broad third-party integrations </strong>
	</li>
</ul>
<p>
	<strong>This can&nbsp;slow down a bit development and deployment workflows. </strong>Though for a matured Applications that are once well tuned with jails that can be not a real probblem.
</p>
<p>
	Note that though a con, this can also be a pros, as once you tune up an App for it becomes easier to maintain.
</p>
<h2>
	<strong>c. Less automation tooling</strong><br />
</h2>
<p>
	<strong>While tools exist, they are not as standardized or widely adopted as container-based CI/CD pipelines.</strong>
</p>
<h2>
	<strong>d. Harder to find people for it</strong><br />
	&nbsp;<br />
</h2>
<p>
	Most <strong>developers and DevOps engineers are trained in container technologies, making hiring and collaboration easier in container-based environments. </strong>However for <strong>senior hard core&nbsp;sysadmins</strong> and <strong>system engineers</strong> that could be also advantage as not so many people have an indepth insight with both freebsd and <strong>fbsd jails</strong>.
</p>
<p>
	This guide walks through a practical, production-style setup: <strong>10 FreeBSD servers</strong>, each running isolated <strong>jails</strong> that host a classic <strong>LAMP stack</strong> (Linux, here replaced by<em><strong> FreeBSD, Apache, MySQL/MariaDB, PHP</strong></em>).<br />
	However still the use of companies or individuals who choose freebsd jails aim to better&nbsp;focus is on <strong>repeatability, clean architecture, and operational sanity</strong>, n<strong>ot just getting it to run once</strong>.
</p>
<h2>
	<strong>Architecture Overview of sample FBSD Cluster</strong><br />
</h2>
<p>
	<strong>Our Goal:</strong>
</p>
<ul>
<li>
		<strong>10 physical or virtual servers</strong>
	</li>
<li>
		<strong>Each server runs multiple jails</strong>
	</li>
<li>
		<strong>Each jail runs a LAMP app instance</strong>
	</li>
<li>
		<strong>Load balancing across nodes (to have a High Availability Cluster like setup)</strong>
	</li>
</ul>
<p>
	<strong>Host Setup:</strong>
</p>
<ul>
<li>
		<em><strong>2 &times; load balancer nodes (nginx or HAProxy)</strong></em>
	</li>
<li>
		<em><strong>6 &times; application nodes (Apache + PHP in jails)</strong></em>
	</li>
<li>
		<em><strong>2 &times; database nodes (MariaDB primary/replica)</strong></em>
	</li>
</ul>
<p>
	All systems run <strong>FreeBSD</strong>, using native <strong>jails</strong> for isolation.
</p>
<h2>
	<strong>1. Base FreeBSD Installation (All 10 Servers)</strong><br />
</h2>
<p>
	Install FreeBSD on each machine (minimal install is fine).
</p>
<p>
	Update system:
</p>
<blockquote>
<p>
		<strong># freebsd-update fetch install<br />
		# pkg update &amp;&amp; pkg upgrade -y</strong>
	</p>
</blockquote>
<p>
	Install base tools:
</p>
<blockquote>
<p>
		<strong># pkg install -y sudo vim bash git</strong>
	</p>
</blockquote>
<h2>
	<strong>2</strong><strong>. Install Jail Management tool (iocage)</strong><br />
</h2>
<p>
	We&rsquo;ll use <strong>iocage</strong>, a modern jail manager.
</p>
<blockquote>
<p>
		<strong># pkg install -y iocage<br />
		# sysrc iocage_enable=&quot;YES&quot;<br />
		# service iocage start</strong>
	</p>
</blockquote>
<p>
	Activate ZFS (recommended):
</p>
<blockquote>
<p>
		<strong># zpool create zroot /dev/da0</strong>
	</p>
</blockquote>
<p>
	Initialize iocage:
</p>
<blockquote>
<p>
		<strong># iocage activate zroot<br />
		# iocage fetch</strong>
	</p>
</blockquote>
<h2>
	<strong>3. Create a Reusable Jail Template</strong><br />
</h2>
<p>
	Instead of building each jail manually, create a <strong>golden template</strong>.
</p>
<blockquote>
<p>
		<strong># iocage create -n lamp-template -r 13.2-RELEASE ip4_addr=&quot;vnet0|10.0.0.10/24&quot; boot=off<br />
		# iocage start lamp-template<br />
		# iocage console lamp-template</strong>
	</p>
</blockquote>
<h2>
	<strong>4. Install LAMP Stack Inside the Jail</strong><br />
</h2>
<p>
	Inside the jail:
</p>
<h2>
	<strong>4.1. Install Apache</strong><br />
</h2>
<blockquote>
<p>
		<strong># pkg install -y apache24<br />
		# sysrc apache24_enable=&quot;YES&quot;</strong>
	</p>
</blockquote>
<h2>
	<strong>4.2. Install MariaDB</strong><br />
</h2>
<blockquote>
<p>
		<strong># pkg install -y mariadb106-server<br />
		# sysrc mysql_enable=&quot;YES&quot;</strong>
	</p>
</blockquote>
<p>
	<em>Initialize DB:</em>
</p>
<blockquote>
<p>
		<strong>service mysql-server start<br />
		mysql_secure_installation</strong>
	</p>
</blockquote>
<h2>
	<strong>4.3. Install PHP pre-compiled ports</strong><br />
</h2>
<blockquote>
<p>
		<strong># pkg install -y php82 php82-mysqli php82-mbstring php82-opcache</strong>
	</p>
</blockquote>
<p>
	<br />
	Configure Apache to use PHP:
</p>
<blockquote>
<p>
		<strong># echo &#39;LoadModule php_module libexec/apache24/libphp.so&#39; &gt;&gt; /usr/local/etc/apache24/httpd.conf<br />
		# echo &#39;AddType application/x-httpd-php .php&#39; &gt;&gt; /usr/local/etc/apache24/httpd.conf</strong>
	</p>
</blockquote>
<h2>
	<strong>5. Test LAMP&nbsp;Stack works OK</strong><br />
</h2>
<p>
	Create a test file:
</p>
<blockquote>
<p>
		<strong># echo &quot;&lt;?php phpinfo(); ?&gt;&quot; &gt; /usr/local/www/apache24/data/index.php</strong>
	</p>
</blockquote>
<p>
	Start services:
</p>
<blockquote>
<p>
		<strong>service apache24 start</strong>
	</p>
</blockquote>
<p>
	Visit the jail IP and&nbsp;confirm PHP (page output) works in <em><strong>Firefox / Chrome&nbsp;Browser</strong></em>.
</p>
<h2>
	<strong>6. Convert Template into Clones</strong><br />
</h2>
<p>
	Stop Jail and snapshot:
</p>
<blockquote>
<p>
		<strong>iocage stop lamp-template<br />
		iocage snapshot lamp-template@base</strong>
	</p>
</blockquote>
<p>
	Clone for production:
</p>
<blockquote>
<p>
		<strong>iocage clone lamp-template -n app01 ip4_addr=&quot;vnet0|10.0.0.21/24&quot;<br />
		iocage clone lamp-template -n app02 ip4_addr=&quot;vnet0|10.0.0.22/24&quot;</strong>
	</p>
</blockquote>
<p>
	Repeat across servers and once working <strong>create a small shell script </strong>to run as a cron job to <strong>create backups automated</strong>.
</p>
<p>
	Each server might run 5 up to 20 jails depending on resources.
</p>
<h2>
	<strong>7. Networking Between Jails</strong><br />
</h2>
<p>
	Use <strong>VNET</strong> for proper isolation:
</p>
<p>
	Enable bridge on host:
</p>
<blockquote>
<p>
		<strong># ifconfig bridge0 create<br />
		# ifconfig bridge0 addm em0 up</strong>
	</p>
</blockquote>
<p>
	Assign jail interfaces automatically via iocage.
</p>
<h2>
	<strong>8. &nbsp;Load Balancing Layer</strong><br />
</h2>
<p>
	On 2 dedicated nodes, install nginx:
</p>
<blockquote>
<p>
		<strong># pkg install -y nginx<br />
		# sysrc nginx_enable=&quot;YES&quot;</strong>
	</p>
</blockquote>
<p>
	Example config:
</p>
<blockquote>
<p>
		http {<br />
		&nbsp;&nbsp;&nbsp; upstream backend {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server 10.0.0.21;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server 10.0.0.22;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server 10.0.1.21;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server 10.0.1.22;<br />
		&nbsp;&nbsp;&nbsp; }
	</p>
<p>
		&nbsp;&nbsp;&nbsp; server {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen 80;
	</p>
<p>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location / {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_pass http://backend;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
		&nbsp;&nbsp;&nbsp; }<br />
		}
	</p>
</blockquote>
<h2>
	<strong>9. Database Strategy</strong><br />
</h2>
<p>
	You have few options to choose from:
</p>
<h2>
	<strong>a.&nbsp;Use Centralized DB</strong><br />
</h2>
<ul>
<li>
		Dedicated DB jails on 2 nodes
	</li>
<li>
		Primary + replica
	</li>
</ul>
<h2>
	<strong>b.&nbsp;Use Per-node DB (simpler)</strong><br />
</h2>
<ul>
<li>
		Each jail has its own MariaDB
	</li>
<li>
		Use app-level replication if needed
	</li>
</ul>
<h2>
	<strong>10. Automation Across 10 Servers</strong><br />
</h2>
<p>
	Use tools like:
</p>
<ul>
<li>
		<strong><em>Ansible</em></strong>
	</li>
<li>
		<strong><em>SSH scripts</em></strong>
	</li>
<li>
		<strong><em>ZFS replication</em></strong>
	</li>
</ul>
<p>
	Example (simple parallel execution loop) or use a set of scripts to handle updating with some <strong>Ansible Playbooks or Puppet</strong>:
</p>
<blockquote>
<p>
		<strong># for host in server{1..10}; do<br />
		&nbsp; ssh $host &quot;pkg update&quot;<br />
		done</strong>
	</p>
</blockquote>
<p>
	<strong>Few more Operational Tips to consider</strong>
</p>
<h2>
	<strong>a. Tune up setup / Do Resource management</strong><br />
</h2>
<ul>
<li>
		<em>Limit jail CPU/memory using <strong>rctl</strong></em>
	</li>
<li>
		<em>Avoid overcommitting <strong>RAM</strong></em>
	</li>
</ul>
<h2>
	<strong>b. Use Centralized Logging</strong><br />
</h2>
<ul>
<li>
		Centralize logs via syslog or<strong> ELK stack / Elasticsearch (<a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYnVpbGQtY2VudHJhbC1sb2dnaW5nLXNlcnZlci1jb2xsZWN0LXN0b3JlLXZpc3VhbGl6ZS1sb2dzLw%3D%3D&#038;feed-stats-url-post-id=18451">see previous Build Central Logging server to Collect, Stire and Visualize&nbsp;Logs</a>)</strong>
	</li>
</ul>
<h2>
	<strong>c. Do regular jail Backups</strong><br />
</h2>
<ul>
<li>
		Use ZFS snapshots to backup each of the Jails:
	</li>
</ul>
<blockquote>
<p>
		<strong># zfs snapshot zroot/iocage/jails/app01@backup<br />
		&#8230;</strong>
	</p>
</blockquote>
<h2>
	<strong>d. Tighten Security</strong><br />
</h2>
<ul>
<li>
		<strong>Disable root SSH</strong>
	</li>
<li>
		<strong>Use PF firewall on host</strong>
	</li>
<li>
		<strong>Keep jails minimal</strong>
	</li>
</ul>
<h2>
	<strong>e. Do a Further Scaling Strategy</strong><br />
</h2>
<ul>
<li>
		<strong>Add more servers -&gt;&nbsp;replicate template</strong>
	</li>
<li>
		<strong>Add more jails -&gt;&nbsp;clone snapshots</strong>
	</li>
<li>
		<strong>Scale horizontally via load balancer</strong>
	</li>
</ul>
<h2>
	<strong>Summary and Last Thoughts</strong><br />
</h2>
<p>
	<strong>When Choose FBSD Jails and when Containers</strong>
</p>
<ul>
<li>
		<strong>Use jails</strong> when you control the infrastructure, need maximum efficiency, and value simplicity (e.g., appliances, CDNs, storage systems).
	</li>
<li>
		<strong>Use containers</strong> when portability, scalability, and integration with modern DevOps workflows are critical.
	</li>
</ul>
<p>
	This setup plays to the strengths of FreeBSD jails:
</p>
<p>
	<strong>1. Performance:</strong> <em>near-native speed</em><br />
	<strong>2.Isolation:</strong> strong and predictable<br />
	<strong>3.&nbsp;Simplicity:</strong> fewer layers than container stacks
</p>
<p>
	<strong>FreeBSD jails</strong> remain a powerful and <em><strong>efficient isolation mechanism, particularly well-suited for controlled, performance-sensitive environments</strong></em>. Containers, however, dominate in modern application deployment due to their flexibility and ecosystem. The choice ultimately depends on whether you prioritize <strong>system-level control</strong> or <strong>platform-level convenience</strong>.
</p>
<p>
	You won&rsquo;t get the ecosystem of tools like <strong>Docker</strong> or <strong>Kubernetes</strong>, but you gain <strong>control, stability, and efficiency</strong>, which is exactly why companies like <strong>Netflix</strong> still rely on this model in critical infrastructure.
</p>
<p>
	&nbsp;</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-17925" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVwbG95aW5nLXNlcnZlci1tYW5hZ2luZy0xMG5vZGUtbGludXgtaW5mcmFzdHJ1Y3R1cmUtYW5zaWJsZS8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">Deploying a Server and Managing a 10-Node Linux Infrastructure with Ansible</a></li><li data-position="1" data-poid="in-6072" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWNvcHktY2xvbmUtaW5zdGFsbGVkLXBhY2thZ2VzLWZyb20tb25lLWRlYmlhbi1zZXJ2ZXItdG8tYW5vdGhlci8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">How to copy / clone installed packages from one Debian server to another</a></li><li data-position="2" data-poid="in-5131" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWxpc3QtZW5hYmxlZC12aXJ0dWFsaG9zdHMtaW4tYXBhY2hlLW9uLWdudS1saW51eC1hbmQtZnJlZWJzZC8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">How to list enabled VirtualHosts in Apache on GNU / Linux and FreeBSD</a></li><li data-position="3" data-poid="in-15901" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaGFjay1zc2gtY3VybC13Z2V0LXRlc3QtdGNwLXBvcnQtY29ubmVjdGlvbi1zdGF0ZS1yZW1vdGUtc3NoLWRucy1zbXRwLW15c3FsLWxpc3RlbmluZy1zZXJ2aWNlLXBjaS1lbnZpcm9ubWVudC1zZXJ2ZXJzLw%3D%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">Hack: Using ssh / curl or wget to test TCP port connection state to remote SSH, DNS, SMTP, MySQL or any other listening service in PCI environment servers</a></li><li data-position="4" data-poid="in-15648" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVueS1kaGNwLWFkZHJlc3MtbWFjLWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">Deny DHCP Address by MAC on Linux</a></li><li data-position="5" data-poid="in-13817" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZnJlZWJzZC1wb3N0LWluc3RhbGwtY29uZmlndXJhdGlvbi1zdGVwcy1mcmVzaC1mcmVlYnNkLWluc3RhbGwtcmVhZHktc2VydmVyLWRlc2t0b3Av&#038;feed-stats-url-post-id=18451" class="wp_rp_title">FreeBSD post install configuration steps to make on fresh FreeBSD install to make ready for server and Desktop use</a></li><li data-position="6" data-poid="in-12843" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdGlueXByb3h5LXF1aWNrLWVhc3ktcnVuLXByb3h5LWNhY2hpbmctc2VydmVyLWxpbnV4LWJzZC1tYWMv&#038;feed-stats-url-post-id=18451" class="wp_rp_title">TinyProxy Quick and Easy way to run a Proxy Caching server to protect and speed up web traffic on Linux / BSD and Mac</a></li><li data-position="7" data-poid="in-10695" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbHVja3liYWNrdXAtbGludXgtZ3VpLWJhY2t1cC1zeW5jaHJvbml6YXRpb24tdG9vbC8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">luckyBackup Linux GUI back-up and synchronization tool</a></li><li data-position="8" data-poid="in-10059" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZnJlZWJzZC0xMDAtcmVsZWFzZS1wa2dhZGQtc3Vic3RpdHV0ZWQtcGtnLw%3D%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">FreeBSD 10.0 RELEASE is out pkg_add FreeBSD default package manager to be substituted with pkg</a></li><li data-position="9" data-poid="in-9832" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3NoLXR1bm5lbC1wdXR0eS8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">How to make SSH tunnel with PuTTY terminal client</a></li><li data-position="10" data-poid="in-6452" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc2NyaXB0LXRvLWF1dG9tYXRpY2FsbHktY2hhbmdlLWN1cnJlbnQtbXlzcWwtc2VydmVyLWluLXdwLWNvbmZpZy1waHAtdG8tYW5vdGhlci1teXNxbC1ob3N0LXRvLW1pbmltaXplLXdvcmRwcmVzcy1hbmQtam9vbWxhLWRvd250aW1lcy8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">Script to Automatically change current MySQL server in wp-config.php to another MySQL host to minimize WordPress and Joomla downtimes</a></li><li data-position="11" data-poid="in-6273" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG9zdC1uYW1lLWlzLWJsb2NrZWQtYmVjYXVzZS1vZi1tYW55LWNvbm5lY3Rpb24tZXJyb3JzLXVuYmxvY2std2l0aC1teXNxbGFkbWluLWZsdXNoLWhvc3RzLw%3D%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">&#8216;host-name&#8217; is blocked because of many connection errors; unblock with &#8216;mysqladmin flush-hosts&#8217;</a></li><li data-position="12" data-poid="in-6148" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLXNvbHZlLWluY29ycmVjdC1rZXktZmlsZS1mb3ItdGFibGUtdG1wc3FsXzkzMTUtbXlpLXRyeS10by1yZXBhaXItaXQtbXlzcWwtc3RhcnQtdXAtZXJyb3Iv&#038;feed-stats-url-post-id=18451" class="wp_rp_title">How to solve &#8220;Incorrect key file for table &#8216;/tmp/#sql_9315.MYI&#8217;; try to repair it&#8221; mysql start up error</a></li><li data-position="13" data-poid="in-5954" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXV0by1yZXN0YXJ0LWFwYWNoZS1vbi1oaWdoLXNlcnZlci1sb2FkLWJhc2gtc2hlbGwtc2NyaXB0LWZpeGluZy1hcGFjaGUtc2VydmVyLXRlbXBvcmFsLW92ZXJsb2FkLWlzc3Vlcy8%3D&#038;feed-stats-url-post-id=18451" class="wp_rp_title">Auto restart Apache on High server load (bash shell script) &#8211; Fixing Apache server temporal overload issues</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18451" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/building-10server-freebsd-jail-cluster-running-lamp-linux-apache-mysql-perl-php-python-stack/">Building a 10-Server FreeBSD Jail Cluster Running a LAMP (Linux / Apache / MySQL / Perl / PHP / Python) Stack</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/building-10server-freebsd-jail-cluster-running-lamp-linux-apache-mysql-perl-php-python-stack/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>Installing Jellyfin on Linux to have abuilt in Own self hosted open source Media solution</title>
		<link>https://www.pc-freak.net/blog/installing-jellyfin-linux-abuilt-open-source-media-solution/</link>
					<comments>https://www.pc-freak.net/blog/installing-jellyfin-linux-abuilt-open-source-media-solution/#respond</comments>
		
		
		<pubDate>Mon, 23 Mar 2026 13:32:18 +0000</pubDate>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux and FreeBSD Desktop]]></category>
		<category><![CDATA[Linux multimedia]]></category>
		<category><![CDATA[Video Streaming]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[choices]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[Configure Caddy]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[Disable Aggressive Metadata Scanning]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[during]]></category>
		<category><![CDATA[Filesystem Layout Matters]]></category>
		<category><![CDATA[fine]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Important]]></category>
		<category><![CDATA[Install Docker Minimal]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[Jeffylin Linux]]></category>
		<category><![CDATA[Keep Jellyfin Boring]]></category>
		<category><![CDATA[linux?]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[pull]]></category>
		<category><![CDATA[Restart]]></category>
		<category><![CDATA[roll]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[Start Jellyfin]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[time]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18384</guid>

					<description><![CDATA[<p>If you a Linux realm user the requirements to have a convenient entertainment with *unix grows every day thus setting up a home media hub on a personal server and enjoying some movie streams, store movies, music and photos becomes a must.&#160; As of today one common tool that enables you that that is choose [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/installing-jellyfin-linux-abuilt-open-source-media-solution/">Installing Jellyfin on Linux to have abuilt in Own self hosted open source Media solution</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="install-jellyfin-media-server-docker-linux-logo" src="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux-logo1.png" style="width: 480px; height: 270px;" />
</p>
<p>
	If you a Linux realm user the requirements to have a convenient entertainment with *unix grows every day thus setting up a home media hub on a personal server and enjoying some movie streams, store movies, music and photos becomes a must.&nbsp;<br />
	As of today one common tool that enables you that that is choose by most Linux enthusiasts is Jellyfin.
</p>
<p>
	<em><strong>&quot;Jellyfin is a free, open-source media server that lets you organize, stream, and access your movies, TV shows, music, and photos from anywhere.<br />
	Jellyfin also can serve media to DLNA and Chromecast-enabled devices&quot;</strong></em>
</p>
<p>
	Running your own advanced media server becomes easiy task as Jellyfin is often a preferred choice to the older MiniDLNA (see my previous <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY29uZmlndXJlLW1lZGlhLXN0cmVhbWluZy1taW5pZGxuYS1saW51eC1zZXJ2ZXItYWNjZXNzLWRhdGEtc21hcnQtdHYv&#038;feed-stats-url-post-id=18384">Configure own Media streaming minidlna Linux server to access data from your Smart TV</a>). By using Docker, deploying powerful self-hosted applications becomes faster and easily reproduce across various Linux environments (e.g. do it multiple time for friends or companies).&nbsp;
</p>
<p>
	<br />
	&nbsp;By leveraging Docker, you can isolate Jellyfin from your host system, simplify updates, and ensure consistent performance across different Linux distributions.&quot;
</p>
<p>
	It is possible to install jellyfin via both using common one by one component classical way or just roll on the docker image, in this article i&#39;ll show the docker install, as this will save you a lot of time and hussles to configure the Media server.
</p>
<p>
	The main advantages to use the docker image are:<br />
	It is more:
</p>
<ul>
<li>
		predictable
	</li>
<li>
		easily upgradeable
	</li>
<li>
		easy to debug
	</li>
<li>
		easy to roll back and if necessery remove
	</li>
</ul>
<p>
	In this short guide, we&#39;ll show how to install and run Jellyfin on a Linux system using Docker image an approach that avoids complex manual setup while providing a clean, portable easiiy to manage environment in minutes.
</p>
<p>
	Here&rsquo;s how I set it up:<br />
	&nbsp;
</p>
<h2>
	<strong>1.&nbsp;Install Docker Minimal release</strong><br />
</h2>
<p>
	On <em>Debian / Ubuntu</em> and other Deb Linux derivatives:
</p>
<blockquote>
<p>
		<strong># apt install docker.io docker-compose-plugin</strong>
	</p>
</blockquote>
<blockquote>
<p>
		<strong># systemctl enable &#8211;now docker</strong>
	</p>
</blockquote>
<p>
	Verify:
</p>
<blockquote>
<p>
		<strong># docker version</strong>
	</p>
</blockquote>
<p>
	If Docker doesn&rsquo;t start, fix <em>that first</em>. Don&rsquo;t continue until it works.
</p>
<h2>
	<strong>2.&nbsp;Create a Dedicated Jellyfin User</strong><br />
</h2>
<p>
	This avoids permission chaos later.
</p>
<blockquote>
<p>
		<strong># useradd -r -s /usr/sbin/nologin jellyfin</strong>
	</p>
</blockquote>
<p>
	Create directories:
</p>
<blockquote>
<p>
		<strong># mkdir -p /srv/jellyfin/{config,cache}</strong>
	</p>
<p>
		<strong># mkdir -p /srv/media</strong>
	</p>
</blockquote>
<p>
	Set ownership:
</p>
<blockquote>
<p>
		<strong># chown -R jellyfin:jellyfin /srv/jellyfin</strong>
	</p>
</blockquote>
<p>
	<br />
	Media directory permissions depend on how files are written. Read-only is fine for Jellyfin:
</p>
<blockquote>
<p>
		<strong># chmod -R 755 /srv/media</strong>
	</p>
</blockquote>
<h2>
	<strong>3. Create Docker Compose File</strong><br />
</h2>
<p>
	To have latetest docker Jellyfin image, Create <strong><em>docker-compose.yml</em></strong>:
</p>
<blockquote>
<p>
		<strong># cd /srv/jellyfin</strong>
	</p>
<p>
		<strong># vim docker-compose.yml</strong>
	</p>
</blockquote>
<blockquote>
<p>
		Contents:
	</p>
<p>
		services:
	</p>
<p>
		&nbsp;<em> jellyfin:</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp; image: jellyfin/jellyfin:latest</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp; container_name: jellyfin</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp; user: &quot;1000:1000&quot;</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp; network_mode: bridge</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp; ports:</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211; &quot;8096:8096&quot;</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp; volumes:</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211; ./config:/config</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211; ./cache:/cache</em>
	</p>
<p>
		<em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211; /srv/media:/media:ro</em>
	</p>
<p>
		&nbsp;&nbsp;&nbsp; restart: unless-stopped
	</p>
</blockquote>
<p>
	<strong>Important notes:</strong>
</p>
<ul>
<li>
		<strong>No random UID/GID guessing</strong> &mdash; set it deliberately
	</li>
<li>
		Media is <strong>read-only</strong>
	</li>
<li>
		Config lives on the host, not inside the container
	</li>
</ul>
<p>
	If UID 1000 isn&rsquo;t correct on your system, check with:
</p>
<blockquote>
<p>
		<strong># id jellyfin</strong>
	</p>
</blockquote>
<h2>
	<strong>4.&nbsp;Start Jellyfin</strong><br />
</h2>
<blockquote>
<p>
		<strong># docker compose up -d</strong>
	</p>
</blockquote>
<p>
	Check logs:
</p>
<blockquote>
<p>
		<strong># docker logs jellyfin</strong>
	</p>
</blockquote>
<p>
	If it fails here take the time to closely debug what is gong and&nbsp;fix it <strong>now before proceeding to next steps.</strong>
</p>
<p>
	<strong>5.&nbsp;Initial Setup (Browser)</strong>
</p>
<p>
	Open:
</p>
<blockquote>
<p>
		<em><strong>http://server-ip:8096</strong></em>
	</p>
</blockquote>
<p>
	During setup:
</p>
<ul>
<li>
		Create a <strong>local user</strong>, not remote auth
	</li>
<li>
		<em>Disable automatic metadata downloads if bandwidth matters</em>
	</li>
<li>
		Point libraries to /media
	</li>
</ul>
<p>
	Don&rsquo;t rush through this. Jellyfin remembers your choices.
</p>
<p>
	<img decoding="async" alt="" src="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux1.png" /><img decoding="async" alt="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux1" src="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux1.png" style="height: 406px; width: 640px;" />
</p>
<p>
	<img decoding="async" alt="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux2" src="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux2.png" style="width: 640px; height: 406px;" />
</p>
<p>
	<img decoding="async" alt="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux3" src="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux3.png" style="width: 640px; height: 406px;" />
</p>
<p>
	<img decoding="async" alt="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux4" src="https://www.pc-freak.net/images/install-jellyfin-media-server-docker-linux4.png" style="width: 640px; height: 406px;" />
</p>
<h2>
	<strong>6.&nbsp;Hardware Acceleration ( to improve performance )</strong><br />
</h2>
<p>
	If your laptop has Intel graphics, install:
</p>
<blockquote>
<p>
		<strong># apt install intel-media-va-driver vainfo</strong>
	</p>
</blockquote>
<p>
	Verify:
</p>
<blockquote>
<p>
		<strong># vainfo</strong>
	</p>
</blockquote>
<p>
	<br />
	Then add to <strong>docker-compose.yml</strong>
</p>
<blockquote>
<p>
		devices:
	</p>
<p>
		<strong>&nbsp; &#8211; /dev/dri:/dev/dri</strong>
	</p>
</blockquote>
<p>
	Restart:
</p>
<blockquote>
<p>
		<strong># docker compose down</strong>
	</p>
<p>
		<strong># docker compose up -d</strong>
	</p>
</blockquote>
<p>
	This massively reduces CPU usage during transcoding.
</p>
<h2>
	<strong>7.&nbsp;Keep Jellyfin docker image Updated</strong><br />
</h2>
<p>
	To <em><strong>Apply latest Jellifyn Docker image Updates</strong></em>, run:
</p>
<blockquote>
<p>
		<strong># docker compose pull</strong>
	</p>
<p>
		<strong># docker compose up -d</strong>
	</p>
</blockquote>
<p>
	Backup:
</p>
<p>
	In case if it breaks for a reason and you have to quickly rebuild always keep backup of:
</p>
<ul>
<li>
		<strong>/srv/jellyfin/config</strong>
	</li>
<li>
		Your Data (media) should already be stored on external NAS or NFS
	</li>
</ul>
<p>
	Say&nbsp;Jellyfin breaks after an update, you can roll back the image copy over the config and enjoy.
</p>
<h2>
	<strong>8. Install and use Jeffilyn Media server extra productivity plugins</strong><br />
</h2>
<p>
	Once the server is up and running you can further extend it as Jeffilyn supports a <strong>number of helpful plugins</strong>.<br />
	A three common plugins of choice people do use together with it you might want to try are:
</p>
<ul>
<li>
		Inline TODOs: Automatically collects all tasks marked in your notes into one summary page.
	</li>
<li>
		Key Promoter X: An IntelliJ plugin that teaches you keyboard shortcuts by showing a popup every time you use the mouse for a command.
	</li>
<li>
		Simple Backup: Widely considered an essential plugin for Joplin to prevent data loss.
	</li>
</ul>
<p>
	&nbsp;
</p>
<h2>
	<strong>Common Mistakes to Avoid durinb build&nbsp;</strong><br />
</h2>
<p>
	<em>Double check the install for&nbsp;authorization / permission issues:</em>
</p>
<ul>
<li>
		Don&#39;t run Jellyfin as root
	</li>
<li>
		Don&#39;t let it have permission to&nbsp; write to media directories
	</li>
<li>
		Again Add firewall to prevent&nbsp;port 8096 direct exposure to the internet
	</li>
<li>
		Don&#39;t mix installs and Docker installs
	</li>
</ul>
<p>
	If you want it public-facing (service to be accessible on the Internet), put it <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc2V0dXAtbmdpbngtcmV2ZXJzZS1wcm94eS1saW51eC1ob3d0by8%3D&#038;feed-stats-url-post-id=18384">behind a reverse proxy be it </a><strong><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc2V0dXAtbmdpbngtcmV2ZXJzZS1wcm94eS1saW51eC1ob3d0by8%3D&#038;feed-stats-url-post-id=18384">NGINX</a>&nbsp;or Haproxy (see <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcHJvdGVjdC1hcHBsaWNhdGlvbi1zZXJ2ZXJzLXNxbC1pbmplY3RzLXJlZGlyZWN0aW9uLWhhbmRsaW5nLWNsaWNrLWphY2tpbmctaGFwcm94eS1sb2FkLWJhbGFuY2VyLw%3D%3D&#038;feed-stats-url-post-id=18384">my previous how to protect Applications from SQL Inject, Redirects and Hijacking with Haproxy Load Balancer</a>)&nbsp;or <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXBhY2hlLXJldmVyc2UtcHJveHktdG9tY2F0LXJldmVyc2UtcHJveHlpbmcv&#038;feed-stats-url-post-id=18384">Apache</a></strong><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXBhY2hlLXJldmVyc2UtcHJveHktdG9tY2F0LXJldmVyc2UtcHJveHlpbmcv&#038;feed-stats-url-post-id=18384">&nbsp;Reverse Proxy</a> and make sure TLS is configured. That&rsquo;s a great topic for a&nbsp;<strong>separate article</strong> for a reason.
</p>
<p>
	<strong>What you should have achieved ?</strong>With this few steps you&#39;ll&nbsp; Have a Jeffylin Linux self &#8211; hosted&nbsp;Media Solution with Clear separation of data, config, and software.<br />
	The docker setup&nbsp;is easy to update destroy and if necessery rebuilt.&nbsp;<br />
	To access the Media Library just setup you can use <strong>Jeffylin Web client / Jeffilyn Media Player desktop (stand-alone) app or the Apps available for Android and various versions of iOS and even use it with a client on LG TVs.</strong><br />
	&nbsp;
</p>
<ul>
</ul>
<p>
	&nbsp;</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-15989" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdXBkYXRlLXJldmVyc2Utc3NoZC1jb25maWctY3JvbmpvYi1yZXZlcnQtc3NoZC1yZWxvYWQtaXNzdWVzLw%3D%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Update reverse sshd config with cronjob to revert if sshd reload issues</a></li><li data-position="1" data-poid="in-14863" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXV0b21hdGljLXNlcnZlci1uZXR3b3JrLXJlc3RhcnQtc2NyaXB0LXJlYm9vdC1zY3JpcHQtYmFzZWQtcGluZy10aW1lb3V0LWdhdGV3YXkv&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Automatic network restart and reboot Linux server script if ping timeout to gateway is not responding as a way to reduce connectivity downtimes</a></li><li data-position="2" data-poid="in-14811" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYnVpbGQtaW5zdGFsbC1kb2NrZXItc3F1aWQtb3Blbi1wcm94eS1pbWFnZS1rdWJlcm5ldGVzLWNsdXN0ZXIv&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Build and install Docker Squid Open Proxy image on Kubernetes cluster</a></li><li data-position="3" data-poid="in-10160" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbHZtLWV4dGVuZC1wYXJ0aXRpb24taG93dG8tY2hlY2stbHZtLXBhcnRpdGlvbi1leHRlbmRhYmxlLw%3D%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">LVM extend partition Linux howto and how to check if Logical Volume Manager  partition is extendable</a></li><li data-position="4" data-poid="in-18416" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmVjcmVhdGUtY29ycnVwdGVkLXdpbmRvd3MtdXNlci1wcm9maWxlLXNvbHZlLXdpbmRvd3Mtc2lnbmluZy1zaWduaW5nLWxvb3BzLw%3D%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">How to Recreate a Corrupted Windows User Profile to Solve Windows Signing In / Signing Out Loops</a></li><li data-position="5" data-poid="in-18106" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1raWJhbmEtbG9nLXZpc3VhbGl6YXRpb24v&#038;feed-stats-url-post-id=18384" class="wp_rp_title">How to Install and Use Kibana for Log Visualization</a></li><li data-position="6" data-poid="in-18233" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc2VjdXJlLXNzaC1hY2Nlc3MtMjAyNS1wcmFjdGljZXMtbGludXgtYWRtaW5zLw%3D%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">How to Secure SSH Access in 2025: Best Practices for Linux Admins</a></li><li data-position="7" data-poid="in-18134" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvb3B0aW1pemluZy1saW51eC1zZXJ2ZXItcGVyZm9ybWFuY2UtZGlnaXRhbC1taW5pbWFsaXNtLXJ1bm5pbmctc2VydmljZXMtc3lzdGVtLWNsZWFudXAv&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Optimizing Linux Server Performance Through Digital Minimalism and Running Services and System Cleanup</a></li><li data-position="8" data-poid="in-17925" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVwbG95aW5nLXNlcnZlci1tYW5hZ2luZy0xMG5vZGUtbGludXgtaW5mcmFzdHJ1Y3R1cmUtYW5zaWJsZS8%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Deploying a Server and Managing a 10-Node Linux Infrastructure with Ansible</a></li><li data-position="9" data-poid="in-17451" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVidWdnaW5nLXJvdXRpbmctbmV0d29yay1pc3N1ZXMtbGludXgtY29tbW9uLWFwcHJvYWNoZXMv&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Debugging routing and network issues on Linux common approaches. A step by step guide to find out why routing or network service fails</a></li><li data-position="10" data-poid="in-17388" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1zcGVjaWZpYy16YWJiaXhhZ2VudC12ZXJzaW9uLWRvd25ncmFkZS16YWJiaXgtYWdlbnQtY2xpZW50LWV4YWN0LXByZWZlcnJlZC1ycG0tdmVyc2lvbi1jZW50b3MtZmVkb3JhLXJoZWwtbGludXgtcmVwby8%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Install specific zabbix-agent version / Downgrade Zabbix Agent client to exact preferred old RPM version on CentOS / Fedora / RHEL Linux from repo</a></li><li data-position="11" data-poid="in-17156" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGludXgtZXh0ZW5kaW5nLWxpZmUtdGltZS1kYW1hZ2VkLWhhcmQtZHJpdmUtc2VydmVyLXRyaWNrcy1mb3JjZS1mY3NrLXJlYm9vdHJlYWRvbmx5LWZpbGUtc3lzdGVtLWVycm9yLXNvbHV0aW9ucy8%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Linux extending life time for a damaged hard drive server tricks on a live server. Force fcsk on next reboot.Read-only file system error solutions</a></li><li data-position="12" data-poid="in-16560" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGlzdC1maXgtZmFpbGVkLXN5c3RlbWQtZmFpbGVkLXNlcnZpY2VzLWxpbnV4LW9zLXVwZ3JhZGUv&#038;feed-stats-url-post-id=18384" class="wp_rp_title">List and fix failed systemd failed services after Linux OS upgrade and how to get full info about systemd service from jorunal log</a></li><li data-position="13" data-poid="in-15547" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGlzYWJsZS1sb2dnaW5nLWZvci1hbGwtdmlydHVhbGhvc3RzLW5naW54LWFwYWNoZS8%3D&#038;feed-stats-url-post-id=18384" class="wp_rp_title">Linux: Howto Disable logging for all VirtualHosts on Apache and NGINX Webservers one liner</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18384" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/installing-jellyfin-linux-abuilt-open-source-media-solution/">Installing Jellyfin on Linux to have abuilt in Own self hosted open source Media solution</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/installing-jellyfin-linux-abuilt-open-source-media-solution/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>Build a Central Linux Logging Server to Collect, Store, and Visualize All Infrastructure node Logs</title>
		<link>https://www.pc-freak.net/blog/build-central-logging-server-collect-store-visualize-logs/</link>
					<comments>https://www.pc-freak.net/blog/build-central-logging-server-collect-store-visualize-logs/#respond</comments>
		
		
		<pubDate>Fri, 20 Mar 2026 19:47:32 +0000</pubDate>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Access Kibana]]></category>
		<category><![CDATA[Configure Filebeat]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[debian linux]]></category>
		<category><![CDATA[enable]]></category>
		<category><![CDATA[GREEDYDATA]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[Index Lifecycle Management Rotate]]></category>
		<category><![CDATA[Install Logstash Optional]]></category>
		<category><![CDATA[Install Prerequisites]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[SYSLOGTIMESTAMP]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[wget]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18443</guid>

					<description><![CDATA[<p>If you manage multiple servers or collection of multiple services on many nodes within a company server infrastructure, you know the pain of dealing with logs scattered to multiple locations across systems. It is really crazy and takes up a lot of time and drains energy. One server shows nothing, another rotated logs yesterday, and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/build-central-logging-server-collect-store-visualize-logs/">Build a Central Linux Logging Server to Collect, Store, and Visualize All Infrastructure node Logs</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="build-a-central-linux-logging-server-to-collect-store-and-visualize-all-infrastructure-node-logs" src="https://www.pc-freak.net/images/build-a-central-linux-logging-server-to-collect-store-and-visualize-all-infrastructure-node-logs.jpg" style="width: 480px; height: 243px;" /><br />
	If you manage <strong>multiple servers</strong> or c<strong>ollection of multiple services on many nodes within a company server infrastructure,</strong> you know the pain of dealing with logs scattered to multiple locations across systems. It is really crazy and takes up a lot of time and drains energy.<br />
	One server shows nothing, another rotated logs yesterday, and your app logs are buried somewhere in <strong>/var/log/app</strong>.
</p>
<p>
	A <strong>central logging server</strong> solves this problem, as <strong><em>all logs collected, stored</em></strong>, and accessible in <strong><em>one single place</em></strong>.
</p>
<p>
	In this article will present shortly how to build one using <strong>ELK Stack + Beats</strong> (<em>lightweight agents</em>) on a Linux server.
</p>
<h2>
	<strong>1. Architecture Overview</strong><br />
</h2>
<p>
	Here&rsquo;s the typical flow looks like this:
</p>
<p>
	<em>[ Servers / Apps ] &#8211;> [ Filebeat / Metricbeat ] &#8211;> [ Logstash ] &#8211;> [ Elasticsearch ] &#8211;> [ Kibana / Grafana (Visualization) ]</em>
</p>
<ul>
<li>
		<strong>Beats</strong> &rarr; Lightweight log shippers installed on all machines.
	</li>
<li>
		<strong>Logstash</strong> &rarr; Optional pipeline for parsing, filtering, and enriching logs.
	</li>
<li>
		<strong>Elasticsearch</strong> &rarr; Storage and search engine.
	</li>
<li>
		<strong>Kibana / Grafana</strong> &rarr; Visualization dashboards.
	</li>
</ul>
<h2>
	<strong>2. Prepare Your Central Logging Server</strong><br />
</h2>
<p>
	<strong>Requirements:</strong>
</p>
<ul>
<li>
		Debian Linux 12 recommended / Ubuntu or Fedora RHEL
	</li>
<li>
		At least 4 GB RAM (8+ GB for production ELK)
	</li>
<li>
		Plan enough SSD storage (logs grow fast)
	</li>
<li>
		Open ports: 5044 for Beats, 9200 for Elasticsearch, 5601 for Kibana
	</li>
</ul>
<p>
	<strong>Install Prerequisites</strong>
</p>
<p>
	#<strong> apt update &amp;&amp; sudo apt install openjdk-17-jdk wget curl apt-transport-https -y</strong>
</p>
<p>
	<strong>ELK</strong> requires Java, <strong><em>OpenJDK 17</em></strong> should work fine.
</p>
<h2>
	<strong>3. Install Elasticsearch</strong><br />
</h2>
<blockquote>
<p>
		<em><strong># wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-amd64.deb<br />
		# dpkg -i elasticsearch-8.11.1-amd64.deb<br />
		# systemctl enable elasticsearch<br />
		# systemctl start elasticsearch</strong></em>
	</p>
</blockquote>
<p>
	<br />
	<strong>Check ElasticSearch server is running:</strong>
</p>
<blockquote>
<p>
		<strong># curl -X GET &quot;localhost:9200/&quot;</strong>
	</p>
</blockquote>
<p>
	That should see the Cluster info in JSON format.
</p>
<h2>
	<strong>4. Install Kibana</strong><br />
</h2>
<blockquote>
<p>
		<strong># wget https://artifacts.elastic.co/downloads/kibana/kibana-8.11.1-amd64.deb<br />
		# dpkg -i kibana-8.11.1-amd64.deb<br />
		# systemctl enable kibana<br />
		# systemctl start kibana</strong>
	</p>
</blockquote>
<p>
	<br />
	Access Kibana URL in browser:
</p>
<blockquote>
<p>
		<em>http://&lt;server-ip&gt;:5601</em>
	</p>
</blockquote>
<h2>
	<strong>5. Install Logstash to Process logs before sending to Elasticserch</strong><br />
</h2>
<blockquote>
<p>
		<strong># wget https://artifacts.elastic.co/downloads/logstash/logstash-8.11.1.deb<br />
		# dpkg -i logstash-8.11.1.deb<br />
		#&nbsp;systemctl enable logstash<br />
		# systemctl start logstash</strong>
	</p>
</blockquote>
<p>
	<strong>Logstash </strong>allows filtering and structuring logs before sending them to Elasticsearch. Example simple pipeline:
</p>
<blockquote>
<p>
		<strong># vim /etc/logstash/conf.d/syslog.conf</strong>
	</p>
<p>
		<em>input {<br />
		&nbsp; beats {<br />
		&nbsp;&nbsp;&nbsp; port =&gt; 5044<br />
		&nbsp; }<br />
		}<br />
		filter {<br />
		&nbsp; grok { match =&gt; { &quot;message&quot; =&gt; &quot;%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:host} %{DATA:program}: %{GREEDYDATA:message}&quot; } }<br />
		}<br />
		output {<br />
		&nbsp; elasticsearch {<br />
		&nbsp;&nbsp;&nbsp; hosts =&gt; [&#8220;localhost:9200&#8221;]<br />
		&nbsp;&nbsp;&nbsp; index =&gt; &quot;central-logs-%{+YYYY.MM.dd}&quot;<br />
		&nbsp; }<br />
		}</em>
	</p>
</blockquote>
<p>
	<strong>Start Logstash</strong>
</p>
<blockquote>
<p>
		<strong># systemctl restart logstash</strong>
	</p>
</blockquote>
<h2>
	<strong>6. Install Beats on Client Machines</strong><br />
</h2>
<p>
	On each server you want to monitor:
</p>
<blockquote>
<p>
		<strong># apt install filebeat metricbeat -y</strong>
	</p>
</blockquote>
<p>
	<br />
	<strong>Configure Filebeat</strong>
</p>
<p>
	Edit config
</p>
<blockquote>
<p>
		<strong># vim &nbsp;/etc/filebeat/filebeat.yml</strong>
	</p>
</blockquote>
<p>
	Set the output to your central server:
</p>
<p>
	output.logstash:
</p>
<blockquote>
<p>
		<strong><em>hosts: [&quot;</em></strong><central-server-ip><strong><em>:5044&quot;]</em></strong></central-server-ip>
	</p>
</blockquote>
<p>
	Start the agent:
</p>
<blockquote>
<p>
		<strong>systemctl enable filebeat<br />
		systemctl start filebeat</strong>
	</p>
</blockquote>
<p>
	Do the same for Metricbeat if you want metrics like CPU, memory, disk.
</p>
<h2>
	<strong>7. Create Dashboards in Kibana or Grafana</strong><br />
</h2>
<ul>
<li>
		In <strong>Kibana</strong>, use <strong>Discover</strong> to view logs.
	</li>
<li>
		Create visualizations for <em>errors, warnings, top endpoints</em>, etc.
	</li>
<li>
		Use <strong>Grafana</strong> if you want <em>multi-source dashboards, combining logs and metrics</em>.
	</li>
</ul>
<h2>
	<strong>8. Optional: Secure Your Logging Server</strong><br />
</h2>
<ul>
<li>
		Enable <strong>TLS/SSL</strong> in Beats and Elasticsearch.
	</li>
<li>
		Use <strong>firewall rules</strong> to restrict access.
	</li>
<li>
		Create dedicated <strong>users</strong> in Elasticsearch for log access.
	</li>
</ul>
<h2>
	<strong>9. Maintenance Tips</strong><br />
</h2>
<ul>
<li>
		<strong>Index Lifecycle Management</strong> &rarr; Rotate daily and delete old logs automatically.
	</li>
<li>
		<strong>Monitor disk usage</strong> &rarr; Logs grow fast. SSDs are better.
	</li>
<li>
		<strong>Filter noise</strong> &rarr; Don&rsquo;t ship debug logs unless needed.
	</li>
<li>
		<strong>Backup Elasticsearch</strong> &rarr; Especially if logs are critical.
	</li>
</ul>
<h2>
	<strong>Sum Up, how it&nbsp;Works</strong><br />
</h2>
<ul>
<li>
		<em>All logs are centralized &rarr; easier troubleshooting.</em>
	</li>
<li>
		<em>Scalable &rarr; add new servers, Beats handle shipping automatically.</em>
	</li>
<li>
		<em>Searchable &rarr; find errors instantly using Elasticsearch.</em>
	</li>
<li>
		<em>Visual &rarr; dashboards in Kibana/Grafana give real-time insight.</em>
	</li>
</ul>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-18031" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1jaGF0Z3B0LWRlYmlhbi1saW51eC1zbmFwLw%3D%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How To Install ChatGPT on Debian Linux with snap</a></li><li data-position="1" data-poid="in-18134" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvb3B0aW1pemluZy1saW51eC1zZXJ2ZXItcGVyZm9ybWFuY2UtZGlnaXRhbC1taW5pbWFsaXNtLXJ1bm5pbmctc2VydmljZXMtc3lzdGVtLWNsZWFudXAv&#038;feed-stats-url-post-id=18443" class="wp_rp_title">Optimizing Linux Server Performance Through Digital Minimalism and Running Services and System Cleanup</a></li><li data-position="2" data-poid="in-17831" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZW5hYmxlLWRlYmlhbi1saW51eC1hdXRvbWF0aWMtdXBkYXRlcy1vcy1zZWN1cml0eS1kYXRlLw%3D%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">Enable Debian Linux automatic updates to keep latest OS Patches / Security Up to Date</a></li><li data-position="3" data-poid="in-12843" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdGlueXByb3h5LXF1aWNrLWVhc3ktcnVuLXByb3h5LWNhY2hpbmctc2VydmVyLWxpbnV4LWJzZC1tYWMv&#038;feed-stats-url-post-id=18443" class="wp_rp_title">TinyProxy Quick and Easy way to run a Proxy Caching server to protect and speed up web traffic on Linux / BSD and Mac</a></li><li data-position="4" data-poid="in-18106" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1raWJhbmEtbG9nLXZpc3VhbGl6YXRpb24v&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How to Install and Use Kibana for Log Visualization</a></li><li data-position="5" data-poid="in-18270" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvb3B0aW1pemUtZGViaWFuLWxpbnV4LWNvbXB1dGVycy1pbXByb3ZlZC1zcGVlZC1wZXJmb3JtYW5jZS1zdGFiaWxpdHkv&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How to Optimize Debian Linux on old Computers  to Get improved overall Speed, Performance and Stability</a></li><li data-position="6" data-poid="in-18098" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1hdWRpdGQtc3lzdGVtLWF1ZGl0aW5nLWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How to Install and Use auditd for System Security Auditing on Linux</a></li><li data-position="7" data-poid="in-17891" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1zZXQtbmZzLXNlcnZlci1saW51eC8%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How to Install and Set Up an NFS Server network Shares on on Linux to easify data transfer across multiple hosts</a></li><li data-position="8" data-poid="in-16324" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1lbmFibGUtc3lzc3RhdHMtaW8tZGlzay1jcHUtbW9uaXRvcmluZy1jb25zb2xlLXN1aXRlLXJlZGhhdC04My8%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">Install and enable Sysstats IO / DIsk / CPU / Network monitoring console suite on Redhat 8.3, Few sar useful command examples</a></li><li data-position="9" data-poid="in-15845" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93dG8tdXBncmFkZS1pYm0tc3BlY3RydW0tcHJvdGVjdC10aXZvbGktdHNtLTctODE4LTgxOC04MTExLWNlbnRvcy1yZWRoYXQtbGludXgv&#038;feed-stats-url-post-id=18443" class="wp_rp_title">Howto Upgrade IBM Spectrum Protect Backup Client TSM  7.X to 8.1.8,  Update Tivoli 8.1.8 to 8.1.11 on CentOS and Redhat Linux</a></li><li data-position="10" data-poid="in-15218" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcnN5bmMtY29weS1maWxlcy1yb290LXByaXZpbGVnZXMtc2VydmVycy1yb290LXN1cGVydXNlci1hY2NvdW50LWRpc2FibGVkLw%3D%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">Rsync copy files with root privileges between servers with root superuser account disabled</a></li><li data-position="11" data-poid="in-12892" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYWRkaW5nLWxldmVsLXNlY3VyaXR5LXNoYXJlZC1saW51eC13ZWJob3N0aW5nLXNlcnZlci1zdXBocC8%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">Adding another level of security to your shared Debian Linux webhosting server with SuPHP</a></li><li data-position="12" data-poid="in-6435" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWNvbXBsZXRlbHktZGlzYWJsZS1yZXBsaWNhdGlvbi1pbi1teXNxbC1zZXJ2ZXItNS0xLTYxLW9uLWRlYmlhbi1nbnUtbGludXgv&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How to completely disable Replication in MySQL server 5.1.61 on Debian GNU / Linux</a></li><li data-position="13" data-poid="in-6072" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWNvcHktY2xvbmUtaW5zdGFsbGVkLXBhY2thZ2VzLWZyb20tb25lLWRlYmlhbi1zZXJ2ZXItdG8tYW5vdGhlci8%3D&#038;feed-stats-url-post-id=18443" class="wp_rp_title">How to copy / clone installed packages from one Debian server to another</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18443" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/build-central-logging-server-collect-store-visualize-logs/">Build a Central Linux Logging Server to Collect, Store, and Visualize All Infrastructure node Logs</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/build-central-logging-server-collect-store-visualize-logs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>Linux Bash Logging log everything. Prevent user from delete his history and keep record of every command User ever Run</title>
		<link>https://www.pc-freak.net/blog/bash-logging-record-command-run/</link>
					<comments>https://www.pc-freak.net/blog/bash-logging-record-command-run/#respond</comments>
		
		
		<pubDate>Tue, 17 Mar 2026 15:01:35 +0000</pubDate>
				<category><![CDATA[Curious Facts]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[bashrc]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[configured]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[Documentation Reuse]]></category>
		<category><![CDATA[doesn]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[gurus]]></category>
		<category><![CDATA[HISTFILESIZE]]></category>
		<category><![CDATA[HISTTIMEFORMAT]]></category>
		<category><![CDATA[Linux Bash Logging]]></category>
		<category><![CDATA[linux user]]></category>
		<category><![CDATA[Load]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[Pro Tip]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[rsyslog]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[trap]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[variables]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18151</guid>

					<description><![CDATA[<p>Whether you&#39;re managing servers, writing scripts, or troubleshooting complex systems, one of the most valuable tools at your disposal is your command history. But the default Bash history has serious limitations: it&#8217;s easy to lose, doesn&#39;t timestamp by default, and doesn&#39;t log everything in real time. What if you could keep a permanent, timestamped, real-time [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/bash-logging-record-command-run/">Linux Bash Logging log everything. Prevent user from delete his history and keep record of every command User ever Run</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="make_bash_history_permanent-how-to-keep-every-user-command-forever-prevent-users-from-deleting-their-bash-history-on-linux" src="https://www.pc-freak.net/images/make_bash_history_permanent-how-to-keep-every-user-command-forever-prevent-users-from-deleting-their-bash-history-on-linux.png" style="height: 270px; width: 480px;" />
</p>
<p>
	Whether you&#39;re <em><strong>managing servers, writing scripts, or troubleshooting complex systems</strong></em>, one of the most valuable tools at your disposal is your <strong>command history</strong>. But the default Bash history has serious limitations: it&rsquo;s easy to lose, doesn&#39;t timestamp by default, and doesn&#39;t log everything in real time.
</p>
<p>
	What if you could <strong>keep a permanent, timestamped, real-time log of every command you ever run</strong> in Bash?
</p>
<p>
	Good news: you can.
</p>
<p>
	In this guide, we&rsquo;ll walk through <strong>how to set up robust, automatic Bash logging</strong> to track every command you type&mdash;<strong>across sessions, with full timestamps</strong>, and even <strong>with user and host information</strong>. Ideal for system administrators, developers, auditors, or anyone who wants to maintain a clear, searchable audit trail.
</p>
<h2>
	<strong>Why Bash Logging Persistence So Important ?</strong><br />
</h2>
<p>
	Before we dive into the how, let&#39;s understand the <strong>why</strong>:
</p>
<ul>
<li>
		<strong>Accountability</strong> &ndash; Know exactly what commands were run, by whom, and when.
	</li>
<li>
		<strong>Auditability</strong> &ndash; Great for security reviews or compliance requirements.
	</li>
<li>
		<strong>Troubleshooting</strong> &ndash; Trace back actions that caused issues.
	</li>
<li>
		<strong>Documentation</strong> &ndash; Reuse commands or share with teammates.
	</li>
<li>
		<strong>Forensics</strong> &ndash; Investigate suspicious activity.
	</li>
</ul>
<p>
	<strong>How Bash History Behaves&nbsp; ( By Default )</strong>
</p>
<p>
	Without any config everyone knows , Bash uses a file called <strong>~/.bash_history in $HOME</strong> to save command history.
</p>
<p>
	What is tricky here:
</p>
<ul>
<li>
		.bash_history&nbsp;<strong>not written to immediately</strong> &ndash; only when the session exits.
	</li>
<li>
		It <strong>can be overwritten</strong> by other sessions.
	</li>
<li>
		It lacks <strong>timestamps</strong> unless explicitly configured.
	</li>
<li>
		It <strong>doesn&rsquo;t log failed attempts or commands from other users</strong>.
	</li>
</ul>
<p>
	In this short article I&#39;ll show you one of the ways on how to make .bash_history keeps the record for you even though some user tries to hide tihngs by running the commands and exiting the shell abnormally by killing it with the well known command by hackers and sysadmin gurus:
</p>
<blockquote>
<p>
		<br />
		<strong>$ kill -9 $$</strong>
	</p>
</blockquote>
<p>
	The command forces the user you have logged into to kill the process of the bash (<strong>-bash</strong>).&nbsp;
</p>
<p>
	Here is how.
</p>
<h1>
	<strong>Enable Advanced Bash Logging</strong><br />
</h1>
<h2>
	<strong>1. Enable Timestamps in History</strong><br />
</h2>
<p>
	Add this line to your <strong>~/.bashrc</strong> or <strong>~/.bash_profile</strong>:
</p>
<blockquote>
<p>
		<strong>export HISTTIMEFORMAT=&quot;%F %T &quot;</strong>
	</p>
</blockquote>
<p>
	This formats the date/time as YYYY-MM-DD HH:MM:SS.
</p>
<p>
	After modifying the file, run:
</p>
<blockquote>
<p>
		<strong>source ~/.bashrc</strong>
	</p>
</blockquote>
<p>
	Now, run:
</p>
<blockquote>
<p>
		<strong>history</strong>
	</p>
</blockquote>
<p>
	And you&rsquo;ll see timestamps next to your commands.
</p>
<h2>
	<strong>2. Increase History Size</strong><br />
</h2>
<p>
	The default history size is often too small. Let&rsquo;s increase it:
</p>
<blockquote>
<p>
		<strong>export HISTSIZE=100000</strong>
	</p>
<p>
		<strong>export HISTFILESIZE=200000</strong>
	</p>
</blockquote>
<p>
	<br />
	Add these to ~/.bashrc as well.
</p>
<h2>
	<strong>3. Log Commands Immediately (Across Sessions)</strong><br />
</h2>
<p>
	By default, Bash only writes history when the shell exits. To log commands <strong>in real time</strong>, add the following to ~/.bashrc:
</p>
<p>
	# Append to the history file, don&#39;t overwrite it
</p>
<blockquote>
<p>
		<strong>shopt -s histappend</strong>
	</p>
</blockquote>
<p>
	# Immediately append command to history file after execution
</p>
<blockquote>
<p>
		<strong>PROMPT_COMMAND=&#39;history -a; history -n&#39;</strong>
	</p>
</blockquote>
<p>
	Explanation:
</p>
<ul>
<li>
		<strong>history -a</strong>: Append current session&#39;s command to ~/.bash_history
	</li>
<li>
		<strong>history -n</strong>: Read any new lines from the file (from other sessions)
	</li>
</ul>
<h2>
	<strong>4. Log All Commands to a Separate File (for each User)</strong><br />
</h2>
<p>
	To keep a <strong>separate, detailed log</strong>, you can use the trap command in combination with logger, or write to a custom file.
</p>
<p>
	Add this to your <strong>~/.bashrc</strong>:
</p>
<blockquote>
<p>
		<strong>LOG_FILE=&quot;$HOME/.bash_command_log&quot;</strong>
	</p>
<p>
		<strong>trap &#39;echo &quot;$(date &quot;+%F %T&quot;) | $(whoami)@$(hostname) | $(pwd) | $BASH_COMMAND&quot; &gt;&gt; &quot;$LOG_FILE&quot;&#39; DEBUG</strong>
	</p>
</blockquote>
<p>
	This logs every command as for example:
</p>
<blockquote>
<p>
		<em>2025-10-10 14:25:02 | master_app@server01 | /var/www | systemctl restart nginx</em>
	</p>
</blockquote>
<p>
	This file can grow large over time &#8211;&nbsp;consider rotating it regularly with <strong>logrotate</strong> or similar tools.<br />
	To prevent the file 100% from being modified by the user itself you can make the log file &nbsp;<strong data-end="3151" data-start="3124">immutable </strong><strong data-end="3151" data-start="3124">with</strong><strong data-end="3151" data-start="3124">&nbsp;command</strong>
</p>
<blockquote>
<p>
		<strong># chattr +i&nbsp;$HOME/.bash_command_log</strong>
	</p>
</blockquote>
<h2>
	<br />
	<strong>5. Guarantee log security, Make copy of Logs to prevent hackers to modify them</strong><br />
</h2>
<p>
	If logging for<strong> audit/security</strong> purposes:
</p>
<ul>
<li>
		Store logs in <strong>append-only</strong> files (<strong>chattr +a logfile</strong> on <em>ext4 FS</em>)
	</li>
<li>
		store files with rsyslog service (see below)
	</li>
<li>
		Use <strong>remote logging</strong> (e.g., send via logger to syslog&nbsp; / rsyslog or any other <em><strong>centralized logging service</strong></em>) / <strong>logcollector</strong> etc.
	</li>
<li>
		Monitor for tampering or suspicious gaps
	</li>
</ul>
<h2>
	<strong>6. Store file with rsyslog service</strong><br />
</h2>
<p>
	Create the file and set it proper permissions
</p>
<blockquote>
<p>
		<strong># touch /var/log/bash_audit.log<br />
		# chmod 600 /var/log/bash_audit.log<br />
		# chown root:root /var/log/bash_audit.log</strong>
	</p>
</blockquote>
<blockquote>
<p>
		<strong># vim /etc/rsyslog.d/bash_audit.conf</strong>
	</p>
</blockquote>
<p>
	Add:
</p>
<blockquote>
<p>
		<strong>if $programname == &#39;bash_audit&#39; then /var/log/bash_audit.log<br />
		&amp; stop</strong>
	</p>
</blockquote>
<blockquote>
<p>
		<strong># systemctl restart rsyslog</strong>
	</p>
</blockquote>
<p>
	<br />
	<strong>To later verify it works fine</strong>
</p>
<blockquote>
<p>
		<strong># tail -f /var/log/bash_audit.log<br />
		# journalctl -t bash_audit</strong>
	</p>
</blockquote>
<h2>
	&nbsp;<br />
</h2>
<p>
	<strong>6. Add Global Bash Logging for All Users</strong>
</p>
<p>
	Assuming that the bash_audit <strong>set program / name tag</strong> is already done as in step 5.<br />
	To apply logging <strong>system-wide</strong>, Edit<strong> /etc/profile /etc/bash_profile</strong>&nbsp;or <strong>/etc/bash.bashrc</strong> and include the same <strong>trap</strong>&nbsp;cmd and logging is ready. Ensure:
</p>
<ul>
<li>
		The log file is <strong>writable by users (or add users to a group that can append to file)</strong>&nbsp;or modify the command to use <strong>sudo logger</strong> for centralized syslog.
	</li>
<li>
		You <strong>test it carefully</strong> before deploying to all users.</p>
<p>
			&nbsp;
		</p>
<p>
			&nbsp;
		</p>
<p>
			&nbsp;
		</p>
<p>
			An improved wide user version of trap command would be something like this
		</p>
</li>
</ul>
<blockquote>
<p>
		<strong># Bash command logging (readable layer)</strong>
	</p>
<p>
		<strong>trap &#39;CMD=$(history 1 | sed &quot;s/^[ ]*[0-9]\+[ ]*//&quot;);<br />
		MSG=&quot;$(date &quot;+%F %T&quot;) | $(whoami)@$(hostname) | $(pwd) | $CMD&quot;;</strong>
	</p>
<p>
		<strong>/usr/bin/logger -t bash_audit &quot;$MSG&quot;<br />
		&#39; DEBUG</strong>
	</p>
</blockquote>
<p>
	Make these two env variables read only for additional hardening&nbsp;
</p>
<blockquote>
<p>
		<strong>readonly PROMPT_COMMAND<br />
		readonly HISTFILE</strong>
	</p>
</blockquote>
<p>
	Note that you will need to edit passwordless login for sudo to logger
</p>
<ul>
<li>
		Setup auditd to make file read only
	</li>
</ul>
<blockquote>
<p>
		#<strong> apt install auditd audispd-plugins &#8211;yes</strong>
	</p>
</blockquote>
<ul>
<li>
		Test it with auditctl
	</li>
</ul>
<blockquote>
<p>
		<strong># auditctl -a always,exit -F arch=b64 -S execve -F auid&gt;=1000 -F auid!=4294967295 -k cmdlog<br />
		# auditctl -a always,exit -F arch=b32 -S execve -F auid&gt;=1000 -F auid!=4294967295 -k cmdlog</strong>
	</p>
</blockquote>
<ul>
<li>
		Make rules permanent via cmdlog.rules
	</li>
</ul>
<blockquote>
<p>
		<strong># vim /etc/audit/rules.d/cmdlog.rules</strong>
	</p>
<p>
		<strong>-a always,exit -F arch=b64 -S execve -F auid&gt;=1000 -F auid!=4294967295 -k cmdlog<br />
		-a always,exit -F arch=b32 -S execve -F auid&gt;=1000 -F auid!=4294967295 -k cmdlog</strong>
	</p>
</blockquote>
<ul>
<li>
		<strong>Load and lock audit rules</strong>
	</li>
</ul>
<blockquote>
<p>
		<strong># augenrules &#8211;load<br />
		# auditctl -e 2</strong>
	</p>
</blockquote>
<ul>
<li>
		<strong>Check audit logs</strong>
	</li>
</ul>
<blockquote>
<p>
		<strong># ausearch -k cmdlog -i</strong><br />
		<em>exe=&quot;/usr/bin/ls&quot; argc=1 a0=&quot;ls&quot;</em>
	</p>
</blockquote>
<h2>
	<strong>7. Rotate Log Files Automatically with logrotate</strong><br />
</h2>
<p>
	Create a logrotate config like&nbsp;<strong>/etc/logrotate.d/bash_command_log</strong>:
</p>
<blockquote>
<p>
		<em>/home/*/.bash_command_log {<br />
		daily<br />
		rotate 7<br />
		compress<br />
		missingok<br />
		notifempty<br />
		}</em>
	</p>
</blockquote>
<blockquote>
<p>
		<em>/var/log/bash_audit.log {<br />
		daily<br />
		rotate 7<br />
		compress<br />
		missingok<br />
		notifempty<br />
		}</em>
	</p>
</blockquote>
<p>
	<br />
	This keeps logs for 7 days and compresses old ones.
</p>
<h2>
	<strong>8. Test Every command Logging is permanenty stored</strong><br />
</h2>
<p>
	After setting bash logging up&nbsp;up:
</p>
<ol>
<li>
		Open a <em>new terminal</em> client with SSH session
	</li>
<li>
		Run a few commands
	</li>
<li>
		Check <strong>~/.bash_command_log</strong> (or your alternative configured log location)
	</li>
</ol>
<p>
	You should see a <em>real-time record</em> of every command executed.
</p>
<p>
	Use tools like <strong>grep, awk</strong>, or <strong><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly9naXRodWIuY29tL2p1bmVndW5uL2Z6Zg%3D%3D&#038;feed-stats-url-post-id=18151">fzf Command fuzzy finder</a>&nbsp;</strong>to <strong>search through your command log</strong> efficiently. Example:
</p>
<blockquote>
<p>
		<strong>grep apt ~/.bash_command_log</strong>
	</p>
</blockquote>
<p>
	You can further automate it and deploy it to multiple servers with Ansible or some shell scripting.<br />
	If you need it <strong><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly9wYy1mcmVhay5uZXQvY29udGFjdC8%3D&#038;feed-stats-url-post-id=18151">Ask me how to automate it</a>?</strong><br />
	Ask me how to automate it with Ansible or a shell script.
</p>
<h2>
	<strong>Wrapping it Up</strong><br />
</h2>
<p>
	With just a few lines in <em>Bash config,</em>&nbsp;basic history feature becomes a&nbsp;<strong>persistent, and timestamped static record </strong>&nbsp;that&rsquo;s invaluable for <em>system admins, developers</em>, and <em>security teams</em>.
</p>
<p>
	<strong>Summary Checklist</strong>
</p>
<ul>
<li>
		Enable <strong>HISTTIMEFORMAT</strong>
	</li>
<li>
		Increase history size
	</li>
<li>
		Append history in real time
	</li>
<li>
		Log every command with<strong> trap DEBUG</strong>
	</li>
<li>
		Optionally send to<strong>&nbsp;rsyslog / syslogd</strong>&nbsp;/ <strong>systemd-journald</strong> or other&nbsp;<em>central log server (<strong>Fluentd / ELK Stack / Graylog</strong>)</em>
	</li>
<li>
		Rotate logs with logrotate
	</li>
</ul>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-17955" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVwbG95aW5nLXB1cHBldC1zZXJ2ZXItcGF0Y2hpbmctMTAtZGViaWFuLWxpbnV4LXNlcnZlcnMv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Deploying a Puppet Server and Patching multiple Debian Linux Servers</a></li><li data-position="1" data-poid="in-16531" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY29uZmlndXJlLWhhcHJveHktbG9nZ2luZy1zZXBhcmF0ZS1maWxlLXJlZGhhdC1lbnRlcnByaXNlLWxpbnV4LTg1LW9vdHBhLw%3D%3D&#038;feed-stats-url-post-id=18151" class="wp_rp_title">How to configure haproxy logging to separate file on Redhat Enterprise Linux 8.5 Ootpa</a></li><li data-position="2" data-poid="in-16181" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXBhY2hlLWRpc2FibGUtcmVxdWVzdC1sb2ctYWNjZXNzbG9nLWxvZ2ZpbGUtc2V0ZW52aWYv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Apache disable requests to not log to access.log Logfile through SetEnvIf and dontlog httpd variables</a></li><li data-position="3" data-poid="in-12737" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY2hlY2stYXBhY2hlLXdlYnNlcnZlci1teXNxbC1zZXJ2ZXItdXB0aW1lLw%3D%3D&#038;feed-stats-url-post-id=18151" class="wp_rp_title">How to check Apache Webserver and MySQL server uptime &#8211; Check uptime of a running daemon with PS (process) command</a></li><li data-position="4" data-poid="in-5699" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcG9zc2libGUtd2F5LXRvLWltcHJvdmUtd29yZHByZXNzLXBlcmZvcm1hbmNlLXdpdGgtd3AtY29uZmlnLXBocC00LWNvbmZpZy12YXJpYWJsZXMv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Possible way to Improve wordpress performance with wp-config.php 4 config variables</a></li><li data-position="5" data-poid="in-5334" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLXNldC1hcHBsaWNhdGlvbnMtcHJvZ3JhbXMtYXV0b3J1bi1vbi14ZmNlLWluLXh1YnVudHUtbGludXgv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">How to set applications (programs) Autorun on XFCE in Xubuntu Linux</a></li><li data-position="6" data-poid="in-5288" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdXNlLXJzeW5jLXRvLWNvcHktZnJvbS1maWxlcy1mcm9tLWRlc3RpbmF0aW9uLWhvc3QtdG8tc291cmNlLWhvc3QtcnN5bmMtcmV2ZXJzZS1jb3B5LWZldy13b3Jkcy1vbi1yc3luYy8%3D&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Use rsync to copy from files from destination host to source host (rsync reverse copy) / few words on rsync</a></li><li data-position="7" data-poid="in-18388" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LXczMnRtLXF1ZXJ5LXNvdXJjZS1zZXJ2aWNlLXN0YXJ0ZWQtd2luZG93cy10aW1lLXNlcnZpY2UtZXJyb3Iv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Check and Fix: “w32tm /query /source – The service has not been started” (Windows Time Service Error)</a></li><li data-position="8" data-poid="in-18230" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3RvcHBlZC1hd3Mtd29ya3NwYWNlLWxpbnV4LWRlc2t0b3Atc2xlZXAtcm9vdC1hY2Nlc3Mv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">How I Stopped My AWS workspace Linux Desktop From Going to Sleep… Without Root Access</a></li><li data-position="9" data-poid="in-17914" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVidWdnaW5nLWppdHNpLW1lZXQtc2VydmVyLXByb2JsZW1zLXByYWN0aWNhbC1ndWlkZS8%3D&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Debugging Jitsi Meet Server Problems: A Practical Guide</a></li><li data-position="10" data-poid="in-17856" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbG9nLW11bHRpcGxlLWhhcHJveHktc2VydmVyLWluc3RhbmNlLXByb2Nlc3Nlcy1zaW5nbGUtc2VydmVyLXNlcGVyYXRlLWZpbGVzLXJzeXNsb2ctZmlsdGVycy8%3D&#038;feed-stats-url-post-id=18151" class="wp_rp_title">How to log multiple haproxy server instance processes on single server in seperate files with rsyslog filters</a></li><li data-position="11" data-poid="in-16976" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3RhcnQtc3lzbG9nLXN5c2xvZ25nLWlibS1haXgv&#038;feed-stats-url-post-id=18151" class="wp_rp_title">How to start Syslog ( Syslog-ng ) on IBM AIX</a></li><li data-position="12" data-poid="in-16845" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvemFiYml4LW1vbml0b3ItbGludXgtcnN5c2xvZy1jb25maWd1cmVkLWNlbnRyYWwtbG9nLXNlcnZlci1yZWNoYWJsZS1jaGVja2xvZ3NlcnZlcnN0YXR1c3NoLXVzZXJwYXJhbWV0ZXItc2NyaXB0Lw%3D%3D&#038;feed-stats-url-post-id=18151" class="wp_rp_title">Zabbix: Monitor Linux rsyslog configured central log server is rechable with check_log_server_status.sh userparameter script</a></li><li data-position="13" data-poid="in-16643" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGRhcC1zZXJ2ZXItaW5zdGFsbGF0aW9uLWNvbmZpZ3VyYXRpb24tbGludXgtaG93dG8v&#038;feed-stats-url-post-id=18151" class="wp_rp_title">LDAP Server Installation and Configuration on CentOS 7.9 Linux or  howto simply Store and use SSH User account credentials from LDAP</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18151" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/bash-logging-record-command-run/">Linux Bash Logging log everything. Prevent user from delete his history and keep record of every command User ever Run</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/bash-logging-record-command-run/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>How to Recreate a Corrupted Windows User Profile to Solve Windows Signing In / Signing Out Loops</title>
		<link>https://www.pc-freak.net/blog/recreate-corrupted-windows-user-profile-solve-windows-signing-signing-loops/</link>
					<comments>https://www.pc-freak.net/blog/recreate-corrupted-windows-user-profile-solve-windows-signing-signing-loops/#respond</comments>
		
		
		<pubDate>Tue, 03 Mar 2026 19:07:59 +0000</pubDate>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[OS Update]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Various]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[bad sectors]]></category>
		<category><![CDATA[cause]]></category>
		<category><![CDATA[Click Delete]]></category>
		<category><![CDATA[Copy Appdata Directory Application Settings]]></category>
		<category><![CDATA[Corrupted Profile]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[Entire Registry]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[HKCC]]></category>
		<category><![CDATA[HKCR]]></category>
		<category><![CDATA[HKCU]]></category>
		<category><![CDATA[HKLM]]></category>
		<category><![CDATA[HKU]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[Key Beware]]></category>
		<category><![CDATA[logins]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[Navigate]]></category>
		<category><![CDATA[New Local Administrator Account]]></category>
		<category><![CDATA[new software]]></category>
		<category><![CDATA[NTUSER]]></category>
		<category><![CDATA[Open Registry Editor]]></category>
		<category><![CDATA[Open Settings]]></category>
		<category><![CDATA[Pc]]></category>
		<category><![CDATA[personal data]]></category>
		<category><![CDATA[profile settings]]></category>
		<category><![CDATA[reg files]]></category>
		<category><![CDATA[Restart]]></category>
		<category><![CDATA[Run System File Repair]]></category>
		<category><![CDATA[Temporary Profile]]></category>
		<category><![CDATA[times]]></category>
		<category><![CDATA[uac]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[working]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18416</guid>

					<description><![CDATA[<p>A corrupted Windows user Profile can cause serious frustration, especially if your PC / notebook running Windows 10 / Windows / 11 etc. in a Windows Domain or not becomes inaccessible for no obvious reason, even though last day you shut down the PC and everything has been working perfectly fine. The Corruption of User [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/recreate-corrupted-windows-user-profile-solve-windows-signing-signing-loops/">How to Recreate a Corrupted Windows User Profile to Solve Windows Signing In / Signing Out Loops</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="windows-fix-corrupted-profile-recreate-windows-profile-to-solve-windows-login-loop-howto" src="https://www.pc-freak.net/images/windows-fix-corrupted-profile-recreate-windows-profile-to-solve-windows-login-loop-howto.png" style="height: 320px; width: 480px;" />
</p>
<p>
	A <strong>corrupted Windows user Profile</strong> can cause serious frustration, especially if <em><strong>your PC / notebook running Windows 10 / Windows / 11</strong></em> etc. in a Windows Domain or not <em><strong>becomes inaccessible for no obvious reason</strong></em>, even though last day you shut down the PC and everything has been working perfectly fine.
</p>
<p>
	<strong>The Corruption of User Profile</strong> is a rare problem but for <em><strong>a Domain users</strong></em> it is something you&#39;ll likely face at least once in a life time or more. Windows Professionals / Sys&nbsp;Admins shold face it frequently when administering, <strong><em>large domains with multiple joined Windows PCs inside the domain&nbsp;</em></strong><em>so Windows Pro users should be little known for most common Win users.</em>
</p>
<p>
	Corruption usually happens&nbsp;after <em><strong>improper shutdown / a recent update</strong></em>, due to s<em><strong>ome recent installation / removal of new software</strong></em> or even for absolutely no reason. You might hit a strange issue, you used your <strong>Windows work PC</strong> or <strong>home laptop</strong> for years and suddenly out of nothing you <em>cannot login to the account anymore &#8230;&nbsp;</em><br />
	The gamma of issues testifying of broken profiles is wide.<br />
	&nbsp;<br />
	&nbsp;You may experience temporary profile logins, missing files, broken settings, constant errors, or extremely slow performance. Logging in to the account Giving you a <strong>Signining In -&gt; Welcome -&gt; Signing Out Login Loop</strong> or&nbsp;sometimes Windows even displays the message:
</p>
<p>
	<strong>&ldquo;You have been signed in with a temporary profile.&rdquo;</strong>
</p>
<p>
	If this happens, don&rsquo;t panic. In most cases, you can safely recreate your Windows profile without losing personal data.
</p>
<p>
	<img decoding="async" alt="we-cant-sugn-into-your-account-error-message-windows" src="https://www.pc-freak.net/images/we-cant-sugn-into-your-account-error-message-windows.png" style="height: 190px; width: 460px;" /><br />
	&nbsp;
</p>
<h2>
	<strong>Signs Your User Profile Is Corrupted :</strong><br />
</h2>
<ul>
<li>
		<em>Temporary profile message</em>
	</li>
<li>
		<em>Desktop resets after reboot</em>
	</li>
<li>
		<em>Missing files</em>
	</li>
<li>
		<em>Apps not saving settings</em>
	</li>
<li>
		<em>Start menu not working</em>
	</li>
<li>
		<em>Extremely slow login</em>
	</li>
</ul>
<p>
	This guide should work&nbsp;for both <strong>Windows 10</strong> and <strong>Windows 11</strong>.
</p>
<p>
	<img decoding="async" alt="windows-temp-profile-screenshot" src="https://www.pc-freak.net/images/windows-temp-profile-screenshot.png" style="width: 601px; height: 400px;" />
</p>
<h2>
	<strong>What Causes a Corrupted Windows Profile?</strong><br />
</h2>
<p>
	Common causes include:
</p>
<ul>
<li>
		<em>Improper shutdowns</em>
	</li>
<li>
		<em>Failed Windows updates</em>
	</li>
<li>
		<em>Disk errors or bad sectors</em>
	</li>
<li>
		<em>Antivirus interference</em>
	</li>
<li>
		<em>Registry corruption</em>
	</li>
<li>
		<em>Power outages</em>
	</li>
</ul>
<p>
	When the profile registry entry or user folder becomes damaged, Windows cannot properly load your account.<br />
	&nbsp;
</p>
<h2>
	<b>Windows drops you into Temporary Profile ?</b><br />
</h2>
<p>
	<img decoding="async" alt="windows-temp-profile-screenshot" src="https://www.pc-freak.net/images/windows-temp-profile-screenshot.png" style="width: 450px; height: 300px;" /><br />
	<strong>Often if you try to recover your profile, if you have attempted to recover your profile manually or something happened with ntuser.dat file or other profile settings in Registry.</strong>
</p>
<p>
	<strong>If that&#39;s the case Windows logs you into a temporary profile</strong>, it usually looks like you have a fresh profile (d<strong>esktop empty, files missing</strong>), even though your original profile still exists. This happens when Windows <strong>can&rsquo;t load your original user profile</strong> properly.
</p>
<p>
	Here&rsquo;s what&rsquo;s happening and why Windows drops you into this temporary&nbsp;profile (which by the way is recreated every time creating its own Directory like&nbsp;<strong>C:\Users\TEMP.AD1</strong>&nbsp;,&nbsp;<strong>C:\Users\TEMP.AD2 TEMP.AD3 on each and every windows restart&nbsp;.</strong>
</p>
<p>
	<strong>Why Windows Uses a Temporary Profile</strong>
</p>
<ul>
<li>
		<strong>Corrupted user profile</strong>
	</li>
</ul>
<p>
	Critical files in your original profile (like <strong>NTUSER.DAT</strong>) may be corrupted.
</p>
<ul>
<li>
		<strong>Permissions issues</strong>
	</li>
</ul>
<p>
	If Windows can&rsquo;t access your profile folder due to permissions errors.
</p>
<ul>
<li>
		<strong>Profile in use or locked</strong>
	</li>
</ul>
<p>
	If the profile was not closed properly or still in use.
</p>
<ul>
<li>
		<strong>Disk errors</strong>
	</li>
</ul>
<p>
	File system problems can prevent profile loading.
</p>
<ul>
<li>
		<strong>Registry errors</strong>
	</li>
</ul>
<p>
	Windows keeps profile info in the registry (<strong>HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList</strong>). If it&rsquo;s misconfigured, the system may create a temporary profile.
</p>
<h2>
	<strong>Symptoms of a Temporary Profile</strong><br />
</h2>
<ul>
<li>
		<strong>Desktop, Documents, Downloads</strong>, and other files appear empty.
	</li>
<li>
		Changes made during the session are <strong>lost</strong> after logout.
	</li>
<li>
		<strong>Windows</strong> may show a notification like:
	</li>
</ul>
<p>
	<span style="color:#A52A2A;"><strong><em>&ldquo;You have been logged on with a temporary profile. Changes you make will be lost when you log off.&rdquo;</em></strong></span>
</p>
<h2>
	<strong>Before You Start (have Administrator access)</strong><br />
</h2>
<p>
	You&rsquo;ll need:
</p>
<ul>
<li>
		<em>Administrator access to the PC</em>
	</li>
<li>
		<em>A backup of important files (if accessible)</em>
	</li>
<li>
		<em>About 15&ndash;30 minutes</em>
	</li>
</ul>
<p>
	If you can&rsquo;t log in normally, boot into <strong>Safe Mode / Safe Mode with Networking / Safe Mode</strong> with <strong>Command Prompt</strong> or have some kind of recovery console.
</p>
<p>
	<img decoding="async" alt="Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic1" src="https://www.pc-freak.net/images/Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic1.png" style="width: 537px; height: 364px;" />
</p>
<p>
	<img decoding="async" alt="Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic2" src="https://www.pc-freak.net/images/Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic2.png" style="width: 538px; height: 358px;" />
</p>
<p>
	<img decoding="async" alt="Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic3" src="https://www.pc-freak.net/images/Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic3.png" style="width: 537px; height: 353px;" />
</p>
<p>
	<img decoding="async" alt="Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic4" src="https://www.pc-freak.net/images/Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic4.png" style="width: 537px; height: 298px;" />
</p>
<p>
	<img decoding="async" alt="Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic5" src="https://www.pc-freak.net/images/Fix-User-Profile-Cannot-Be-Loaded-Error-Windows-pic5.png" style="width: 537px; height: 418px;" /><br />
	&nbsp;
</p>
<h2>
	<strong>1. Create a New User Profile (Best and Recommended approach)</strong><br />
</h2>
<p>
	I know you will feel bad that you will loose all your customizations of the Profile, but having empty hopes and loosing times with empty hopes does not make things better either, so better accept that the probability to have your Profile restored by restoring from backup <strong>ntuser.dat</strong>&nbsp;file or doing <strong>Windows System Restore or running whatever of Auto recovery and diagnostics tools in safe&nbsp;</strong>in most of the cases won&#39;t solve it. So face the reality and move on.
</p>
<p>
	<strong>Create a New User Profile</strong> is t<em>he safest and most reliable fix</em>.
</p>
<h2>
	<strong>1.1. Create a New Local Administrator Account</strong><br />
</h2>
<ol>
<li>
		Open <strong>Settings</strong>
	</li>
<li>
		Go to <strong>Accounts &rarr; Family &amp; other users</strong>
	</li>
<li>
		Click <strong>Add account</strong>
	</li>
<li>
		Choose <strong>I don&rsquo;t have this person&rsquo;s sign-in information</strong>
	</li>
<li>
		Select <strong>Add a user without a Microsoft account</strong>
	</li>
<li>
		Create a new username and password
	</li>
<li>
		After creation, click the account &rarr; <strong>Change account type</strong>
	</li>
<li>
		Set it to <strong>Administrator</strong>
	</li>
</ol>
<p>
	Restart your PC and log into the new account.
</p>
<h2>
	<strong>1.2. Copy Data from the Old Profile</strong><br />
</h2>
<p>
	Open <strong>Win&nbsp;File Explorer</strong>
</p>
<p>
	Go to:
</p>
<blockquote>
<p>
		<strong>C:\Users</strong>
	</p>
</blockquote>
<p>
	Open your old corrupted profile folder (dir)
</p>
<p>
	<strong>Copy important folders:</strong>
</p>
<ul>
<li>
		<em>Desktop</em>
	</li>
<li>
		<em>Documents</em>
	</li>
<li>
		<em>Downloads</em>
	</li>
<li>
		<em>Pictures</em>
	</li>
<li>
		<em>Favorites</em>
	</li>
<li>
		<em>Music</em>
	</li>
<li>
		<em>Videos</em>
	</li>
</ul>
<p>
	Do NOT copy (as this files contains actually the Data for the Profile itself they need to be <em>automatically generated on new Profile creation time</em>):
</p>
<ul>
<li>
		<strong>NTUSER.DAT</strong>
	</li>
<li>
		<strong>NTUSER.DAT.LOG</strong>
	</li>
<li>
		<strong>NTUSER.INI</strong>
	</li>
</ul>
<p>
	Paste the data into your new profile folder.
</p>
<h2>
	<strong>1.3. Delete the Corrupted Profile</strong><br />
</h2>
<p>
	Press <strong>Win + R</strong>
</p>
<p>
	Inside prompt Type:
</p>
<blockquote>
<p>
		<strong>C:\Windows&gt; sysdm.cpl</strong>
	</p>
</blockquote>
<ul>
<li>
		Go to <strong>Advanced &rarr; User Profiles &rarr; Settings</strong>
	</li>
</ul>
<p>
	Select the corrupted profile
</p>
<ul>
<li>
		Click <strong>Delete</strong>
	</li>
</ul>
<p>
	Then remove the old folder from <strong>C:\Users</strong> if it still exists.
</p>
<h2>
	<strong>2. Fix the Profile via Registry (Advanced approach)</strong><br />
</h2>
<p>
	&nbsp;
</p>
<p>
	<strong>2.1. Create Windows registry backup (Manual backup)</strong>
</p>
<p>
	<strong>a)&nbsp;Backup Windows registry Using Registry Editor GUI tool (Manual Backup)</strong>
</p>
<p>
	<strong>Open Registry Editor:</strong>
</p>
<ul>
<li>
		Press <strong>Win + R</strong>, type <strong><b>regedit</b></strong>, and press <strong>Enter</strong>.
	</li>
<li>
		If prompted by User Account Control (<b>UAC</b>), click <strong>Yes</strong>.
	</li>
</ul>
<p>
	<strong>Backup the Entire Registry:</strong>
</p>
<ul>
<li>
		In the Registry Editor, click <strong>File &rarr; Export</strong>.
	</li>
</ul>
<p>
	In the <strong>Export Registry File</strong> dialog:
</p>
<ul>
<li>
		Make sure <strong>Export range</strong> is set to <strong>All</strong>.
	</li>
</ul>
<p>
	Name the file something descriptive like <strong><em><strong>RegistryBackup_MMDDYY</strong></em></strong>.
</p>
<ul>
<li>
		Choose a location to save the backup (e.g., Desktop or external drive). Click <strong>Save</strong>.
	</li>
</ul>
<p>
	This creates a <strong>.reg</strong> file containing a full backup of your registry.
</p>
<p>
	<strong>Backup Specific Keys (Optional):</strong>
</p>
<ul>
<li>
		Navigate to the key you want to backup.
	</li>
<li>
		Right-click it and select <strong>Export</strong>.
	</li>
<li>
		Save it as a <strong>.reg</strong> file for later restoration.
	</li>
</ul>
<p>
	<strong>b) Create Windows registry Full backup with Command Prompt reg command</strong>
</p>
<p>
	Open <strong>Command Prompt</strong> as administrator.
</p>
<p>
	To backup the registry, use the <strong>reg</strong> command:
</p>
<blockquote>
<pre>
<b>C:\Windows&gt; reg export HKLM\Software C:\Backup\SoftwareBackup.reg</b></pre>
</blockquote>
<ul>
<li>
		Replace <strong><b>HKLM\Software</b></strong> with the key you want to backup.
	</li>
<li>
		Replace <strong>C</strong><strong><b>:\Backup\SoftwareBackup.reg</b></strong> with your desired file path.Press <strong>Enter</strong> to create the backup.
	</li>
</ul>
<h3 data-end="344" data-start="292">
	<strong>Run the Full Registry Backup Command</strong><br />
</h3>
<p data-end="501" data-start="346">
	You&rsquo;ll need to export the <strong data-end="385" data-start="372">root keys</strong> individually, because <strong>reg export doesn&rsquo;t allow exporting the entire registry in one command. Here&rsquo;s the full set: </strong>
</p>
<blockquote>
<p>
		<strong>reg export HKCR C:\Backup\HKCR.reg /y<br />
		reg export HKCU C:\Backup\HKCU.reg /y<br />
		reg export HKLM C:\Backup\HKLM.reg /y<br />
		reg export HKU C:\Backup\HKU.reg /y<br />
		reg export HKCC C:\Backup\HKCC.reg /y</strong>
	</p>
</blockquote>
<ul>
<li>
		<strong>HKCR</strong> &rarr; HKEY_CLASSES_ROOT
	</li>
<li>
		<strong>HKCU</strong> &rarr; HKEY_CURRENT_USER
	</li>
<li>
		<strong>HKLM</strong> &rarr; HKEY_LOCAL_MACHINE
	</li>
<li>
		<strong>HKU</strong> &rarr; HKEY_USERS
	</li>
<li>
		<strong>HKCC</strong> &rarr; HKEY_CURRENT_CONFIG<strong>C:\Backup\</strong> &rarr; Folder where backups are saved (make sure the folder exists).
	</li>
<li>
		<strong>/y</strong> &rarr; Automatically overwrite existing files if they
	</li>
</ul>
<p>
	After running these commands, you&rsquo;ll have a full backup of the registry in separate <strong>.reg</strong> files.
</p>
<p data-end="1158" data-start="1122">
	<strong>Restoring the registry Backup (if later needed)</strong>
</p>
<p data-end="1171" data-start="1160">
	To restore:
</p>
<blockquote>
<p>
		<strong>reg import C:\Backup\HKCR.reg<br />
		reg import C:\Backup\HKCU.reg<br />
		reg import C:\Backup\HKLM.reg<br />
		reg import C:\Backup\HKU.reg<br />
		reg import C:\Backup\HKCC.reg</strong>
	</p>
</blockquote>
<h2>
	<strong>2.1. Open Registry Editor</strong><br />
</h2>
<p>
	Press <strong>Win + R</strong>, type:
</p>
<blockquote>
<p>
		<strong>C:\Windows&gt; regedit</strong>
	</p>
</blockquote>
<p>
	Navigate to:
</p>
<blockquote>
<p>
		<strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList</strong>
	</p>
</blockquote>
<h2>
	<strong>2.2. Look for Duplicate SID Entries</strong><br />
</h2>
<p>
	You may see two similar profile keys:
</p>
<ul>
<li>
		One ending in .bak
	</li>
<li>
		One without
	</li>
</ul>
<p>
	If this happens:
</p>
<ol>
<li>
		Rename the normal one (add <strong>.old</strong>)
	</li>
<li>
		Remove .bak from the correct profile key
	</li>
<li>
		Make sure RefCount and State are set to 0
	</li>
</ol>
<p>
	Restart your PC.
</p>
<p>
	If this doesn&rsquo;t work, use Method 1 instead.
</p>
<h2>
	<strong>2.3. Check Disk for Errors</strong><br />
</h2>
<p>
	Disk corruption can damage profiles.
</p>
<p>
	Open Command Prompt as Administrator and run:
</p>
<blockquote>
<p>
		<strong>C:\Windows&gt; chkdsk C: /f /r</strong>
	</p>
</blockquote>
<p>
	You&rsquo;ll be asked to schedule the scan on restart. Type <strong>Y</strong> and reboot.
</p>
<h2>
	<strong>2.4. Run System File Repair</strong><br />
</h2>
<p>
	Corrupted system files can also cause profile issues.
</p>
<p>
	Run:
</p>
<blockquote>
<p>
		<strong>C:\Windows&gt; sfc /scannow</strong>
	</p>
</blockquote>
<p>
	Then:
</p>
<blockquote>
<p>
		<strong>C:\Windows&gt; DISM /Online /Cleanup-Image /RestoreHealth</strong>
	</p>
</blockquote>
<p>
	Restart after completion.
</p>
<ul>
</ul>
<p>
	If multiple system errors occur, a full Windows repair installation may be necessary.
</p>
<p>
	<strong>When to Consider an In-Place Repair</strong>
</p>
<p>
	If profile recreation fails:
</p>
<ol>
<li>
		Download the latest Windows ISO
	</li>
<li>
		Mount it
	</li>
<li>
		<strong>Run setup.exe</strong>
	</li>
<li>
		Choose <strong>Keep personal files and apps</strong>
	</li>
</ol>
<p>
	This repairs Windows without deleting data.
</p>
<h2>
	<strong>3. Restore (Copy)&nbsp;Application Data / Settings from Old Profile to New Profile</strong><br />
</h2>
<h2>
	<strong>3.1. Copy Appdata Directory Application Settings</strong><br />
</h2>
<ul>
<li>
		<strong>AppData</strong>&nbsp;Directory contains application settings. It has three subfolders:
	</li>
</ul>
<blockquote>
<p>
		<strong>C:\Users\OldProfile\AppData\Local C:\Users\OldProfile\AppData\LocalLow C:\Users\OldProfile\AppData\Roaming</strong>
	</p>
</blockquote>
<ul>
</ul>
<p>
	<strong>Safe practice:</strong> Only copy folders/files for specific applications (like Chrome, Outlook, VSCode, etc.):
</p>
<p>
	<strong>Examples:</strong>
</p>
<p>
	N! B! Avoid copying the entire <strong>Local</strong> or <strong>Roaming</strong> folder blindly&mdash;it may bring back the corruption.
</p>
<ul>
<li>
		<strong><em>Roaming\Google\Chrome\User DataChrome: </em> </strong>
	</li>
<li>
		<strong><em>Roaming\Mozilla\Firefox\ProfilesFirefox: </em> </strong>
	</li>
<li>
		<strong><em>Roaming\Microsoft\Outlook or Local\Microsoft\OutlookOutlook: </em> </strong>
	</li>
<li>
		<strong><em>VSCode: Roaming\Code\User</em> </strong>
	</li>
</ul>
<p>
	<strong>Copy Settings and Files</strong>
</p>
<ol>
<li>
<p>
			Log into the <strong>new profile</strong>.
		</p>
</li>
<li>
<p>
			Copy documents, pictures, and other personal files to their new locations.
		</p>
</li>
<li>
<p>
			For AppData:
		</p>
</li>
</ol>
<ul>
<li>
		<strong>Copy only specific app folders (like Chrome, Firefox, etc.). </strong>
	</li>
<li>
		Always <strong>overwrite carefully</strong>, don&rsquo;t replace the entire profile folders.
	</li>
</ul>
<p>
	<strong><em>If moving registry settings, double-check each <strong>.reg</strong> file before importing.</em></strong><br />
	&nbsp;
</p>
<p>
	<em><strong>! Note !</strong></em>
</p>
<h2 data-end="2330" data-start="2286">
	<strong>3.2. Some Apps might be necessery to Reinstall or Reconfigure</strong><br />
</h2>
<ul>
<li>
		<strong>Some apps store settings in the registry or protected locations; sometimes it&rsquo;s safer to reinstall them in the new profile rather than copy files blindly. </strong><strongonce reinstalled=""> </strongonce>
	</li>
</ul>
<h2>
	<strong>Closing Summary</strong><br />
</h2>
<p>
	<em><strong>Recreating a corrupted Windows profile is usually faster and safer than trying to repair it.</strong></em>In most cases, creating a new administrator account and transferring your data solves the problem completely. In certain circumstances this might be a pain in the ass especially if you have a bitlocker enabled and for some <em><strong>reason you have forgotten or lost the Bitlocker encryption Key ! Beware not to !&nbsp;</strong><br />
	If you have a company PC you should perhaps then contact your IT support team to provide you with the bitlocker data encryption key</em> and with it hopefully you should be able to run Safe mode or recovery console.&nbsp;
</p>
<p>
	If the issue keeps returning once you have recreated the Profile, then use <strong>BIOS / UEFI</strong> to&nbsp;check your disk health and rest of PC hardware is reporting okay&nbsp;and then&nbsp;ensure Windows Updates are installing correctly.
</p>
<p>
	<strong>That&#39;s it hopefully your new Profile should be fine. Next step of course is to restore your old profile settings to be on the new profile. </strong>
</p>
<ul>
</ul>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-17987" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LXdpbmRvd3MtdXBkYXRlLXByb2JsZW1zLWNvbXBsZXRlLWd1aWRlLw%3D%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">How to Fix Windows Update Problems: A Complete Guide</a></li><li data-position="1" data-poid="in-18384" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbGluZy1qZWxseWZpbi1saW51eC1hYnVpbHQtb3Blbi1zb3VyY2UtbWVkaWEtc29sdXRpb24v&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Installing Jellyfin on Linux to have abuilt in Own self hosted open source Media solution</a></li><li data-position="2" data-poid="in-4301" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWZpeC12YmFjY2VsZXJhdG9yLXNncmlkLWlpLWNvbnRyb2wtcnVudGltZS1lcnJvci1wb3B1cC13aW5kb3ctaW4td2luZG93cy14cC8%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">How to fix &#8220;vbAccelerator SGrid II Control Runtime Error&#8221; popup window in Windows XP</a></li><li data-position="3" data-poid="in-18410" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LXdpbmRvd3MtdXBkYXRlLWRhdGUtdXBkYXRlcy1taXNzaW5nLw%3D%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">How to Fix Windows Update When It Says “Up to Date” But Updates Are Missing</a></li><li data-position="4" data-poid="in-17540" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY3JlYXRlLWJvb3RhYmxlLXdpbmRvd3MtaW5zdGFsbGVyLXVzYi1tYWMtcGMtbWFjYm9vay1ob3N0LWxpbnV4LWRlc2t0b3AtY29tcHV0ZXIv&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Create Bootable Windows installer USB from a MAC PC, MacBook host or Linux Desktop computer</a></li><li data-position="5" data-poid="in-17136" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaXNoLWZyZWUtc3NoLWNsaWVudC1pb3MtaXBob25lLWlwYWQtbW9iaWxlLWRldmljZXMv&#038;feed-stats-url-post-id=18416" class="wp_rp_title">iSH, the best free SSH / Telnet client for iOS iPhone, iPad equivallent of MobaXterm and fully functional Alpine Linux emulator</a></li><li data-position="6" data-poid="in-15989" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdXBkYXRlLXJldmVyc2Utc3NoZC1jb25maWctY3JvbmpvYi1yZXZlcnQtc3NoZC1yZWxvYWQtaXNzdWVzLw%3D%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Update reverse sshd config with cronjob to revert if sshd reload issues</a></li><li data-position="7" data-poid="in-15880" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc2V0LWRzbWMtY2xpZW50LXRpdm9saS10c20tcmVsZWFzZS12ZXJzaW9uLXByb2Nlc3MtY2hlY2stbW9uaXRvcmluZy16YWJiaXgv&#038;feed-stats-url-post-id=18416" class="wp_rp_title">How to set up dsmc client Tivoli ( TSM ) release version and process check monitoring with Zabbix</a></li><li data-position="8" data-poid="in-15816" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYmFja3VwLW91dGxvb2stbWFpbGJveC1leHBvcnQtZXhjaGFuZ2UtbWFpbC1iYWNrdXAtcHN0Lw%3D%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">How to backup Outlook Mailbox / Export Exchange Mail backup to .pst</a></li><li data-position="9" data-poid="in-14390" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYm9keS1sYW5ndWFnZS1yZWFkaW5nLW9uZS1vZi1iZXN0LWJvb2tzLXdoYXQtZXZlcnlib2R5LWlzLXNheWluZ2JvZHktbGFuZ3VhZ2Utd3JpdHRlbi8%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">What Every Body is Saying &#8211; one of Best books on Body Language ever written</a></li><li data-position="10" data-poid="in-13791" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYmxvY2std2ViLXNlcnZlci1vdmVyLWxvYWRpbmctYmFkLWNyYXdsZXItYm90cy1hbmQtc2VhcmNoLWVuZ2luZS1zcGlkZXJzLXdpdGgtaHRhY2Nlc3MtcnVsZXMv&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Block Web server over loading Bad Crawler Bots and Search Engine Spiders with .htaccess rules</a></li><li data-position="11" data-poid="in-13233" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmVtb3ZlLXByZS1pbnN0YWxsZWQtaHAtZGVsbC1hc3VzLXRvc2hpYmEtdmVuZG9yLXNvZnR3YXJlLW5ldy1ib3VnaHQtcGMtbm90ZWJvb2stcXVpY2tseS1kZWNyYXAv&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Remove pre-installed HP, Dell, Asus, Acer, Toshiba not needed default vendor software on a new bought PC notebook quickly with Decrap My Computer</a></li><li data-position="12" data-poid="in-13115" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbWFjLXBjLWNhbWVyYS1waWN0dXJlcy1tYWMtb3MtbWFjYm9va2Fpci1ub3RlYm9vay8%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Use mac PC built-in camera to make / take pictures on Mac OS X macbookair notebook with Photo Booth</a></li><li data-position="13" data-poid="in-11895" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdHVybi13aW5kb3dzLXBjLW5vdGVib29rLXdpcmVsZXNzLXJvdXRlci13aWZpLXJvdXRlci0zMC8%3D&#038;feed-stats-url-post-id=18416" class="wp_rp_title">Turn your Windows PC / notebook to Wireless Router with My Wifi Router 3.0 and TP-Link TL-WN722N</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18416" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/recreate-corrupted-windows-user-profile-solve-windows-signing-signing-loops/">How to Recreate a Corrupted Windows User Profile to Solve Windows Signing In / Signing Out Loops</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/recreate-corrupted-windows-user-profile-solve-windows-signing-signing-loops/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>How to Fix Windows Update When It Says “Up to Date” But Updates Are Missing</title>
		<link>https://www.pc-freak.net/blog/fix-windows-update-date-updates-missing/</link>
					<comments>https://www.pc-freak.net/blog/fix-windows-update-date-updates-missing/#respond</comments>
		
		
		<pubDate>Mon, 02 Mar 2026 14:04:00 +0000</pubDate>
				<category><![CDATA[OS Update]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[again]]></category>
		<category><![CDATA[cause]]></category>
		<category><![CDATA[complete]]></category>
		<category><![CDATA[Corrupted System Files]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[due]]></category>
		<category><![CDATA[everything]]></category>
		<category><![CDATA[exe]]></category>
		<category><![CDATA[Go Check Settings Windows Update Check]]></category>
		<category><![CDATA[Manually Reset Windows Update Components]]></category>
		<category><![CDATA[Pc]]></category>
		<category><![CDATA[Rename Update Folders]]></category>
		<category><![CDATA[Restart Services]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[Stability Features]]></category>
		<category><![CDATA[Stop Update Services]]></category>
		<category><![CDATA[store]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[updates]]></category>
		<category><![CDATA[Windows Installation Assistant]]></category>
		<category><![CDATA[Windows Logs Setup]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18410</guid>

					<description><![CDATA[<p>Knowing your system isn&#8217;t fully updated as OS BUILD Release&#160;does not match the latest one it has to&#160; but &#160;still Windows Update insists everything is &#8220;green&#8221; good and &#160;&#8220;Up to date.&#8221; is really weird and frustrating stuff Windows user can experience. It makes it even worser if you are like me and your computer is [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/fix-windows-update-date-updates-missing/">How to Fix Windows Update When It Says “Up to Date” But Updates Are Missing</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="windows-os-update-up-to-date-but-OS_update-release-lacking-behind-fix-Windows-shows-updated-but-it-is-not" src="https://www.pc-freak.net/images/windows-os-update-up-to-date-but-OS_update-release-lacking-behind-fix-Windows-shows-updated-but-it-is-not.png" style="height: 254px; width: 481px;" />
</p>
<p>
	Knowing your system isn&rsquo;t fully updated as <strong>OS BUILD Release</strong>&nbsp;does not match the latest one it has to&nbsp; but &nbsp;still <strong>Windows Update</strong> insists everything is &ldquo;<strong>green</strong>&rdquo;<strong> good</strong> and &nbsp;&ldquo;<strong>Up to date</strong>.&rdquo; is really weird and frustrating stuff Windows user can experience. It makes it even worser if you are like me and your computer is in a large corporate domain that is using <strong>Azure (Office 365)</strong> services for Auth.
</p>
<p>
	If some updates fail silently or don&rsquo;t install properly, your notebook / PC may be missing important security patches, Video / Sound Driver / Chipset driver fixes, or feature improvements etc, and with time it can lead due to Windows domain applied policies to left over your computer be considered Unsafe or Broken even dis-joined from the Domain.<br />
	&nbsp;
</p>
<h2>
	<strong>Why Windows Update Says Up to Date but Update Are missing Happens ?</strong><br />
</h2>
<p>
	There might be mutiple scenarios but Common causes include:
</p>
<ul>
<li>
		<em>Corrupted update cache</em>
	</li>
<li>
		<em>Interrupted installations (PC got hard shut down electricity power outage or<br />
		laptop battery has discharged during update)</em>
	</li>
<li>
		<em>Broken Windows services (due to)</em>
	</li>
<li>
		<em>System file corruption (cause of viruses / malware or during mess left over of multiple windows updates over years)</em>
	</li>
<li>
		<em>Registry conflicts (Windows registry conflicts due to installed PC apps etc.)</em>
	</li>
<li>
		<em>Failed cumulative updates</em>
	</li>
</ul>
<p>
	Windows may mark updates as &ldquo;processed&rdquo; even if installation didn&rsquo;t complete correctly.<br />
	Identifying Missing or Broken Windows updates is really hard sometimes.
</p>
<p>
	Usually to capture it you will have to:<br />
	<strong>Check the Windows</strong> <em><strong>OS Build Release</strong></em>
</p>
<p>
	from:&nbsp;<strong>Settings&nbsp;-&gt; System -&gt; About</strong>
</p>
<p>
	<strong><img decoding="async" alt="windows-11-settings-system-about-OS-BUILD-release-screenshotpng" src="https://www.pc-freak.net/images/windows-11-settings-system-about-OS-BUILD-release-screenshotpng.png" style="height: 450px; width: 800px;" /></strong>
</p>
<p>
	In this guide, will walk through proven methods to <strong>fix Windows Update when it&rsquo;s stuck or falsely reporting success</strong>.
</p>
<h2>
	<strong>1. Try PC Restart First</strong><br />
</h2>
<p>
	Before diving into advanced fixes:
</p>
<ul>
<li>
		Restart PC.
	</li>
<li>
		Go Check <strong>Settings &rarr; Windows Update &rarr; Check for updates</strong> again.
	</li>
</ul>
<p>
	Sometimes updates are downloaded but waiting for a reboot to complete installation and thus this oddity is observed.
</p>
<h2>
	<strong>2. Run the Built-In Windows Update Troubleshooter</strong><br />
</h2>
<p>
	Both Windows 10 and Windows 11 include a built-in repair tool (that is starting to get Legacy nowadays but still sometimes can help)
</p>
<p>
	<strong>Steps:</strong>
</p>
<ol>
<li>
		Open <strong>Settings</strong>
	</li>
<li>
		Go to <strong>System &rarr; Troubleshoot &rarr; Other troubleshooters</strong>
	</li>
<li>
		Find <strong>Windows Update</strong>
	</li>
<li>
		Click <strong>Run</strong>
	</li>
</ol>
<p>
	Let it complete the scan and apply any recommended fixes. Most time this won&rsquo;t solve it but as it is easy to try out give it a try.
</p>
<h2>
	<strong>3. Manually Reset Windows Update Components</strong><br />
</h2>
<p>
	If Windows still erroneously thinks everything is installed but something is broken internally, resetting the update components often solves the problem.
</p>
<h2>
	<strong>CleanUp SoftwareDistribution update cache folder is perhaps Most Effective FIX</strong><br />
</h2>
<p>
	Cleaning the <strong>C:\Windows\SoftwareDistribution</strong> folder is actually one of the most effective fixes when Windows refuses to install updates but claims everything is up to date.
</p>
<blockquote>
<p>
		<strong>C:\Windows\SoftwareDistribution</strong>
	</p>
</blockquote>
<p>
	This is where Windows temporarily stores:
</p>
<ul>
<li>
		<em>Downloaded update files</em>
	</li>
<li>
		<em>Update installation logs</em>
	</li>
<li>
		<em>Temporary metadata</em>
	</li>
<li>
		<em>Cached update database</em>
	</li>
</ul>
<p>
	If this cache becomes corrupted, Windows Update may:
</p>
<ul>
<li>
		<em>Fail silently</em>
	</li>
<li>
		<em>Not detect new updates</em>
	</li>
<li>
		<em>Show &ldquo;Up to date&rdquo; incorrectly</em>
	</li>
<li>
		<em>Get stuck at 0% or 100%</em>
	</li>
</ul>
<p>
	This method works in both Windows 10 and Windows 11.
</p>
<p>
	<strong>What Happens When You Delete SoftwareDistribution?</strong>
</p>
<p>
	<em><strong>Deleting (or renaming)</strong></em> the folder:
</p>
<ul>
<li>
		Does <strong>NOT</strong> delete installed updates
	</li>
<li>
		Does <strong>NOT</strong> break Windows
	</li>
<li>
		<strong>Forces Windows to rebuild the update cache</strong>
	</li>
<li>
		<strong>Forces a fresh update scan</strong>
	</li>
</ul>
<p>
	It&rsquo;s completely safe if you do it correct.
</p>
<h3>
	<strong>Recommended Method (Play Safe)</strong><br />
</h3>
<h3>
	<em>N!B! Do NOT delete the folder while update services are running.</em><br />
</h3>
<p>
	<strong>Step 1: Stop Windows Update Services</strong>
</p>
<p>
	Open <strong>Command Prompt as Administrator</strong> and run:<br />
	&nbsp;
</p>
<blockquote>
<p>
		<strong>net stop wuauserv<br />
		net stop bits<br />
		net stop cryptSvc<br />
		net stop msiserver</strong>
	</p>
</blockquote>
<p>
	Wait until all services stop successfully.
</p>
<h3>
	<strong>Step 2: Rename the Update Folder (Safer Than Deleting)</strong><br />
</h3>
<h3>
	<strong>Rename Update Folders</strong><br />
</h3>
<blockquote>
<p>
		<strong>move C:\Windows\SoftwareDistribution SoftwareDistribution.old</strong>
	</p>
</blockquote>
<p>
	Enter in Windows Safe Mode (to enter it <em><strong>Press SHIFT and choose Restart</strong></em>)
</p>
<p>
	Go to:
</p>
<blockquote>
<p>
		<strong>C:\Windows\SoftwareDistribution</strong>
	</p>
</blockquote>
<p>
	Rename it to:
</p>
<blockquote>
<p>
		<strong>C:\Windows\SoftwareDistribution.old</strong>
	</p>
</blockquote>
<p>
	If Windows refuses to move out, make sure services are stopped.
</p>
<p>
	To do it via <strong>Safe Mode with Command Prompt only</strong>
</p>
<blockquote>
<p>
		<strong>move c:\Windows\SoftwareDistribution C:\Windows\SoftwareDistribution.old</strong>
	</p>
</blockquote>
<h3>
	<strong>Step 3: Restart Services</strong><br />
</h3>
<p>
	Back in Command Prompt:
</p>
<blockquote>
<p>
		<strong>net start wuauserv<br />
		net start bits<br />
		net start cryptSvc<br />
		net start msiserver</strong>
	</p>
</blockquote>
<p>
	Restart Computer.<br />
	&nbsp;
</p>
<h2>
	<strong>4. Use the Microsoft Update Catalog to Manually download recent applied<br />
	Update</strong><br />
</h2>
<p>
	Sometimes a specific update fails repeatedly but Windows doesn&rsquo;t clearly report it.
</p>
<p>
	You can manually download it from:
</p>
<ul>
<li>
		Microsoft Update Catalog
	</li>
</ul>
<p>
	<strong>How to manually Instlal KB* Win update:</strong>
</p>
<ol>
<li>
		Find the KB number (for example: KB5030219)
	</li>
<li>
		Search for it in the catalog
	</li>
<li>
		Download the version matching your system (x64, ARM64, etc.)
	</li>
<li>
		Install manually
	</li>
</ol>
<p>
	This bypasses Windows Update&rsquo;s automatic system.
</p>
<h2>
	<strong>5. Use the Windows Installation Assistant</strong><br />
</h2>
<p>
	If feature updates (like 22H2 &rarr; 23H2) are not appearing, use:
</p>
<ul>
<li>
		Windows 11 Installation Assistant
	</li>
<li>
		Windows 10 Update Assistant
	</li>
</ul>
<p>
	These tools force a full system upgrade while keeping files and apps intact.
</p>
<h2>
	<strong>6. Check for Corrupted System Files</strong><br />
</h2>
<p>
	Corrupted system files can prevent updates from applying properly.
</p>
<p>
	Open Command Prompt as Administrator and run:
</p>
<blockquote>
<p>
		C:\Windows&gt; &nbsp;<strong>sfc /scannow</strong>
	</p>
</blockquote>
<p>
	Then run:
</p>
<blockquote>
<p>
		C:\Windows&gt; <strong>DISM /Online /Cleanup-Image /RestoreHealth</strong>
	</p>
</blockquote>
<p>
	After both scans complete, restart and try updating again.
</p>
<h2>
	<strong>7. Make Sure You&rsquo;re Not Paused or you are on a Metered connection</strong><br />
</h2>
<p>
	Windows may appear updated if:
</p>
<ul>
<li>
		Updates are paused
	</li>
<li>
		Your connection is set as metered
	</li>
<li>
		You&rsquo;re on a managed/work PC with update policies
	</li>
</ul>
<p>
	Check:
</p>
<ul>
<li>
		<strong>Settings &rarr; Windows Update &rarr; Advanced options</strong>
	</li>
</ul>
<h2>
	<strong>8. Check Your Windows Version Manually</strong><br />
</h2>
<p>
	Press <strong>Win + R</strong>, type:
</p>
<p>
	winver
</p>
<p>
	Compare your version with the latest available on Microsoft&rsquo;s official release page<br />
	https://learn.microsoft.com/en-en/windows/release-health/windows11-release-information<br />
	to confirm whether you&rsquo;re truly up to date.
</p>
<h2>
	<strong>9. Update your Video / Audio / Motherboard Chipsets and peripheral drivers to latest</strong><br />
</h2>
<p>
	<strong>Depending on the laptop brand or PC, Check for latest available install drivers from the Internet and apply it to PC.<br />
	Dell / HP and ASUS / ACER / MSI </strong>Usually has their dedicated software that can do that quickly, i.e. as i&#39;m<strong> using currently Dell notebook. </strong>There you can use<strong> Dell Comamnd Update / Dell SupportAssistant</strong> to do so<strong>.&nbsp;</strong><br />
	&nbsp;
</p>
<h2>
	<strong>10. Move catroot folder (to clean up Windows Update package signatures)</strong><br />
</h2>
<h2>
	<strong>What is catroot2 ?</strong><br />
</h2>
<p>
	The catroot2 folder is used by Microsoft Windows to store:
</p>
<ul>
<li>
		<em>Windows Update package signatures</em>
	</li>
<li>
		<em>Cryptographic catalog files (.cat files)</em>
	</li>
<li>
		<em>Data used by the Cryptographic Services component</em>
	</li>
<li>
		<em>Information needed to validate and install updates</em>
	</li>
<li>
		<em>It plays a critical role in verifying update integrity.</em>
	</li>
</ul>
<blockquote>
<p>
		<strong>move C:\Windows\System32\catroot2 catroot2.old</strong>
	</p>
</blockquote>
<p>
	is used as a repair step for Windows Update issues because it resets the Catroot2 folder, which stores important update-related data.
</p>
<h2>
	<strong>11. Perform an In-Place Repair Upgrade (Last Resort)</strong><br />
</h2>
<p>
	If nothing works:
</p>
<ol>
<li>
		Download the latest Windows ISO (Windows Installation Assistant)
	</li>
<li>
		Mount it
	</li>
<li>
		Run <strong>setup.exe</strong>
	</li>
<li>
		Choose <strong>Keep personal files and apps</strong>
	</li>
</ol>
<p>
	This reinstalls Windows without deleting your data and fixes deeply broken update components.
</p>
<h2>
	<strong>12. If none of these helps check Windows Logs for a clue</strong><br />
</h2>
<p>
	If you want to go even deeper, check <strong>Event Viewer</strong> logs under:
</p>
<p>
	<strong>Windows Logs &rarr; Setup</strong>
</p>
<p>
	That will show detailed update errors and will helpfully give you the clue on how to fix it.
</p>
<h2>
	<b>Summary / close up</b><br />
</h2>
<p>
	If <strong>Windows</strong> says &ldquo;<strong>Up to date</strong>&rdquo; but you suspect missing updates, don&rsquo;t ignore it, as soon your OS will either become messed or&nbsp;you will miss critical<em><strong> Performance and Performance improvements / Stability Features</strong></em>. Even if PC continues work relatively stable the missing<strong> Security patches would be critical</strong>, and the computer exposure to the internet lefts you as an easy<em><strong> victim for your computer to be hacked or infected</strong> by</em> some<strong> kind of encryption / ransomware worm</strong> etc.&nbsp;In most cases, the updates did not apply due to easy solvable issue and simple&nbsp;reset update components, a clean up of Update cache&nbsp;or manually installing the update solves the problem and <em>WIndows gets back to the wanted OS update release</em>. If this does not happen however you should check the system for Main system corrupted files&nbsp;
</p>
<p>
	&nbsp;</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-17987" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LXdpbmRvd3MtdXBkYXRlLXByb2JsZW1zLWNvbXBsZXRlLWd1aWRlLw%3D%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">How to Fix Windows Update Problems: A Complete Guide</a></li><li data-position="1" data-poid="in-16259" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGludXgtaG93dG8tZml4LXJlcG9zaXRvcnktaHR0cGRlYmRlYmlhbm9yZ2RlYmlhbi1idXN0ZXItaW5yZWxlYXNlLWNoYW5nZWQtdmVyc2lvbi0xMDktMTAxMC1lcnJvci1yZXNvbHZlLWFwdGdldC1yZWxlYXNlLXVwZGF0ZS1pc3N1ZS8%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Linux: Howto Fix &#8220;N: Repository &#8216;http://deb.debian.org/debian buster InRelease&#8217; changed its &#8216;Version&#8217; value from &#8216;10.9&#8217; to &#8216;10.10&#8217;&#8221; error to resolve apt-get release update issue</a></li><li data-position="2" data-poid="in-5547" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcGxheS10ZXJtaW5hbC12ZWxvY2l0eS10ZXJtaW5hbC1yZWFsaXR5LTNkLXNob290ZXItZG9zLWdhbWUtb24tZGViaWFuLXNxdWVlemUtZ251LWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Play Terminal Velocity (Terminal Reality) 3D shooter DOS game on Debian Squeeze GNU / Linux</a></li><li data-position="3" data-poid="in-5300" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc29sdmUtYWxzYS1hdWRpby1hbmQtbWljLWlzc3Vlcy1vbi1sZW5vdm8tdGhpbmtwYWRzLW9uLWRlYmlhbi1hbmQtdWJ1bnR1LWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Solve ALSA audio and mic issues on Lenovo Thinkpads on Debian and Ubuntu Linux</a></li><li data-position="4" data-poid="in-4226" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmVjb3ZlcmluZy1sb25nLWxvc3Qtd2Vic2l0ZS1pbmZvcm1hdGlvbi8%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Recovering long lost website information (data) with wayback machine</a></li><li data-position="5" data-poid="in-18416" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmVjcmVhdGUtY29ycnVwdGVkLXdpbmRvd3MtdXNlci1wcm9maWxlLXNvbHZlLXdpbmRvd3Mtc2lnbmluZy1zaWduaW5nLWxvb3BzLw%3D%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">How to Recreate a Corrupted Windows User Profile to Solve Windows Signing In / Signing Out Loops</a></li><li data-position="6" data-poid="in-18264" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVwbG95LWNlbnRyYWwtZG5zLWxpbnV4LTMtYXV0aG9yaXRhdGl2ZS1zZXJ2ZXJzLTEtcmVjdXJzaXZlLWNhY2hlLw%3D%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">How to Deploy Central DNS on Linux with 3 Authoritative Servers and 1 Recursive Cache</a></li><li data-position="7" data-poid="in-17997" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LXVwZGF0ZS1rYjUwNjA5OTktaW5zdGFsbGluZy13aW5kb3dzLTExLXZlcnNpb24tMjNoMjIyaDItZml4LXdpbmRvd3MtdXBkYXRlLWZhaWxlZC8%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Fix Update KB5060999 Not Installing On Windows 11 Version 23H2/22H2 / Fix windows Update failed</a></li><li data-position="8" data-poid="in-17947" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZWNvdmVyLWRlbGV0ZWQtZmlsZXMtd2luZG93cy1mcmVlLXVucGFpZC1zb2Z0d2FyZS8%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">How to Рecover deleted files in windows with Free ( unpaid ) software</a></li><li data-position="9" data-poid="in-17508" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3VtLXllYXItMjAyMy1sZXNzb25zLWxlYXJuZWQv&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Our baby Ekaterina becomes 6 months on 17 of May, 5 days after our boy Dimitar become 4 years. Sum it up my year 2023 experience, lessons learned.</a></li><li data-position="10" data-poid="in-17641" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZW5vcm1vdXMtc2NhbmRhbC1idWxnYXJpYW4tb3J0aG9kb3gtY2h1cmNoLWNvbnRpbnVlcy1idWxnYXJpYW4tb3J0aG9kb3gtY2h1cmNoLXB1dHMtbGlzdC0yLXByb3Blcmx5LWNob3Nlbi1iaXNob3BzLWNob2ljZS1sYXltYW4tcHJpZXN0cy1lcGFyY2h5Lw%3D%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Enormous Scandal in the Bulgarian Orthodox Church continues as the Bulgarian Orthodox Church Holy Synod acts as Masonic Lodge not venerating the people&#8217;s choice about future Metropolitan of the Eparchy</a></li><li data-position="11" data-poid="in-17335" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC16YWJiaXgtcHJveHktY2VudG9zLWxpbnV4LWNvbmZpZ3VyZS1jb25uZWN0LXphYmJpeC1zZXJ2ZXItaG93dG8v&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Install Zabbix Proxy configure and connect to Zabbix server on CentOS Linux</a></li><li data-position="12" data-poid="in-17108" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW1wcm92ZS1tb2JheHRlcm0td2luZG93cy10ZXJtaW5hbC1jbGllbnQtYWRkaXRpb25hbC1zZXR0aW5ncy10dW5lLXVwcy1pbnN0YWxsLWV4dHJhLWxpbnV4LWN5Z3dpbi10b29scy1tb2JheHRlcm0tcG9zdC1pbnN0YWxsLWNvbmZpZ3VyYXRpb24tZ29vZGllcy8%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">Improve MobaXterm Best Windows terminal client with some additional settings tune ups / Install extra Linux Cygwin tools on MobaXterm and various post install configuration goodies</a></li><li data-position="13" data-poid="in-16933" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZXh0ZW5kLWx2bS1mdWxsLXBhcnRpdGlvbi1iaWdnZXItc2l6ZS1saW51eC12aXJ0dWFsLW1hY2hpbmUtZ3Vlc3QtcnVubmluZy12bXdhcmUtdnNwaGVyZS8%3D&#038;feed-stats-url-post-id=18410" class="wp_rp_title">How to extend LVM full partition to bigger size on Linux Virtual machine Guest running in VMware vSphere</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18410" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/fix-windows-update-date-updates-missing/">How to Fix Windows Update When It Says “Up to Date” But Updates Are Missing</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/fix-windows-update-date-updates-missing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>Fix Windows error: The referenced account is currently locked out / Sign in Option is Disabled</title>
		<link>https://www.pc-freak.net/blog/fix-windows-error-referenced-account-locked-sign-option-disabled/</link>
					<comments>https://www.pc-freak.net/blog/fix-windows-error-referenced-account-locked-sign-option-disabled/#respond</comments>
		
		
		<pubDate>Sun, 01 Mar 2026 21:02:24 +0000</pubDate>
				<category><![CDATA[Computer Security]]></category>
		<category><![CDATA[Curious Facts]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administrator account]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[Check Time Date]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[contact]]></category>
		<category><![CDATA[due]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Fix Windows]]></category>
		<category><![CDATA[List Users Run]]></category>
		<category><![CDATA[Mount Windows Partition]]></category>
		<category><![CDATA[Navigate]]></category>
		<category><![CDATA[Open]]></category>
		<category><![CDATA[period]]></category>
		<category><![CDATA[Reboot]]></category>
		<category><![CDATA[resolve]]></category>
		<category><![CDATA[Save Changes]]></category>
		<category><![CDATA[setting]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[wait]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18405</guid>

					<description><![CDATA[<p>This error means your Windows account is temporarily locked due to&#160;too many failed password attempts. It is a security feature, usually lasting about 30 minutes to an hour before it automatically unlocks. To resolve it immediately, wait for the lockout period to expire, use another admin account, or log in to a different account.&#160; How [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/fix-windows-error-referenced-account-locked-sign-option-disabled/">Fix Windows error: The referenced account is currently locked out / Sign in Option is Disabled</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="the-referrenced-account-is-currently-locked-out-and-may-not-be-logged-on-to" src="https://www.pc-freak.net/images/the-referrenced-account-is-currently-locked-out-and-may-not-be-logged-on-to.png" style="width: 480px; height: 376px;" />
</p>
<p>
	This error means your Windows account is temporarily locked due to&nbsp;too many failed password attempts. It is a security feature, usually lasting about 30 minutes to an hour before it automatically unlocks. To resolve it immediately, wait for the lockout period to expire, use another admin account, or log in to a different account.&nbsp;
</p>
<h2>
	<strong>How to Fix the Locked Account Error</strong><br />
</h2>
<p>
	<em>Check Local Account/Safe Mode:&nbsp;</em>If you have another admin account on the computer, log in with it,
</p>
<p>
	open&nbsp;cmd&nbsp;as Administrator, and type cmd:
</p>
<blockquote>
<p>
		<strong>C:\Windows\System32&gt;&nbsp;net user yourusername /active:yes&nbsp;</strong>
	</p>
</blockquote>
<p>
	<br />
	<strong>to unlock it.</strong>
</p>
<p>
	Alternatively, boot into Safe Mode to access the system. To do so Hold continuosly (Right or Left Shift key), while on the Windows Login Prompt and choose Restart.
</p>
<p>
	Wait like this until PC boots and choose the <strong>Appearing Troubleshoot -&gt; Console</strong> option.
</p>
<p>
	From recovery console to list the users:
</p>
<blockquote>
<p>
		<strong>C:\Windows\System32&gt; net user</strong>
	</p>
</blockquote>
<h2>
	<br />
	<strong>Check Time/Date (are&nbsp;correct)</strong><br />
</h2>
<p>
	Ensure your system&#39;s time and date are accurate, as discrepancies can cause authentication failures.
</p>
<h2>
	<strong>Wait it Out</strong><br />
</h2>
<p>
	&nbsp;The <strong>simplest annoying fix is waiting 30&ndash;60 minutes</strong>, as the account will automatically unlock itself.<br />
	Restart the Computer:&nbsp;A simple reboot can sometimes clear temporary policy locks.<br />
	Use an <strong>Administrator Account</strong>:&nbsp;If it is a domain account, contact your IT helpdesk (if you have such) to unlock it.
</p>
<h2>
	<strong>Account Unlock Method 2: Unlock Windows Locked Account via lusrmgr.msc</strong><br />
</h2>
<p>
	If you could still log into your computer using another administrator account, you can open the Local Users and Groups snap-in (lusrmgr.msc) and unlock any locked Windows account easily.
</p>
<p>
	1. Press the Windows + R keys to open the Run dialog, type lusrmgr.msc, and click OK.
</p>
<blockquote>
<p>
		<strong>lusrmgr.msc</strong>
	</p>
</blockquote>
<p>
	<img decoding="async" alt="lusrmgt-fix-locked-windows-user-properties-menu" src="https://www.pc-freak.net/images/lusrmgt-fix-locked-windows-user-properties-menu.png" />
</p>
<p>
	2. Click the Users folder in the left pane of<strong> Local Users and Groups</strong> snap-in. Next, right-click on your locked account in the middle pane and then select <em><strong>Properties</strong></em>.<br />
	&nbsp;
</p>
<p>
	3. Under the <strong>General tab</strong>, uncheck the option labelled <strong>Account is locked out</strong>, and then click Apply to unlock your account. That&#39;s it!
</p>
<p>
	<img decoding="async" alt="account-properties-account-is-locked-out-fix-windows-locked-account.png" src="https://www.pc-freak.net/images/account-properties-account-is-locked-out-fix-windows-locked-account.png" style="width: 402px; height: 456px;" />
</p>
<h2>
	<strong>Unlock locked windows Admin account with linux</strong><br />
</h2>
<p>
	Unlocking a locked Windows local account using Linux is achieved by booting from a live Linux USB (such as Ubuntu or Kali Linux) and using the chntpw (Change NT Password) utility to edit the Windows Security Accounts Manager (SAM) database. This method works for local accounts, but not for online Microsoft accounts.&nbsp;
</p>
<h2>
	<strong>Prerequisites</strong><br />
</h2>
<p>
	A USB drive (<strong>min 8GB</strong>) to<em> create a bootable Linux live environment</em>.<br />
	The chntpw utility (installed by default on Kali Linux, or installed via sudo apt install chntpw on other distributions).<br />
	Crucial: Disable Fast Startup in Windows or ensure a full shutdown (hold Shift while clicking Shut Down) to prevent the partition from being locked in read-only mode.&nbsp;
</p>
<h2>
	<strong>Step-by-Step Guide: Using chntpw command</strong><br />
</h2>
<p>
	Create and <em>Boot Live USB</em>: Download a Linux ISO (e.g., Ubuntu, Kali), burn it to a USB using Rufus or Etcher, and boot the locked computer from this USB.<br />
	Mount Windows Partition:<br />
	Open a terminal and identify your Windows drive:&nbsp;
</p>
<blockquote>
<p>
		<strong>#&nbsp; fdisk -l</strong>
	</p>
</blockquote>
<p>
	Mount the partition (e.g.<strong>/dev/sda2</strong>):
</p>
<blockquote>
<p>
		<strong># mkdir /mnt/windows<br />
		# mount /dev/sda2 /mnt/window</strong>s
	</p>
</blockquote>
<p>
	Navigate to SAM Registry:
</p>
<blockquote>
<p>
		<strong># cd /mnt/windows/Windows/System32/config/</strong>
	</p>
</blockquote>
<p>
	<br />
	List Users: Run the following to list users and find the RID (Relative ID) for your account:
</p>
<blockquote>
<p>
		<strong># chntpw -l SAM</strong>
	</p>
</blockquote>
<p>
	Edit <strong>User / Unlock Account</strong>:<br />
	Run the interactive tool for your username (replace username):
</p>
<blockquote>
<p>
		<strong># chntpw -u username SAM</strong>
	</p>
</blockquote>
<p>
	To unlock: Press 2 to unlock and enable the user account.<br />
	To clear password: Press 1 to clear the password.<br />
	Save Changes: When asked &quot;Write hive files?&quot;, type y and press Enter.<br />
	Reboot:
</p>
<blockquote>
<p>
		<strong># umount /mnt/windows<br />
		# reboot</strong>
	</p>
</blockquote>
<h2>
	<br />
	<strong>Account Unlock Method 3: Unlock Windows Locked Account with PCUnlocker (boot CD image)</strong><br />
</h2>
<p>
	Sometimes you might <em>get your only admin account locked out after successive failed login attempts</em>.
</p>
<p>
	For security if you are a paranoid sysadmin who&nbsp;configured to automatically unlock the account, you&#39;ll be permanently locked out of Windows box and none of the usual tricks work to get you back in, then a boot CD like PCUnlocker would be perhaps the only option.
</p>
<p>
	<img decoding="async" alt="Enterprise_Edition_program-to-unlock-locked-Windows-administrator-Account-using-boot-windows-ISO-program2" src="https://www.pc-freak.net/images/Enterprise_Edition_program-to-unlock-locked-Windows-administrator-Account-using-boot-windows-ISO-program2.png" style="width: 480px; height: 297px;" />
</p>
<p>
	<strong>Download </strong>the <strong>PCUnlocker </strong>utility (ZIP archive) and save it to your desktop or another place you can get to easily. Extract the ZIP file to your local drive and you&#39;ll get an ISO file.<br />
	Next, <strong>burn the ISO</strong> file to a <em>blank CD</em> using your <em>favorite image burning program</em>. If you want to install PCUnlocker onto a USB flash drive, I recommend using the freeware like&nbsp;<strong>ISO2Disc</strong>.
</p>
<p>
	<img decoding="async" alt="Enterprise_Edition_program-to-unlock-locked-Windows-administrator-Account-using-boot-windows-ISO-program" src="https://www.pc-freak.net/images/Enterprise_Edition_program-to-unlock-locked-Windows-administrator-Account-using-boot-windows-ISO-program.png" style="height: 431px; width: 480px;" />
</p>
<p>
	<em>Boot your locked computer from the CD just burned</em>.
</p>
<p>
	To to so, you may need to<em> change the BIOS boot order so the CD drive option is listed first (if it is not already done in BIOS)</em>.<br />
	After successfully booting from the CD, <strong>PCUnlocker</strong> will list out all accounts on your computer available to manage.
</p>
<p>
	Under the &quot;<strong>Locked Out</strong>&quot; column in the list, you can see which account is locked out already.
</p>
<p>
	Choose your locked account / click on <strong>Reset Password button</strong>.<br />
	It will quickly&nbsp;unlock your Windows account and <em><strong>remove the existing password</strong></em>.<br />
	Remove the disc from PC. Restart it and log in as you normally do, but leave the&nbsp;password field empty.<br />
	You should be in!
</p>
<p>
	After fixing the &quot;<strong>The referenced account is currently locked out and may not be logged on to</strong>&quot; <em><strong>error.|</strong></em><br />
	&nbsp;Consider <em>setting a new Windows password that is hard to guess but easy to remember</em>, or change the <em><strong>account lockout policy in Windows</strong></em>, to prevent&nbsp; account to be locked out in future.</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-11099" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG9zdC1ibG9ja2VkLWNvbm5lY3Rpb24tZXJyb3JzLXVuYmxvY2stbXlzcWxhZG1pbi1mbHVzaGhvc3RzLw%3D%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Fix MySQL connection error &#8211; Host &#8221; is blocked because of many connection errors; unblock with &#8216;mysqladmin flush-hosts&#8217;</a></li><li data-position="1" data-poid="in-17997" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LXVwZGF0ZS1rYjUwNjA5OTktaW5zdGFsbGluZy13aW5kb3dzLTExLXZlcnNpb24tMjNoMjIyaDItZml4LXdpbmRvd3MtdXBkYXRlLWZhaWxlZC8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Fix Update KB5060999 Not Installing On Windows 11 Version 23H2/22H2 / Fix windows Update failed</a></li><li data-position="2" data-poid="in-17831" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZW5hYmxlLWRlYmlhbi1saW51eC1hdXRvbWF0aWMtdXBkYXRlcy1vcy1zZWN1cml0eS1kYXRlLw%3D%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Enable Debian Linux automatic updates to keep latest OS Patches / Security Up to Date</a></li><li data-position="3" data-poid="in-16623" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbW9uaXRvci1zZXJ2aWNlLWxvZy1jb250aW5vdXNseS1ncm93aW5nLXphYmJpeC13aW5kb3dzLWJhdGNoLXVzZXJwYXJhbWV0ZXItc2NyaXB0LXRyaWdnZXItYWxlcnQtbG9nLXVuY2hhbmdlZC8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Monitor service log is continously growing with Zabbix on Windows with batch userparameter script and trigger Alert if log is unchanged</a></li><li data-position="4" data-poid="in-15693" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvcmVtb3ZlLXVudXNlZC1rZXJuZWxzLWNlbnRvcy1saW51eC1ob3d0by8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Remove old unused kernels and cleanup orphaned packages on CentOS / RHEL/ Fedora and Debian Linux</a></li><li data-position="5" data-poid="in-15671" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW1wcm92ZS13b3JkcHJlc3MtYWRtaW4tcGFzc3dvcmQtZW5jcnlwdGlvbi1hdXRoZW50aWNhdGlvbi1rZXlzLXNlY3VyaXR5LXdvcmRwcmVzcy11bmlxdWUtYXV0aGVudGljYXRpb24ta2V5cy1zYWx0cy8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Improve wordpress admin password encryption authentication keys security with WordPress Unique Authentication Keys and Salts</a></li><li data-position="6" data-poid="in-14994" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc2hvdy1kcm9wcGVkLW51bWJlci1uZnMtY29ubmVjdGlvbnMtdGlwcy1kZWJ1Z2dpbmctbmZzLWhhbmdlZC1pc3N1ZXMv&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Howto  debug and remount NFS hangled filesystem on Linux</a></li><li data-position="7" data-poid="in-14951" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvdXBncmFkZS1kZWJpYW4tbGludXgtOS0xMC1zdHJldGNoLWJ1c3Rlci1kaXNhYmxlLWdyYXBoaWNhbC1zZXJ2aWNlLWxvYWQtYm9vdC1kZWJpYW4tMTAtbGludXgtZGViaWFuLWJ1c3Rlci8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Upgrade Debian Linux  9 to 10 Stretch to Buster and Disable graphical service load boot on Debian 10 Linux / Debian Buster is out</a></li><li data-position="8" data-poid="in-10468" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvam9vbWxhLWRpc2FibGUtZW1haWwtY29weS1tZXNzYWdlLWFkZHJlc3Mtc3RvcC1jb250YWN0LWZvcm0tc3BhbS1lbWFpbHMtam9vbWxhLw%3D%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Stop contact form spam emails in Joomla, Disable &#8220;E-mail a copy of this message to your own address.&#8221; in Joomla</a></li><li data-position="9" data-poid="in-10172" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGludXgtcmVuYW1lLWZpbGVzLWV4dGVuc2lvbi11cHBlci1jYXNlcy8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Linux: Rename all files extension from upper to lower cases </a></li><li data-position="10" data-poid="in-6273" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG9zdC1uYW1lLWlzLWJsb2NrZWQtYmVjYXVzZS1vZi1tYW55LWNvbm5lY3Rpb24tZXJyb3JzLXVuYmxvY2std2l0aC1teXNxbGFkbWluLWZsdXNoLWhvc3RzLw%3D%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">&#8216;host-name&#8217; is blocked because of many connection errors; unblock with &#8216;mysqladmin flush-hosts&#8217;</a></li><li data-position="11" data-poid="in-5665" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWFkZC1leHRyYS1wbHVnaW5zLWVmZmVjdHMtYnJ1c2hlcy1hbmQtZnVuY3Rpb25hbGl0eS10by1naW1wLW9uLWdudS1saW51eC8%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">How to add extra plugins, effects, brushes and functionality to GIMP on GNU / Linux</a></li><li data-position="12" data-poid="in-5485" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLWluc3RhbGwtb3Blbm50cGQtbnRwLXNlcnZlci10by1zeW5jaHJvbml6ZS1zeXN0ZW0tY2xvY2stb24tZnJlZWJzZC1mb3ItYmV0dGVyLXNlY3VyaXR5Lw%3D%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">How to install OpenNTPD NTP server to synchronize system clock on FreeBSD for better security</a></li><li data-position="13" data-poid="in-5392" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZml4LWF1ZGlvY2QtcGxheS1wcm9ibGVtcy13aXRoLXZsYy1vbi1nbnUtbGludXgtaG93LXRvLXBsYXktYXVkaW8tY2RzLW9uLWdudWxpbnV4LWFuZC1mcmVlYnNkLw%3D%3D&#038;feed-stats-url-post-id=18405" class="wp_rp_title">Fix audioCD play problems with VLC on GNU Linux</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18405" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/fix-windows-error-referenced-account-locked-sign-option-disabled/">Fix Windows error: The referenced account is currently locked out / Sign in Option is Disabled</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/fix-windows-error-referenced-account-locked-sign-option-disabled/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>How to Install and Use Kibana for Log Visualization</title>
		<link>https://www.pc-freak.net/blog/install-kibana-log-visualization/</link>
					<comments>https://www.pc-freak.net/blog/install-kibana-log-visualization/#respond</comments>
		
		
		<pubDate>Wed, 18 Feb 2026 14:53:52 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Various]]></category>
		<category><![CDATA[Access Kibana Web Interface]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[Common Kibana Use Cases]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Detect]]></category>
		<category><![CDATA[Edit]]></category>
		<category><![CDATA[ELK]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[htpasswd]]></category>
		<category><![CDATA[info]]></category>
		<category><![CDATA[Ingest Logs]]></category>
		<category><![CDATA[linux?]]></category>
		<category><![CDATA[Open]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[scenarios]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SSO]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Useful]]></category>
		<category><![CDATA[www]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18106</guid>

					<description><![CDATA[<p>I saw Kibana in my professional career and I find it a very&#160;interesting tool for sysadmins, so I thought it might be helpful to someone out there to write a small article on how to install and use to to visualize data inside some elasticsearch software. Kibana is an open-source data visualization and exploration tool [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/install-kibana-log-visualization/">How to Install and Use Kibana for Log Visualization</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="/images/kibana-logo how to install it on linux" src="https://www.pc-freak.net/images//kibana-logo.jpg" style="width: 350px; height: 222px;" /><br />
	I saw Kibana in my professional career and I find it a very&nbsp;interesting tool for sysadmins, so I thought it might be helpful to someone out there to write a small article on how to install and use to to visualize data inside some <strong>elasticsearch</strong> software.
</p>
<p>
	<strong>Kibana</strong> is an open-source data visualization and exploration tool used to analyze large volumes of data, especially logs. It is part of the <strong>ELK Stack</strong> (<em><strong>Elasticsearch, Logstash, Kibana</strong></em>), and is commonly used for <strong>centralized log management</strong>, <strong>security monitoring</strong>, and <strong>observability</strong>.
</p>
<p>
	Kibana is often used in the&nbsp;so-called&nbsp;<strong>ELK</strong>&nbsp;pipeline for log file collection, analysis and visualization:
</p>
<ul>
<li>
		<strong>E</strong>lasticsearch is for searching, analyzing, and storing your data
	</li>
<li>
		<strong>L</strong>ogstash (and Beats) is for collecting and transforming data, from any source, in any format
	</li>
<li>
		<strong>K</strong>ibana is a portal for visualizing the data and to navigate within the elastic stack<br />
		&nbsp;
	</li>
</ul>
<p>
	In this article, you&#39;ll learn how to:
</p>
<ul>
<li>
		<em>Install Kibana</em>
	</li>
<li>
		<em>Connect it to Elasticsearch</em>
	</li>
<li>
		<em>Visualize log data</em>
	</li>
<li>
		<em>Use its basic features</em>
	</li>
</ul>
<h2>
	<strong>Prerequisites</strong><br />
</h2>
<p>
	Before installing Kibana, make sure you have the following:
</p>
<ul>
<li>
		A <strong>Linux server</strong>&nbsp;running (<em>Ubuntu / Debian / CentOS / RHEL</em>)
	</li>
<li>
		<strong>Elasticsearch</strong> installed and running
	</li>
<li>
		<strong>Root or sudo</strong> access
	</li>
</ul>
<h2>
	<strong>Install Kibana</strong><br />
</h2>
<h2>
	<strong>I. On Debian/Ubuntu</strong><br />
	&nbsp;<br />
</h2>
<ol>
<li>
<h2>
			<strong>Import the Elastic GPG key:</strong><br />
		</h2>
</li>
</ol>
<blockquote>
<p>
		<strong># wget -qO &#8211; https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add &#8211;</strong>
	</p>
</blockquote>
<ol>
<li value="2">
<h2>
			<strong>Add the repository:</strong><br />
		</h2>
</li>
</ol>
<blockquote>
<p>
		<strong># echo &quot;deb https://artifacts.elastic.co/packages/8.x/apt stable main&quot; | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list</strong>
	</p>
</blockquote>
<ol>
<li value="3">
<h2>
			<strong>Update and install:</strong><br />
		</h2>
</li>
</ol>
<blockquote>
<p>
		<br />
		<strong># apt update</strong>
	</p>
<p>
		<strong># apt install kibana</strong>
	</p>
</blockquote>
<h2>
	<strong>II. On RHEL/CentOS Linux</strong><br />
</h2>
<ol>
<li>
<h2>
			<strong>Create repo file:</strong><br />
		</h2>
</li>
</ol>
<blockquote>
<p>
		# tee /etc/yum.repos.d/elastic.repo &lt;&lt;EOF
	</p>
<p>
		[elastic-8.x]
	</p>
<p>
		name=Elastic repository for 8.x packages
	</p>
<p>
		baseurl=https://artifacts.elastic.co/packages/8.x/yum
	</p>
<p>
		gpgcheck=1
	</p>
<p>
		gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
	</p>
<p>
		enabled=1
	</p>
<p>
		autorefresh=1
	</p>
<p>
		type=rpm-md
	</p>
<p>
		EOF
	</p>
</blockquote>
<ol>
<li value="2">
<h3>
			<strong>Install Kibana:</strong><br />
		</h3>
</li>
</ol>
<blockquote>
<p>
		<strong># yum install kibana</strong>
	</p>
</blockquote>
<h2>
	<strong>2. Configure Kibana</strong><br />
</h2>
<p>
	The configuration file is located at:
</p>
<blockquote>
<p>
		<strong>/etc/kibana/kibana.yml</strong>
	</p>
</blockquote>
<p>
	Edit the file:
</p>
<blockquote>
<p>
		<strong># vim /etc/kibana/kibana.yml</strong>
	</p>
</blockquote>
<p>
	Update or add the following:<br />
	&nbsp;
</p>
<blockquote>
<p>
		<strong># Server settings<br />
		server.port: 5601<br />
		server.host: &quot;0.0.0.0&quot;</strong>
	</p>
<p>
		<strong># Elasticsearch connection<br />
		elasticsearch.hosts: [&#8220;http://localhost:9200&#8221;]</strong>
	</p>
<p>
		<strong># Logging<br />
		logging.level: info</strong>
	</p>
<p>
		<strong># Security (only if Elasticsearch security is enabled)<br />
		# elasticsearch.username: &quot;kibana_system&quot;<br />
		# elasticsearch.password: &quot;your_password_here&quot;</strong>
	</p>
</blockquote>
<p>
	Optional: Set basic auth or SSL settings if needed.
</p>
<div align="center">
	&nbsp;
</div>
<h2>
	<strong>3.&nbsp;Start and Enable Kibana</strong><br />
</h2>
<blockquote>
<p>
		<strong># systemctl enable kibana</strong>
	</p>
<p>
		<strong># systemctl start kibana</strong>
	</p>
</blockquote>
<p>
	Check status:
</p>
<blockquote>
<p>
		<strong># systemctl status kibana<br />
		&#8230;</strong>
	</p>
</blockquote>
<div align="center">
	&nbsp;
</div>
<h2>
	<strong>4.&nbsp;Access Kibana Web Interface</strong><br />
</h2>
<p>
	Open your browser and go to:
</p>
<blockquote>
<p>
		<strong><em>http://&lt;your-server-ip&gt;:5601</em></strong>
	</p>
</blockquote>
<p>
	You&rsquo;ll be welcomed with the Kibana dashboard.
</p>
<p>
	<img decoding="async" alt="" src="https://www.pc-freak.net/images/lg-stash-elasticsearch-kibana-flow-simple-diagram.png" style="height: 215px; width: 800px;" />
</p>
<h2>
	<strong>5.&nbsp;Import and Visualize Logs</strong><br />
</h2>
<h3>
	<strong>Option A: Use Filebeat to Send Logs</strong><br />
</h3>
<p>
	Install Filebeat on the server with logs and configure it to send data to Elasticsearch. Kibana will then be able to visualize it.
</p>
<blockquote>
<p>
		<strong># apt install filebeat</strong>
	</p>
<p>
		<strong># filebeat modules enable system</strong>
	</p>
<p>
		<strong># filebeat setup</strong>
	</p>
<p>
		<strong># systemctl start filebeat</strong>
	</p>
</blockquote>
<h3>
	<strong>Option B: Ingest Logs via Logstash or Elasticsearch API</strong><br />
</h3>
<p>
	If you already have data in Elasticsearch, Kibana will automatically detect indices.<br />
	&nbsp;
</p>
<h2>
	<strong>6.&nbsp;Create Index Pattern</strong><br />
</h2>
<ol>
<li>
		In Kibana, go to <strong>Stack Management -&gt;&nbsp;Index Patterns</strong>
	</li>
<li>
		Click <strong>Create Index Pattern</strong>
	</li>
<li>
		Enter the name (e.g., <strong>filebeat-*</strong>)
	</li>
<li>
		Select the timestamp field (usually @timestamp)
	</li>
<li>
		Save
	</li>
</ol>
<p>
	Now Kibana knows how to query and visualize your data.
</p>
<h2>
	<strong>7.&nbsp;Create Visualizations and Dashboards</strong><br />
</h2>
<ol>
<li>
		Go to <strong>Visualize -&gt;&nbsp;Create visualization</strong>
	</li>
<li>
		Choose a type (bar, pie, line, etc.)
	</li>
<li>
		Select an index pattern
	</li>
<li>
		Configure metrics and buckets
	</li>
</ol>
<p>
	You can then <strong>save visualizations</strong> and <strong>add them to dashboards</strong>.
</p>
<h2>
	<strong>8. Secure Kibana</strong><br />
</h2>
<ul>
<li>
		Configure <strong>TLS/SSL</strong> for Kibana / <strong>ElasticSearch (</strong>such as<strong> Logstash)</strong>
	</li>
<li>
		Use additional&nbsp;<strong>Elastic Security</strong> features like<em>&nbsp;<strong>RBAC (Role Based Access Control, SSO (Single Sign On)</strong></em>
	</li>
<li>
		Secure Kibana with a reverse proxy (e.g., <strong>Nginx + Basic Auth or Apache / Haproxy infront</strong>)
	</li>
</ul>
<p>
	Example Nginx config simple snippet:
</p>
<blockquote>
<p>
		<em>location / {</em>
	</p>
<p>
		<em>&nbsp; proxy_pass http://localhost:5601;</em>
	</p>
<p>
		<em>&nbsp; auth_basic &quot;Restricted&quot;;</em>
	</p>
<p>
		<em>&nbsp; auth_basic_user_file /etc/nginx/.htpasswd;</em>
	</p>
<p>
		<em>}</em>
	</p>
</blockquote>
<div align="center">
	&nbsp;
</div>
<h2>
	<b>What is Kibana used for and what it can do for you?</b><br />
</h2>
<table border="0" cellpadding="0" cellspacing="3">
<thead>
<tr>
<th>
<p>
					<strong>Use Case</strong>
				</p>
</th>
<th>
<p>
					<strong>Description</strong>
				</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>
					<strong>Log Monitoring</strong>
				</p>
</td>
<td>
<p>
					<em>Visualize system and application logs in real time</em>
				</p>
</td>
</tr>
<tr>
<td>
<p>
					<strong>Security Analytics</strong>
				</p>
</td>
<td>
<p>
					<em>Detect anomalies, failed logins, suspicious activity</em>
				</p>
</td>
</tr>
<tr>
<td>
<p>
					<strong>DevOps Dashboards</strong>
				</p>
</td>
<td>
<p>
					<em>Track uptime, error rates, and system performance</em>
				</p>
</td>
</tr>
<tr>
<td>
<p>
					<strong>SIEM</strong>
				</p>
</td>
<td>
<p>
					<em>Use Elastic Security for threat detection</em>
				</p>
</td>
</tr>
</tbody>
</table>
<p>
	&nbsp;
</p>
<p>
	Once <strong>Kibana</strong> is installed on a server, you typically use it to <strong>visualize and explore data stored in Elasticsearch</strong>. Here&rsquo;s a practical guide with <strong>sample usage scenarios</strong>:
</p>
<h3>
	<strong>Access Kibana</strong><br />
</h3>
<p>
	After installation, Kibana usually runs on <strong>port 5601</strong> by default.
</p>
<p>
	http://&lt;your-server-ip&gt;:5601
</p>
<ul>
<li>
		Open this URL in a browser.
	</li>
<li>
		You should see the <strong>Kibana dashboard</strong>.
	</li>
</ul>
<p>
	<strong>Connect to Elasticsearch</strong>
</p>
<p>
	Kibana automatically connects to your Elasticsearch instance if installed locally.<br />
	You can verify the connection:
</p>
<p>
	GET /_cluster/health
</p>
<ul>
<li>
		Go to <strong>Dev Tools</strong> &rarr; <strong>Console</strong> in Kibana.
	</li>
<li>
		Run the above query to check cluster status.
	</li>
</ul>
<h3>
	<strong>Visualize Data</strong><br />
</h3>
<p>
	Kibana allows multiple types of visualizations:
</p>
<ul>
<li>
		<strong>Bar/line chart</strong>: trends over time.
	</li>
<li>
		<strong>Pie chart</strong>: distribution of values.
	</li>
<li>
		<strong>Data table</strong>: top IP addresses or most visited URLs.
	</li>
<li>
		<strong>Maps</strong>: geolocation of IP addresses.
	</li>
</ul>
<p>
	<strong>Create Dashboards</strong>
</p>
<ul>
<li>
		Combine multiple visualizations in a <strong>Dashboard</strong>.
	</li>
<li>
		Useful for <strong>monitoring logs, metrics, or application performance</strong>.
	</li>
<li>
		Example: Create a dashboard with:</p>
<p>
			&nbsp;
		</p>
<ul>
<li>
				Requests per URL (bar chart)
			</li>
<li>
				Requests over time (line chart)
			</li>
<li>
				Top client IPs (data table)
			</li>
<li>
				Errors by type (pie chart)
			</li>
</ul>
</li>
</ul>
<h3>
	<strong>&nbsp;Search &amp; Query Logs</strong><br />
</h3>
<ul>
<li>
		Use <strong>Discover</strong> to search logs interactively.
	</li>
<li>
		Example KQL query:
	</li>
</ul>
<p>
	status:500 AND url:&quot;/login&quot;
</p>
<p>
	This finds all failed login requests.
</p>
<h3>
	<strong>Set Alerts (Optional)</strong><br />
</h3>
<ul>
<li>
		Kibana&rsquo;s <strong>Alerts and Actions</strong> can trigger notifications (email, Slack, etc.) when certain thresholds are crossed.
	</li>
<li>
		Example: alert if <strong>error responses exceed 100 in 5 minutes</strong>.
	</li>
</ul>
<p>
	Once <strong>Kibana</strong> is installed on a server, you typically use it to <strong>visualize and explore data stored in Elasticsearch</strong>. Here&rsquo;s a practical guide with <strong>sample usage scenarios</strong>:
</p>
<h3>
	<strong>Access Kibana</strong><br />
</h3>
<p>
	After installation, Kibana usually runs on <strong>port 5601</strong> by default.
</p>
<p>
	http://&lt;your-server-ip&gt;:5601
</p>
<ul>
<li>
		Open this URL in a browser.
	</li>
<li>
		You should see the <strong>Kibana dashboard</strong>.
	</li>
</ul>
<p>
	<strong>Connect to Elasticsearch</strong>
</p>
<p>
	Kibana automatically connects to your Elasticsearch instance if installed locally.<br />
	You can verify the connection:
</p>
<p>
	GET /_cluster/health
</p>
<ul>
<li>
		Go to <strong>Dev Tools</strong> &rarr; <strong>Console</strong> in Kibana.
	</li>
<li>
		Run the above query to check cluster status.
	</li>
</ul>
<h3>
	<strong>Visualize Data</strong><br />
</h3>
<p>
	Kibana allows multiple types of visualizations:
</p>
<ul>
<li>
		<strong>Bar/line chart</strong>: trends over time.
	</li>
<li>
		<strong>Pie chart</strong>: distribution of values.
	</li>
<li>
		<strong>Data table</strong>: top IP addresses or most visited URLs.
	</li>
<li>
		<strong>Maps</strong>: geolocation of IP addresses.
	</li>
</ul>
<h3>
	<strong>Create Dashboards</strong><br />
</h3>
<ul>
<li>
		Combine multiple visualizations in a <strong>Dashboard</strong>.
	</li>
<li>
		Useful for <strong>monitoring logs, metrics, or application performance</strong>.
	</li>
<li>
		Example: Create a dashboard with:<br />
		&nbsp;</p>
<ul>
<li>
				Requests per URL (bar chart)
			</li>
<li>
				Requests over time (line chart)
			</li>
<li>
				Top client IPs (data table)
			</li>
<li>
				Errors by type (pie chart)
			</li>
</ul>
</li>
</ul>
<h3>
	<strong>&nbsp;Search &amp; Query Logs</strong><br />
</h3>
<ul>
<li>
		Use <strong>Discover</strong> to search logs interactively.
	</li>
<li>
		Example KQL query:
	</li>
</ul>
<p>
	status:500 AND url:&quot;/login&quot;
</p>
<p>
	This finds all failed login requests.
</p>
<h3>
	<strong>Set Alerts (Optional)</strong><br />
</h3>
<ul>
<li>
		Kibana&rsquo;s <strong>Alerts and Actions</strong> can trigger notifications (email, Slack, etc.) when certain thresholds are crossed.
	</li>
<li>
		Example: alert if <strong>error responses exceed 100 in 5 minutes</strong>.
	</li>
</ul>
<p>
	Once <strong>Kibana</strong> is installed on a server, you typically use it to <strong>visualize and explore data stored in Elasticsearch</strong>. Here&rsquo;s a practical guide with <strong>sample usage scenarios</strong>:
</p>
<h3>
	<strong>Access Kibana</strong><br />
</h3>
<p>
	After installation, Kibana usually runs on <strong>port 5601</strong> by default.
</p>
<p>
	<strong>http://your-server-ip:5601</strong>
</p>
<ul>
<li>
		Open this URL in a browser.
	</li>
<li>
		You should see the <strong>Kibana dashboard</strong>.
	</li>
</ul>
<h3>
	<strong>Connect to Elasticsearch</strong><br />
</h3>
<p>
	Kibana automatically connects to your Elasticsearch instance if installed locally.<br />
	You can verify the connection:
</p>
<blockquote>
<p>
		<em><strong>GET /_cluster/health</strong></em>
	</p>
</blockquote>
<ul>
<li>
		Go to <strong>Dev Tools</strong> &rarr; <strong>Console</strong> in Kibana.
	</li>
<li>
		Run the above query to check cluster status.
	</li>
</ul>
<h3>
	<strong>Visualize Data</strong><br />
</h3>
<p>
	Kibana allows multiple types of visualizations:
</p>
<ul>
<li>
		<strong>Bar/line chart</strong>: trends over time.
	</li>
<li>
		<strong>Pie chart</strong>: distribution of values.
	</li>
<li>
		<strong>Data table</strong>: top IP addresses or most visited URLs.
	</li>
<li>
		<strong>Maps</strong>: geolocation of IP addresses.
	</li>
</ul>
<h3>
	<strong>Create Dashboards</strong><br />
</h3>
<ul>
<li>
		Combine multiple visualizations in a <strong>Dashboard</strong>.
	</li>
<li>
		Useful for <strong>monitoring logs, metrics, or application performance</strong>.
	</li>
<li>
		Example: Create a dashboard with:</p>
<ul>
<li>
				Requests per URL (bar chart)
			</li>
<li>
				Requests over time (line chart)
			</li>
<li>
				Top client IPs (data table)
			</li>
<li>
				Errors by type (pie chart)
			</li>
</ul>
</li>
</ul>
<h3>
	<strong>&nbsp;Search &amp; Query Logs</strong><br />
</h3>
<ul>
<li>
		Use <strong>Discover</strong> to search logs interactively.
	</li>
<li>
		Example KQL query:
	</li>
</ul>
<p>
	status:500 AND url:&quot;/login&quot;
</p>
<p>
	This finds all failed login requests.
</p>
<h3>
	<strong>Set Alerts (Optional)</strong><br />
</h3>
<ul>
<li>
		Kibana&rsquo;s <strong>Alerts and Actions</strong> can trigger notifications (email, Slack, etc.) when certain thresholds are crossed.
	</li>
<li>
		Example: alert if <strong>error responses exceed 100 in 5 minutes</strong>.
	</li>
</ul>
<h2>
	<img decoding="async" alt="kibana-sample-dashboard-screenshot" src="https://www.pc-freak.net/images/kibana-sample-dashboard-screenshot.jpg" style="height: 344px; width: 640px;" /><br />
</h2>
<p>
	<strong><em>Sample Kibana dashboard</em></strong><br />
	&nbsp;
</p>
<h2>
	<img decoding="async" alt="kibana-geo-kibana-web-traffic-by-location" src="https://www.pc-freak.net/images/kibana-geo-kibana-web-traffic-by-location-screenshot.jpg" style="width: 640px; height: 361px;" /><br />
</h2>
<p>
	<strong><em>Kibana with connected servers to find out Geo Location</em></strong><br />
	&nbsp;
</p>
<h2>
	<strong>Summary closing words (what we did)</strong><br />
</h2>
<table border="0" cellpadding="0" cellspacing="3">
<thead>
<tr>
<th>
<p>
					<strong>Step</strong>
				</p>
</th>
<th>
<p>
					<strong>Action</strong>
				</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>
					&nbsp;1
				</p>
</td>
<td>
<p>
					Install Kibana from Elastic repo
				</p>
</td>
</tr>
<tr>
<td>
<p>
					2
				</p>
</td>
<td>
<p>
					Configure to connect to Elasticsearch
				</p>
</td>
</tr>
<tr>
<td>
<p>
					3
				</p>
</td>
<td>
<p>
					Start and enable the service
				</p>
</td>
</tr>
<tr>
<td>
<p>
					4
				</p>
</td>
<td>
<p>
					Access it via http://&lt;ip&gt;:5601
				</p>
</td>
</tr>
<tr>
<td>
<p>
					5
				</p>
</td>
<td>
<p>
					Ingest log data
				</p>
</td>
</tr>
<tr>
<td>
<p>
					6
				</p>
</td>
<td>
<p>
					Define index pattern
				</p>
</td>
</tr>
<tr>
<td>
<p>
					7
				</p>
</td>
<td>
<p>
					Create dashboards and visualizations
				</p>
</td>
</tr>
</tbody>
</table>
<p>
	The idea of this article was just to introduce you to the existence of Elasticsearch / kibana and filebeat and logstack and not to give you a fully fine tuned install guide. The usual way to deploy Kibana on multiple servers of course is using a dockerized container version of it. There is plenty to learned on how to use kibana to do a monitoring of your machines. But most simple use is to directly access the locally visible kibana on a server and check the status of processes on the host instead of logging via SSH. Kibana can do pretty much
</p>
<p>
	<br />
	<strong>Some further useful Reading Resources</strong>
</p>
<ul>
<li>
		Kibana Docs: <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cuZWxhc3RpYy5jby9ndWlkZS9lbi9raWJhbmEvaW5kZXguaHRtbA%3D%3D&#038;feed-stats-url-post-id=18106" rel="noopener" target="_new">https://www.elastic.co/guide/en/kibana/index.html</a>
	</li>
<li>
		Filebeat Docs: <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cuZWxhc3RpYy5jby9ndWlkZS9lbi9iZWF0cy9maWxlYmVhdC9pbmRleC5odG1s&#038;feed-stats-url-post-id=18106" rel="noopener" target="_new">https://www.elastic.co/guide/en/beats/filebeat/index.html</a>
	</li>
<li>
		Logstash Docs: <a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cuZWxhc3RpYy5jby9ndWlkZS9lbi9sb2dzdGFzaC9pbmRleC5odG1s&#038;feed-stats-url-post-id=18106" rel="noopener" target="_new">https://www.elastic.co/guide/en/logstash/index.html</a>
	</li>
</ul>
<p>
	&nbsp;</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-18350" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZWFzeS1iYWNrdXBzLWxpbnV4LWd1aS8%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">How to Make Easy Backups on Linux Using a GUI tools Deja Dup, TimeShift, BackinTime, Grsync, Vorta</a></li><li data-position="1" data-poid="in-18134" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvb3B0aW1pemluZy1saW51eC1zZXJ2ZXItcGVyZm9ybWFuY2UtZGlnaXRhbC1taW5pbWFsaXNtLXJ1bm5pbmctc2VydmljZXMtc3lzdGVtLWNsZWFudXAv&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Optimizing Linux Server Performance Through Digital Minimalism and Running Services and System Cleanup</a></li><li data-position="2" data-poid="in-18384" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbGluZy1qZWxseWZpbi1saW51eC1hYnVpbHQtb3Blbi1zb3VyY2UtbWVkaWEtc29sdXRpb24v&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Installing Jellyfin on Linux to have abuilt in Own self hosted open source Media solution</a></li><li data-position="3" data-poid="in-18443" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYnVpbGQtY2VudHJhbC1sb2dnaW5nLXNlcnZlci1jb2xsZWN0LXN0b3JlLXZpc3VhbGl6ZS1sb2dzLw%3D%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Build a Central Linux Logging Server to Collect, Store, and Visualize All Infrastructure node Logs</a></li><li data-position="4" data-poid="in-18123" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1mcmVlaXBhLWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">How to Install and use FreeIPA forcentralized SSO authention on Linux computer domain</a></li><li data-position="5" data-poid="in-18098" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1hdWRpdGQtc3lzdGVtLWF1ZGl0aW5nLWxpbnV4Lw%3D%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">How to Install and Use auditd for System Security Auditing on Linux</a></li><li data-position="6" data-poid="in-18031" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC1jaGF0Z3B0LWRlYmlhbi1saW51eC1zbmFwLw%3D%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">How To Install ChatGPT on Debian Linux with snap</a></li><li data-position="7" data-poid="in-17955" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVwbG95aW5nLXB1cHBldC1zZXJ2ZXItcGF0Y2hpbmctMTAtZGViaWFuLWxpbnV4LXNlcnZlcnMv&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Deploying a Puppet Server and Patching multiple Debian Linux Servers</a></li><li data-position="8" data-poid="in-17925" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZGVwbG95aW5nLXNlcnZlci1tYW5hZ2luZy0xMG5vZGUtbGludXgtaW5mcmFzdHJ1Y3R1cmUtYW5zaWJsZS8%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Deploying a Server and Managing a 10-Node Linux Infrastructure with Ansible</a></li><li data-position="9" data-poid="in-17820" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZmx1c2gtZG5zLW1hYy1vcy13aW5kb3dzLWNvbW1hbmQtbGluZS8%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Flush DNS on Mac OS X ,Windows and Linux from command line</a></li><li data-position="10" data-poid="in-17718" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXBwZW5kLWFkZGl0aW9uYWwtbG9naW4tcHJpbnQtbWVzc2FnZS1saW51eC1kaXNhYmxlLWV0Y21vdGQtbWVzc2FnZS1kYXktbWVzc2FnZS1zaGFyZWQtbGludXgtc2hlbGwtanVtcC1ob3N0cy8%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Append additional each login print message on Linux and how to  disable /etc/motd message of the day message  on shared Linux shell jump hosts</a></li><li data-position="11" data-poid="in-17592" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY2hlY2stYWxlcnQtZG5zLWxpbnV4LXNlcnZlci1wcm9wZXJseS1yZXNvbHZpbmctc2hlbGwtc2NyaXB0Lw%3D%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">DNS Monitoring: Check and Alert if DNS nameserver resolver of Linux machine is not properly resolving shell script. Monitor if /etc/resolv.conf DNS runs Okay</a></li><li data-position="12" data-poid="in-16630" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbW9uaXRvcmluZy1jaHJvbnlkLXRpbWUtc2VydmljZS1zeW5jaHJvbml6ZWQtemFiYml4LXVzZXJwYXJhbWV0ZXItc2NyaXB0Lw%3D%3D&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Monitoring chronyd time service is synchronized, get additional time server values with Zabbix userparameter script</a></li><li data-position="13" data-poid="in-16546" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY29uZmlndXJlLW1lZGlhLXN0cmVhbWluZy1taW5pZGxuYS1saW51eC1zZXJ2ZXItYWNjZXNzLWRhdGEtc21hcnQtdHYv&#038;feed-stats-url-post-id=18106" class="wp_rp_title">Configure own Media streaming minidlna Linux server to access data from your Smart TV</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18106" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/install-kibana-log-visualization/">How to Install and Use Kibana for Log Visualization</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/install-kibana-log-visualization/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
		<item>
		<title>Check and Fix: “w32tm /query /source – The service has not been started” (Windows Time Service Error)</title>
		<link>https://www.pc-freak.net/blog/fix-w32tm-query-source-service-started-windows-time-service-error/</link>
					<comments>https://www.pc-freak.net/blog/fix-w32tm-query-source-service-started-windows-time-service-error/#respond</comments>
		
		
		<pubDate>Thu, 12 Feb 2026 16:58:56 +0000</pubDate>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Various]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Below]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[configured]]></category>
		<category><![CDATA[domain controller]]></category>
		<category><![CDATA[due]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Find Windows Time]]></category>
		<category><![CDATA[fixing]]></category>
		<category><![CDATA[internet connection]]></category>
		<category><![CDATA[internet time server]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[occurred]]></category>
		<category><![CDATA[properly]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[Services Console]]></category>
		<category><![CDATA[system clock]]></category>
		<category><![CDATA[time synchronization]]></category>
		<guid isPermaLink="false">https://www.pc-freak.net/blog/?p=18388</guid>

					<description><![CDATA[<p>Some people are still forced to run Windows 10 due to hardware limitations on Legacy desktop PCs and Laptops as Windows 11 does not support all hardware. Hence the Windows Automatic Time Synchronization service might not have been started properly (is failing)&#160;and due to that the system clock might be slowing down or up from [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/fix-w32tm-query-source-service-started-windows-time-service-error/">Check and Fix: “w32tm /query /source – The service has not been started” (Windows Time Service Error)</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
	<img decoding="async" alt="windows-logo-fix-windows-time-server-synchronization-error-w32tm" src="https://www.pc-freak.net/images/windows-logo-fix-windows-time-server-synchronization-error-w32tm.svg" style="width: 88px; height: 88px;" />
</p>
<p>
	Some people are still <em>forced to run Windows 10 due to hardware limitations on Legacy desktop PCs and Laptops as Windows 11 does not support all hardware.</em> Hence the <strong>Windows Automatic Time Synchronization service might not have been started properly (is failing)&nbsp;</strong>and due to that the system clock might be slowing down or up from the actual time. This is a rare issue you might encounter but if you&#39;re physically situated on&nbsp;a place with <strong>very slow internet connection</strong> and / or on an <em>10 years+ old Gamer PC with Windows 10</em> you might encounter it&nbsp;under some specific unlucky&nbsp;circumstances combination, like very slow internet or using some kind of damaged windows due to<em> failed Windows updates </em>or due to<em> running some unlicensed copy of Windows</em> (which you should not!) etc.<br />
	Perhaps <strong>Windows time synchronization issues</strong> miight be caused&nbsp; due to <strong>BIOS / UEFI</strong> time setting misconfiguration&nbsp;causing the PC clock to be <strong>back in time with minutes / hours&nbsp;&nbsp;or in future mis-synchronized.</strong><br />
	This perhaps could<strong>&nbsp;</strong>could happen even on more modern <strong><em>356 Domain connected PCs</em></strong> / notebooks running on modern <strong>Windows 11?</strong>
</p>
<p>
	In this&nbsp;article I&#39;ll give you an <em><strong>easy way how to resolve Windows Clock (Timing) issues by running few standard Windows commands in<br />
	Windows Administrator Prompt (elevated) cmd.exe line:</strong></em>
</p>
<p>
	Run cmd.exe as Administartor: and try to get information on the configured time server:
</p>
<blockquote>
<p>
		<strong>sc query w32time</strong>
	</p>
</blockquote>
<p>
	Usually that won&#39;t produce a good result if your clock is not properly synching with Windows Time server via the w32time service, to further debug run cmd:
</p>
<blockquote>
<p>
		<strong><code>w32tm /query /source</code></strong>
	</p>
</blockquote>
<p>
	If you run the command:
</p>
<p>
	and receive the error:
</p>
<blockquote>
<pre>
<span style="color:#FF0000;"><em><code>The following error occurred: </code>
<code>The service has not been started. (0x80070426)</code></em></span></pre>
</blockquote>
<p>
	it means the <strong>Windows Time (W32Time)</strong> service is not running on your system.
</p>
<p>
	This service is responsible for synchronizing your computer&rsquo;s clock with an internet time server or domain controller. Without it, time sync will not work properly.
</p>
<h2>
	<strong>Why This Error Happens</strong><br />
</h2>
<p>
	The error usually appears when:
</p>
<ul>
<li>
<p>
			The Windows Time service is disabled
		</p>
</li>
<li>
<p>
			The service was stopped manually
		</p>
</li>
<li>
<p>
			System policies disabled time synchronization
		</p>
</li>
<li>
<p>
			The PC was recently restored or cloned
		</p>
</li>
</ul>
<p>
	Below is how to fix it quickly.
</p>
<h2>
	<strong>Solution 1 : Start the Windows Time Service</strong><br />
</h2>
<p>
	Open <strong>Command Prompt as Administrator</strong> and run:
</p>
<blockquote>
<pre>
<strong><code>net start w32time</code></strong></pre>
</blockquote>
<p>
	After it starts successfully, verify the time source:
</p>
<blockquote>
<pre>
<strong><code>w32tm /query /source</code></strong></pre>
</blockquote>
<h2>
	<strong>Solution 2: Set the Service to Start Automatically</strong><br />
</h2>
<p>
	If the problem keeps happening after reboot, set the service startup type to Automatic:
</p>
<blockquote>
<pre>
<strong><code>sc config w32time start= auto</code>
<code>net start w32time</code></strong></pre>
</blockquote>
<p>
	Note: There must be a space after <code>start=</code>.
</p>
<h2>
	<strong>Solution 3: Re-register the Windows Time Service</strong><br />
</h2>
<p>
	If the service fails to start, try re-registering it:
</p>
<blockquote>
<pre>
<strong><code>w32tm /unregister</code>
<code>w32tm /register</code>
<code>net start w32time</code></strong></pre>
</blockquote>
<p>
	Then force time synchronization:
</p>
<blockquote>
<pre>
<strong><code>w32tm /resync</code></strong></pre>
</blockquote>
<h2>
	<strong>Solution 4: Configure an NTP Server Manually</strong><br />
</h2>
<p>
	If no time source is configured, set one manually:
</p>
<blockquote>
<pre>
<strong><code>w32tm /config /manualpeerlist:&quot;time.windows.com,0x8&quot; \
/syncfromflags:manual /update</code>
<code>net stop w32time</code>
<code>net start w32time</code>
<code>w32tm /resync</code></strong></pre>
</blockquote>
<p>
	You can also use other NTP servers such as for example:
</p>
<ul>
<li>
<p>
			<strong>pool.ntp.org</strong>
		</p>
</li>
<li>
<p>
			<strong>time.google.com</strong>
		</p>
</li>
</ul>
<h2>
	<strong>Alternative: Start the Service via Services Console services.msc</strong><br />
</h2>
<ol>
<li>
<p>
			Press <strong>Win + R</strong>
		</p>
</li>
<li>
<p>
			Type <strong><code>services.msc</code></strong>
		</p>
</li>
<li>
<p>
			Find <strong>Windows Time</strong>
		</p>
</li>
<li>
<p>
			Set Startup type to <strong>Automatic</strong>
		</p>
</li>
<li>
<p>
			Click <strong>Start</strong>
		</p>
</li>
</ol>
<h2>
	<strong>Finally Check time server syncs fine</strong><br />
</h2>
<p>
	After fixing the issue, confirm everything works:
</p>
<blockquote>
<pre>
<strong><code>w32tm /query /status</code>
<code>w32tm /query /source</code></strong></pre>
</blockquote>
<p>
	If a valid NTP server or domain controller is displayed, the issue is resolved.</p>

<div class="wp_rp_wrap  wp_rp_vertical_s" ><div class="wp_rp_content"><h3 class="related_post_title">More helpful Articles</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-16181" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYXBhY2hlLWRpc2FibGUtcmVxdWVzdC1sb2ctYWNjZXNzbG9nLWxvZ2ZpbGUtc2V0ZW52aWYv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Apache disable requests to not log to access.log Logfile through SetEnvIf and dontlog httpd variables</a></li><li data-position="1" data-poid="in-14811" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYnVpbGQtaW5zdGFsbC1kb2NrZXItc3F1aWQtb3Blbi1wcm94eS1pbWFnZS1rdWJlcm5ldGVzLWNsdXN0ZXIv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Build and install Docker Squid Open Proxy image on Kubernetes cluster</a></li><li data-position="2" data-poid="in-10995" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYWxsb3ctbXlzcWwtdXNlcnMtYWNjZXNzLWZyb20tYWxsLWhvc3QtaXBzLWZpeGluZy1teXNxbC1lcnJvci0xMDQ1LTI4MDAwLWFjY2Vzcy1kZW5pZWQtdXNlci1yb290cmVtb3Rlc3lzdGVtYWRtaW5pc3RyYXRpb25uZXQtcGFzc3dvcmQv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Allowing MySQL users access from all hosts &#8211; Fixing mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;remote-admin.com&#8217; (using password: YES)</a></li><li data-position="3" data-poid="in-9735" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY29uZmlndXJlLWFwYWNoZS1zZXJ2ZS1sb2FkLWJhbGFuY2VyLTItd2Vic2VydmVycy1saW51eC8%3D&#038;feed-stats-url-post-id=18388" class="wp_rp_title">How to configure Apache to serve as load balancer between 2 or more Webservers on Linux / Apache basic cluster</a></li><li data-position="4" data-poid="in-4999" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaG93LXRvLXdvcmstYXJvdW5kLXN0YXJ0dGxzLXFtYWlsLXRodW5kZXJiaXJkLW91dGxvb2stbWFpbC1zZW5kaW5nLWVycm9yLWlzc3Vlcy8%3D&#038;feed-stats-url-post-id=18388" class="wp_rp_title">How to work around STARTTLS Qmail Thunderbird / Outlook mail sending (error) issues</a></li><li data-position="5" data-poid="in-18151" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvYmFzaC1sb2dnaW5nLXJlY29yZC1jb21tYW5kLXJ1bi8%3D&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Linux Bash Logging log everything. Prevent user from delete his history and keep record of every command User ever Run</a></li><li data-position="6" data-poid="in-17772" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvd2luZG93cy0xMC1pbnN0YWxsLWxvY2FsLXByb3h5LXNlcnZlci1zYXZlLWJhbmR3aWR0aC1zbG93LWxpbWl0ZWQtbW9iaWxlLXBob25lLWhvdHNwb3QtbmV0d29yay1zaGFyZWQtY29ubmVjdGlvbnMv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Windows 10 install local Proxy server to Save bandwidth on a slow and limited Mobile Phone HotSpot network Shared connections</a></li><li data-position="7" data-poid="in-17785" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvaW5zdGFsbC13c2wtMi13aW5kb3dzLW5hdGl2ZS1saW51eC1lbXVsYXRpb24v&#038;feed-stats-url-post-id=18388" class="wp_rp_title">How to install and use WSL 2 Windows native Linux emulation Debian and Ubuntu Linux on Windows 10 / Windows 11</a></li><li data-position="8" data-poid="in-17776" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3BsaXQtbGFyZ2UtZmlsZXMtd2luZG93cy1lYXNpbHkv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">How to split large files in Windows via split command line and File Archive GUI tool easily</a></li><li data-position="9" data-poid="in-17508" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvc3VtLXllYXItMjAyMy1sZXNzb25zLWxlYXJuZWQv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Our baby Ekaterina becomes 6 months on 17 of May, 5 days after our boy Dimitar become 4 years. Sum it up my year 2023 experience, lessons learned.</a></li><li data-position="10" data-poid="in-17641" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvZW5vcm1vdXMtc2NhbmRhbC1idWxnYXJpYW4tb3J0aG9kb3gtY2h1cmNoLWNvbnRpbnVlcy1idWxnYXJpYW4tb3J0aG9kb3gtY2h1cmNoLXB1dHMtbGlzdC0yLXByb3Blcmx5LWNob3Nlbi1iaXNob3BzLWNob2ljZS1sYXltYW4tcHJpZXN0cy1lcGFyY2h5Lw%3D%3D&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Enormous Scandal in the Bulgarian Orthodox Church continues as the Bulgarian Orthodox Church Holy Synod acts as Masonic Lodge not venerating the people&#8217;s choice about future Metropolitan of the Eparchy</a></li><li data-position="11" data-poid="in-16582" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvY3JlYXRlLWxpbnV4LWhpZ2gtYXZhaWxhYmlsaXR5LWxvYWQtYmFsYW5jZXIta2VlcGFsaXZlZC1oYXByb3h5Lw%3D%3D&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Create Linux High Availability Load Balancer Cluster with Keepalived and Haproxy on Linux</a></li><li data-position="12" data-poid="in-16560" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGlzdC1maXgtZmFpbGVkLXN5c3RlbWQtZmFpbGVkLXNlcnZpY2VzLWxpbnV4LW9zLXVwZ3JhZGUv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">List and fix failed systemd failed services after Linux OS upgrade and how to get full info about systemd service from jorunal log</a></li><li data-position="13" data-poid="in-16524" data-post-type="none" ><a href="https://www.pc-freak.net/blog/?feed-stats-url=aHR0cHM6Ly93d3cucGMtZnJlYWsubmV0L2Jsb2cvbGludXgtc2NyaXB0LXBlcmlvZGljYWxseS1sb2ctZW5hYmxlZC1zeXN0ZW1jdGwtc2VydmljZXMtY29uZmlndXJlZC1uZXR3b3JrLWlwcy1yb3V0aW5ncy1zZXJ2ZXItZXN0YWJsaXNoZWQtY29ubmVjdGlvbnMtaXB0YWJsZXMtZmlyZXdhbGwtcnVsZXMv&#038;feed-stats-url-post-id=18388" class="wp_rp_title">Linux script to periodically log enabled systemctl services, configured network IPs and routings, server established connections and iptables firewall rules</a></li></ul></div></div>
 <img src="https://www.pc-freak.net/blog/?feed-stats-post-id=18388" width="1" height="1" style="display: none;" title="" alt="" /><p>The post <a rel="nofollow" href="https://www.pc-freak.net/blog/fix-w32tm-query-source-service-started-windows-time-service-error/">Check and Fix: “w32tm /query /source – The service has not been started” (Windows Time Service Error)</a> appeared first on <a rel="nofollow" href="https://www.pc-freak.net/blog">☩ Walking in Light with Christ -  Faith,  Computing, Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pc-freak.net/blog/fix-w32tm-query-source-service-started-windows-time-service-error/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<dc:creator>hip0</dc:creator></item>
	</channel>
</rss><!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 437/1048 objects using Memcached
Page Caching using Disk (SSL caching disabled) 

Served from: www.pc-freak.net @ 2026-03-28 06:00:17 by W3 Total Cache
-->