You are not logged in.

#1 2020-02-18 21:34:40

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Pacoloco - caching proxy for Arch Linux repos

Hello folks, I would like to present a project and hopefully some of you find it useful.

Pacoloco, https://github.com/anatol/pacoloco a caching proxy for Arch Linux repositories. It can be useful for situations when multiple Arch users are connected with a fast local network but access to an Arch mirror is expensive or limited. In this case it is desirable to minimize the amount of files to download from the Internet and share as much as possible locally.

Pacoloco is a caching proxy server. It acts as if it was a real up-to-date Arch mirror. But it does not clone all the packages in advance. It downloads the files on demand, the first time a file is requested by a local user. Then it saves the file to the cache. From now on it serves these files locally.

Please check the project page here https://github.com/anatol/pacoloco and install the server using this AUR package https://aur.archlinux.org/packages/pacoloco-git/


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#2 2021-09-06 15:14:46

steadybright
Member
Registered: 2014-03-11
Posts: 17

Re: Pacoloco - caching proxy for Arch Linux repos

This looks fantastic. Since pacman has broken my previous solution (https://wiki.archlinux.org/title/Pacman … only_cache), I look forward to trying this solution.

Thank you for your efforts!

buzz

Offline

#3 2023-06-11 16:49:25

NuSkool
Member
Registered: 2015-03-23
Posts: 151

Re: Pacoloco - caching proxy for Arch Linux repos

I've setup pacoloco in an nspawn container and it's working well. However, I'm at a loss on how to add my  local pacman AUR repo to have it served.

I could symlink the AUR cache directory to the nspawn container or even copy it if necessary. I'm just unsure how to properly add the AUR cache directory along with header in the pacoloco.yaml

There's no man page and I found the --help of little use as well. I did however read this, https://github.com/anatol/pacoloco but still not sure how to proceed.

Here's the pacoloco.yaml I'm using:

# cache_dir: /var/cache/pacoloco
# port: 9129

download_timeout: 3600                # downloads will timeout if not completed after 3600 sec, 0 to disable timeout

purge_files_after: 2592000            # purge file after 30 days

# set_timestamp_to_logs: true            # uncomment to add timestamp, useful if pacoloco is being ran through docker

repos:
  archlinux:
    urls:
      - https://mirrors.ocf.berkeley.edu/archlinux
      - https://mirrors.rit.edu/archlinux
      - https://mirror.rackspace.com/archlinux
      - http://mirror.lty.me/archlinux
      - http://mirrors.kernel.org/archlinux

  archlinux-reflector:
    mirrorlist: /etc/pacman.d/mirrorlist 	# Be careful! Check that pacoloco URL is NOT included in that file!

#  quarry:
#    url: http://pkgbuild.com/~anatolik/quarry/x86_64

#  sublime:
#    url: https://download.sublimetext.com/arch/stable/x86_64
prefetch: # optional section, add it if you want to enable prefetching
  cron: 0 0 3 * * * * # standard cron expression
  ttl_unaccessed_in_days: 30  # default 30, set it to a higher value than the number of consecutive days you don't update your systems
  # It deletes and stop prefetch packages(and db links) when not downloaded after ttl_unaccessed_in_days days that it had been updated.
  ttl_unupdated_in_days: 300 # deletes and stop prefetch packages which hadn't been either updated upstream or requested for ttl_unupdated_in_days.
# http_proxy: http://proxy.company.com:8888 # Enable this if you have pacoloco running behind a proxy
# user_agent: Pacoloco/1.2

Last edited by NuSkool (2023-06-11 16:55:53)

Offline

Board footer

Powered by FluxBB