import Image from ‘@theme/IdealImage’;
This guide explains how to install Gentoo on a target device:
A lightweight VPS is a common use case with these requirements.
Another more powerful device with the same architecture (but potentially a different CPU) is required.
<Image alt=’fastfetch output: OS: Gentoo, Host: KVM, Memory: 1 GiB, Disk: 5.91 GiB’ img={require(‘./fastfetch.png’)} />
Two devices are required:
Both devices should share the same CPU architecture (e.g. both should be amd64).
Both devices should have a working internet connection. A fast connection will help in order to transfer a few hundred megabytes of binary packages. Neither device needs to expose any ports to the internet.
Follow the Gentoo Handbook to install and configure Gentoo.
Skip the steps where running emerge-webrsync or emerge --sync or installing
packages is required.
By the end, the user should be chrooted in on the target disk and have an internet connection.
<Image alt=’ls from / shows layout with stage3, ping a.co shows responses’ img={require(‘./target-post-chroot.png’)} />
Set up a binary package repository on the host device using the target device’s configuration.
Users who prefer to expose as few ports to the internet as possible should set up a private connection between the host and the target device.
One way that this can be done is by setting up net-vpn/tailscale on both devices, along with an iptables firewall rule to block inbound connections from the internet.
As detailed in Set up a binhost for another CPU, the following files and directories should be synchronized between the host and the target:
/etc/portage//var/lib/portage/world/var/lib/portage/world_setsAdditionally, users may want to synchronize the following directories:
/var/db/repos/gentoo (so emerge --sync only has to be run on one device)/var/cache/binpkgs/ (sync binary packages to the target before the target
runs emerge; speeds up emerge runs at the cost of increased disk usage,
since all dependencies are synced)Syncthing is probably the best tool for the job, although it does use around 150 MB of RAM while idle.