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

<channel>
	<title>localserver - Hamradio.my</title>
	<atom:link href="https://hamradio.my/tag/localserver/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Amateur Radio, Tech Insights and Product Reviews</description>
	<lastBuildDate>Wed, 21 May 2025 06:49:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://hamradio.my/wp-content/uploads/2026/02/cropped-cropped-image-removebg-preview-3-32x32.png</url>
	<title>localserver - Hamradio.my</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Set Up a Local Update Server for Ubuntu Desktops</title>
		<link>https://hamradio.my/2025/05/how-to-set-up-a-local-update-server-for-ubuntu-desktops/</link>
					<comments>https://hamradio.my/2025/05/how-to-set-up-a-local-update-server-for-ubuntu-desktops/#respond</comments>
		
		<dc:creator><![CDATA[9M2PJU]]></dc:creator>
		<pubDate>Thu, 29 May 2025 06:46:41 +0000</pubDate>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[aptcacherng]]></category>
		<category><![CDATA[aptmirror]]></category>
		<category><![CDATA[bandwidthsaving]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[homelab]]></category>
		<category><![CDATA[itautomation]]></category>
		<category><![CDATA[linuxadmin]]></category>
		<category><![CDATA[linuxnetworking]]></category>
		<category><![CDATA[linuxserver]]></category>
		<category><![CDATA[linuxsetup]]></category>
		<category><![CDATA[localserver]]></category>
		<category><![CDATA[networkefficiency]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[selfhosted]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[ubuntuadmin]]></category>
		<category><![CDATA[ubuntuclients]]></category>
		<category><![CDATA[ubuntutips]]></category>
		<category><![CDATA[ubuntuupdates]]></category>
		<guid isPermaLink="false">https://hamradio.my/?p=7439</guid>

					<description><![CDATA[<p>Maintaining multiple Ubuntu desktops in an office, school, or lab environment can become bandwidth-intensive if each machine downloads updates from the internet individually. A more efficient solution is to set up a local update server, which caches packages and distributes them to all local machines. In this guide, we walk through how to set up [&#8230;]</p>
<p>The post <a href="https://hamradio.my/2025/05/how-to-set-up-a-local-update-server-for-ubuntu-desktops/">How to Set Up a Local Update Server for Ubuntu Desktops</a> appeared on <a href="https://hamradio.my">Hamradio.my - Amateur Radio, Tech Insights and Product Reviews</a> by <a href="https://hamradio.my/author/9m2pju/">9M2PJU</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-"></h1>



<p class="wp-block-paragraph">Maintaining multiple Ubuntu desktops in an office, school, or lab environment can become bandwidth-intensive if each machine downloads updates from the internet individually. A more efficient solution is to set up a <strong>local update server</strong>, which caches packages and distributes them to all local machines.</p>



<p class="wp-block-paragraph">In this guide, we walk through how to set up a local Ubuntu package mirror using <strong><code>apt-cacher-ng</code></strong>, a lightweight and efficient caching proxy for Debian-based systems.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-prerequisites"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9f0.png" alt="🧰" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Prerequisites</h2>



<ul class="wp-block-list">
<li>A dedicated Ubuntu server (or one of your desktops) that will act as the cache server.</li>



<li>Internet access on the server.</li>



<li>Static IP or reserved DHCP IP for the cache server.</li>



<li>Ubuntu desktops configured to use the cache.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-step-1-install-apt-cacher-ng-on-the-server"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f5a5.png" alt="🖥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Step 1: Install <code>apt-cacher-ng</code> on the Server</h2>



<pre class="wp-block-code"><code>sudo apt update
sudo apt install apt-cacher-ng
</code></pre>



<p class="wp-block-paragraph">Once installed, the service starts automatically. You can check its status with:</p>



<pre class="wp-block-code"><code>sudo systemctl status apt-cacher-ng
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-step-2-configure-apt-cacher-ng-optional"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2699.png" alt="⚙" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Step 2: Configure <code>apt-cacher-ng</code> (Optional)</h2>



<p class="wp-block-paragraph">The default settings are usually fine for most use cases. But if you want to review or tweak the settings:</p>



<pre class="wp-block-code"><code>sudo nano /etc/apt-cacher-ng/acng.conf
</code></pre>



<p class="wp-block-paragraph">Ensure this line is set (it usually is):</p>



<pre class="wp-block-code"><code>PassThroughPattern: .*ubuntu.com/.* 
</code></pre>



<p class="wp-block-paragraph">To allow web access to the stats page, find and set:</p>



<pre class="wp-block-code"><code>ReportPage: acng-report.html
</code></pre>



<p class="wp-block-paragraph">Then restart the service:</p>



<pre class="wp-block-code"><code>sudo systemctl restart apt-cacher-ng
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-step-3-allow-access-through-firewall-if-enabled"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f310.png" alt="🌐" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Step 3: Allow Access Through Firewall (If Enabled)</h2>



<p class="wp-block-paragraph">If UFW is enabled:</p>



<pre class="wp-block-code"><code>sudo ufw allow 3142/tcp
</code></pre>



<p class="wp-block-paragraph">Port 3142 is the default port used by <code>apt-cacher-ng</code>.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-step-4-test-the-server-locally"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9ea.png" alt="🧪" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Step 4: Test the Server Locally</h2>



<p class="wp-block-paragraph">You can test the server by accessing this URL in a browser on another machine:</p>



<pre class="wp-block-code"><code>http:&#47;&#47;&lt;cache-server-ip&gt;:3142/acng-report.html
</code></pre>



<p class="wp-block-paragraph">You should see the Apt-Cacher NG status page.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-step-5-configure-ubuntu-clients"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9d1-200d-1f4bb.png" alt="🧑‍💻" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Step 5: Configure Ubuntu Clients</h2>



<p class="wp-block-paragraph">On each Ubuntu desktop, edit or create the file:</p>



<pre class="wp-block-code"><code>sudo nano /etc/apt/apt.conf.d/01proxy
</code></pre>



<p class="wp-block-paragraph">Add this line (replace <code>&lt;cache-server-ip&gt;</code> with your server’s IP address):</p>



<pre class="wp-block-code"><code>Acquire::http::Proxy "http://&lt;cache-server-ip&gt;:3142";
</code></pre>



<p class="wp-block-paragraph">Example:</p>



<pre class="wp-block-code"><code>Acquire::http::Proxy "http://192.168.1.10:3142";
</code></pre>



<p class="wp-block-paragraph">Now, whenever you run:</p>



<pre class="wp-block-code"><code>sudo apt update &amp;&amp; sudo apt upgrade
</code></pre>



<p class="wp-block-paragraph">The desktop will fetch packages from your local cache server, downloading from the internet only if they’re not already cached.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-optional-exclude-certain-packages-or-repositories"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9f9.png" alt="🧹" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Optional: Exclude Certain Packages or Repositories</h2>



<p class="wp-block-paragraph">You can fine-tune what gets cached in <code>/etc/apt-cacher-ng/acng.conf</code>. Look for directives like:</p>



<pre class="wp-block-code"><code>ExThreshold: 10
</code></pre>



<p class="wp-block-paragraph">Or define blacklist patterns. See the man page for more advanced options:</p>



<pre class="wp-block-code"><code>man acng.conf
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-monitor-usage"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ca.png" alt="📊" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Monitor Usage</h2>



<p class="wp-block-paragraph">Check the cache statistics and logs via:</p>



<ul class="wp-block-list">
<li>Web UI: <code>http://&lt;cache-server-ip>:3142/acng-report.html</code></li>



<li>Log file: <code>/var/log/apt-cacher-ng/apt-cacher.log</code></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="h-final-tips"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Final Tips</h2>



<ul class="wp-block-list">
<li>Regularly monitor disk space. Cache can grow over time.</li>



<li>Use <code>cron</code> or <code>logrotate</code> to manage logs and old cached files.</li>



<li>Works seamlessly for Ubuntu, Debian, and derivatives (Linux Mint, Pop!_OS).</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Setting up a local update server is a smart move for environments with multiple machines. It reduces internet usage, speeds up updates, and improves reliability during high-traffic times. Once configured, it&#8217;s mostly maintenance-free.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://hamradio.my/2025/05/how-to-set-up-a-local-update-server-for-ubuntu-desktops/">How to Set Up a Local Update Server for Ubuntu Desktops</a> appeared on <a href="https://hamradio.my">Hamradio.my - Amateur Radio, Tech Insights and Product Reviews</a> by <a href="https://hamradio.my/author/9m2pju/">9M2PJU</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://hamradio.my/2025/05/how-to-set-up-a-local-update-server-for-ubuntu-desktops/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
