Skip to content

Commit 803ee1e

Browse files
committed
Apt Cacher - WIP
1 parent e56e9e6 commit 803ee1e

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ comments:
129129
# Giscus options › https://giscus.app
130130
giscus:
131131
repo: # <gh-username>/<repo>
132-
repo_id:
132+
repo_id: thecoletrain.github.io
133133
category:
134134
category_id:
135135
mapping: # optional, default to 'pathname'
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "APT-Cacher NG"
3+
description: Creating a local Cache of Ubuntu, Debian and Linux Mirrors.
4+
date: 2025-03-17 20:03:00 CST
5+
layout: post
6+
categories: [homelab, cache]
7+
tags: [cache, APT Cacher NG, linux, debian, ubuntu, linux, proxmox, lxc] # Tag names should always be lowercase
8+
permalink: /APT-Cacher-NG/
9+
pin: false
10+
toc: true
11+
---
12+
13+
# APT Cacher NG - About and "How To"
14+
15+
## Overview of APT cacher NG
16+
APT-Cacher-NG is designed to cache Ubuntu, Debian and other Linux distrobutions and packages locally. When one of your machines updates, those updates are stored here. The next machine that is the same or similar can pull from the cache locally, instead of going out to the internet again.
17+
18+
## My Pupose & Goals
19+
1. Quite honestly, my main purpose was becasue it seemed like fun to do.
20+
2. It does speed up package downloads, but my internet is good, that really isnt a big deal for me.
21+
3. We are helping Linux, being a good steward of the internet. If we all do this, that will be less download bandwidth on these distro's. That will allow them to designate resources elsewhere than handling all the requests.
22+
23+
24+
## Reccomendation. Should you do this on your server?
25+
> ### Short answer is YES! (if you know you are "doing this" and need a guide, skip over it and get to the "How To area".)
26+
- I will guide you through a "basic" method, this method will have you set up and running in minutes! Roughly only a few *copy pasta* steps to get APT Casher NG running! The basic method is so easy, even I can do it. So for the time spent to get anything done is a WIN. Amount Cached / Time Spent = Winner Winner Chicken dinner.
27+
- I will also then advise of the advanced options and "tweeks" if you want to mess with it further. If you want it to be as efficient as possible.
28+
> ### The long answer is maybe...
29+
- **Phase 1** If you do the short initial version that I will propose, your cache percentages will not be that significant. (My personal data will be below) i.e. you won't cache everything. The tradeoff is how EASY this first version is. So, you can set up a LXC that caches using scripts and copy/paste in minutes, and if it caches anyting at all... that's a win! The LXC will take very little resources and not that much storage, and you lost little time.... = win.
30+
- **Phase 2** If you go to the next phase, you can precache a little more, wont take any more CPU or RAM, but it will take a couple Gig's of storage. Not that much harder. Once more copy/paste, and press a GUI button.
31+
- **Phase 3** Phase three gets a little tricky. This is where you are "going for it" Trying to cache everything under the sun and satisfy all of your obsessive compulsive desires. I tried this level and got sick of it, turned it off. This involves having updates fail, and then going in to the settings and updating them to resolve. Quite honestly, I dont much know what I am doing, perhaps someone with a little knowlege would say *"It's so easy, you dont know what you are talking about,"* and they would be Right!
32+
> ### This wont cache HTTPS, it will only cache HTTP.

0 commit comments

Comments
 (0)