Normally, when people talk about fax, they mean Group 3 Fax as standardized by ITU-T.
Other fax standards, like Group 4 Fax over ISDN, never gained any significance.
Group 3 Fax is a protocol to send images over the telephone network using audible frequencies (tones).
This implies that a fax server needs a connection to the telephone network, and a way to convert the image data to audible frequencies and back. The latter is called a modem.
Both of these requirements can be fulfilled in several ways, separately or together.
The classic telephone network (POTS) uses analog transmission over copper wire pairs. To connect such a line to a computer you need a physical modem, which will also take care of the conversion between data and tones. Physical modems exist in many forms, from classic standalone devices connecting to the computer via RS232 serial interfaces to plugin cards installed in an expansion slot of the computer itself or of a different device such as a router. It is theoretically feasible to have a modem in a router forward fax data over an IP network to a cloud server, though I have never heard of such a solution in actual use. So in practice, for a POTS fax server you cannot bypass the requirement of installing a physical modem next to or inside it, and running a phone line to it.
The newer digital telephone network (ISDN) uses digital transmission, still over copper wire pairs. To connect such a line to a computer you need a physical device called a terminal adapter (TA). Such a TA may or may not include a modem. If it doesn't, the computer can implement the modem function in software, computing the waveform of the tones to send and analyzing the waveform of the tones received. TAs come in basically the same forms as modems. There are devices comprising a TA and a router which forward the raw digital phone signal over an IP network, so you could theoretically build an ISDN fax server out of such an ISDN to IP gateway and a cloud server running a software modem. You'd still need a location with an Internet connection for that gateway, and an ISDN line running to it.
The most modern telephone network is Voice over IP (VoIP). With VoIP, the tones are transmitted over IP networks anyway, so there is no need for physical adapters apart from a regular network interface. Therefore it is possible to build a VoIP fax server on a cloud server. You'd need a contract with a VoIP provider to route the fax calls between the phone network and your server via SIP, software to implement the modem functionality as well as the fax protocol, and sufficient computing power to run it. Whether such a solution makes any sense economically compared to a professional fax service provider such as alltofax.de is an entirely different question.