Definition of server from Wikipedia:
A server is a piece of computer hardware or software (computer program) that provides functionality for other programs or devices, called "clients".
Definition of daemon from Wikipedia:
... is a computer program that runs as a background process, rather than being under the direct control of an interactive user. ... Systems often start daemons at boot time which will respond to network requests, hardware activity, or other programs by performing some task.
From what I understand with the above definitions is that both server (from a software perspective) and daemon are programs running continuously which will respond to a request.
If so, the terms look interchangeable to me. Is that so? If not, what differentiates a daemon and a server ?
2 Answers
A server does things on request (SSH connection, FTP/HTTP requests...).
By contrast a daemon has a life of its own, and responds to system events or to periodic actions. For instance the fail2ban daemon periodically looks for brute-force attempts in login logs and bans the corresponding addresses. Other daemons manage logs (truncate/compress) or the network connections (NetworkManager)...
Server this concept refers to a type of program, a server is a program that works to serve someone, to serve another program - a client (the webserver serves requests from browsers, the mail server receives and sends emails from mail clients).
Daemon is the mode of operation of a program, which implies that the program is running in the background.
The server can support the daemon mode, but it can also support running in the foreground.