OSGi: What are the differences between Apache Felix and Apache Karaf?

The 'lightweight OSGi container' label is contrasting Karaf with more feature rich OSGi containers, not with Felix.

To quote Guillaume Nodet (Karaf's author) from here:

Felix is just the OSGi core runtime. Karaf provides a "distribution" based on Felix by adding other features such as a console, an SSH remoting mechanism, a file deployer and more.

In this diagram of the Karaf architecture, Felix (or other OSGi implementation - currently Equinox is also supported) is the OSGi box, the other boxes are the features added by Karaf:

Karaf Architecture Therefore, unless you have specific needs which are not met by Karaf (requiring access to the underlying implementation) it usually makes sense to use this since it provides more 'out of the box'.


@Marcel Karaf isn't monolithic or huge like a Java EE server. It is a very slim and minimalist implementation. It is a core product without much functionality other than a basic console, file loading so that you can actually read configuration files, etc. The latest zip file of it is 19.1 MB. Yeah. Small. It can easily run on small devices and work in embedded.

What you may be thinking of is something more like ServiceMix which uses Karaf as a core/kernel. But it includes CXF, ActiveMQ, Camel and other libraries in its full configuration. Even then they have minimal, medium and full sizes.

Really, for 99% of the projects out there it wouldn't make sense to start directly with Felix and not use Karaf instead.