diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+0.5.4.1 - 140615
+* introduced the ServerOnly compilation flag to avoid unnecessary dependency
+  on OpenGL and GLUT in a server environment
+
 0.5.4 - 130304
 * fixed compilation with ghc-7.6 by Daniel Seidel and Sönke Hahn
 
diff --git a/hp2any-graph.cabal b/hp2any-graph.cabal
--- a/hp2any-graph.cabal
+++ b/hp2any-graph.cabal
@@ -1,5 +1,5 @@
 Name:          hp2any-graph
-Version:       0.5.4
+Version:       0.5.4.1
 Cabal-Version: >= 1.6
 Synopsis:      Real-time heap graphing utility and profile stream server with a reusable graphing module.
 Category:      profiling, development, utils
@@ -10,6 +10,11 @@
   relay application the grapher connects to in the latter case.
   Additionally, the graphing capability is exposed to other programs
   as well in the form of a library module.
+  .
+  To avoid the need for OpenGL on the server side, the package can be
+  built with the @ServerOnly@ flag:
+  .
+  @cabal install --flags=serveronly@
 
 Author:        Patai Gergely
 Maintainer:    Patai Gergely (patai.gergely@gmail.com)
@@ -25,21 +30,32 @@
   test/readme.txt
   CHANGES
 
+Flag ServerOnly
+  Description:    Suppress building the client, thereby removing the dependency on OpenGL.
+  Default:        False
+  Manual:         True
+
 Library
-  HS-Source-Dirs: src
-  Build-Depends:  base >= 4 && < 5, hp2any-core, OpenGL
-  GHC-Options:    -Wall -O2
-  Exposed-Modules:
-    Profiling.Heap.OpenGL
+  if flag(serveronly)
+    Buildable:      False
+  else
+    HS-Source-Dirs: src
+    Build-Depends:  base >= 4 && < 5, hp2any-core, OpenGL
+    GHC-Options:    -Wall -O2
+    Exposed-Modules:
+      Profiling.Heap.OpenGL
 
 Executable hp2any-graph
-  HS-Source-Dirs:  src
-  Main-IS:         Graph.hs
-  GHC-Options:     -Wall -O2
-  Extra-Libraries: glut
-  Build-Depends:   base >= 4 && < 5, process, directory, filepath, containers,
-                   bytestring, hp2any-core, parseargs >= 0.1.3.1, network,
-                   OpenGL, GLUT
+  Main-IS:           Graph.hs
+  if flag(serveronly)
+    Buildable:       False
+  else
+    HS-Source-Dirs:  src
+    GHC-Options:     -Wall -O2
+    Extra-Libraries: glut
+    Build-Depends:   base >= 4 && < 5, process, directory, filepath, containers,
+                     bytestring, hp2any-core, parseargs >= 0.1.3.1, network,
+                     OpenGL, GLUT
 
 Executable hp2any-relay
   HS-Source-Dirs: src
