go-apt-cacher reads a configuration file at start up. If you change the configuration file, the change will not take effect until you restart go-apt-cacher.
The default location of the file is /etc/go-apt-cacher.toml.
A sample TOML file is available here.
go-apt-cacher writes to two directories (meta_dir and cache_dir
specified in the configuration file). These directories must be
writable by the process owner of go-apt-cacher.
As go programs cannot run as so-called daemon, running go-apt-cacher in background shall be done via process manager such as systemd or upstart.
Increase nofile resource limit to accept massive number of clients.
For systemd, it is LimitNOFILE directive.
go-apt-cacher does not require root privileges. Users are strongly advised to run go-apt-cacher with a non-root account.
| Option | Default | Description |
|---|---|---|
-f |
/etc/go-apt-cacher.toml |
Configuration file path. |
As go-apt-cacher uses github.com/cybozu-go/well, flags provided by well is also available.
For example, if ubuntu is mapped to http://us.archive.ubuntu.com/ubuntu
and security to http://security.ubuntu.com/ubuntu, you may edit
/etc/apt/sources.list as follows to make it use go-apt-cacher:
deb http://<go-apt-cacher hostname>/ubuntu trusty main restricted
deb http://<go-apt-cacher hostname>/ubuntu trusty-updates main restricted
deb http://<go-apt-cacher hostname>/security trusty-security main restricted