To make a Linux server or old laptop or something a Time Machine, you can install Netatalk (plus some other stuff) on it. Netatalk is an open source implementation of Apple’s AFP file serving protocol, basically it allows a Linux computer talk to a Mac.
Source: How-to Use a Linux Server for Time Machine Backups – Sam’s Blog / snwh.org