On Linux, FreeBSD, and other Unix-like operating systems, the graphical interface layer is an optional separate component from the kernel and lower-level OS. Because of this, it is not necessary to have a graphical interface at all. Nevertheless, many distributions do come with the X Window System installed by default. Some may offer a server version without X or an option during installation to exclude it.
The reasons for excluding X from a server installation go beyond simple lack of necessity. Running an X server can potentially be a security risk, particularly if remote access to X is enabled. Furthermore, running an X system, such as Xorg requires a significant amount of memory and processing power, which could otherwise be allocated to your websites.
Despite the risks, there are a few rare situations where you might want or need an X server installed.
- If your server is in-house, you may have specific graphical system management programs that you want to run. In this case, you can disable remote access to X.
- You may use your server for other things, like running desktop applications. This, however, is not recommended.
- In the case of a server that is both a web server and an application server, your clients may need X access to run their applications.
Ultimately, it depends on your situation, but for a standard, remotely-hosted server, the risks of running X far outweigh any perceived benefits.