Lilium is a lightning-fast, web based content management system built with Node.JS. Its power resides in the cache engine running behind Lilium, which reduces CPU usage, RAM and database access.
Last updated 5 months ago by rykdesjardins .
MPL 2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lilium-cms 
SYNC missed versions from official npm registry.

LML masthead

Lilium CMS V4

Lilium is a lightning-fast, web based content management system built with Node.JS. Its power resides in its intelligent caching engine which reduces CPU usage, RAM, and database access.

If server-side rendering is preferred over client-side rendering, Lilium offers a simplified way of generating HTML documents, storing them on disk or RAM, and serving them faster than most HTML preprocessors. It is possible to use either LML2 which ressembles PHP, or LML3 which is an easy to use routine using Javascript template strings.

The platform has its own framework and unique API. Lilium makes it easy to create a mobile app for a website, and is network based. It can hold multiple domains for a single instance, can use multiple different databases. It is compatible with content delivery network services.

Lilium does not use Express, Mongoose, or other heavy libraries. Instead, it implements its own web server using native NodeJS libraries.

Installation guide

All NodeJS packages are to be installed, and are documented in the package file. You can simply run npm run setupdev in the Lilium root folder.

Automated installation

Lilium was built on Linux, and is meant to be run on Linux. Even though it will technically work on Mac, Lilium is not guaranteed to be stable on other operating systems.

The CMS requires NodeJS v8+, and MongoDB v3+. You can follow online tutorials on how to install both of these before running the npm scripts, but it's a faily simple process.

Installing NodeJS

You can follow this tutorial from the official NodeJS website.

From the nodesource instructions

# Using Ubuntu
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL | bash -
apt-get install -y nodejs

Installing MongoDB

You can follow this tutorial from the official MongoDB website.

Only run one of the following depending on your Ubuntu distro

# For Ubuntu 18
echo "deb [ arch=amd64 ] bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

# For Ubuntu 16
echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

# For Ubuntu 14
echo "deb [ arch=amd64 ] trusty/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list


sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start

And MongoDB should be running. To make sure the installation was successful, you can open a shell using mongo.

Installing Lilium for development

You can clone Lilium in your favourite installation directory. At Narcity Media, we like to use /usr/share/lilium or ~/dev/lilium. Make sure the directory is owned by you, not by root. Also make sure to clone it in a directory that is also owned by you since other sibling directories might be needed.

Simply cd to the directory you want to use, and git clone

Then, cd lilium-cms and npm install && npm run setupdev.

Once the installation process exits, you can start the CMS using npm start or node Your browser should load the CMS if you browse to localhost:8080/lilium.

The development username and password are : lilium and lilium. Make sure to change them if you plan on deploying on a production machine.

Web panel for development

The CMS frontend is located under /apps/lilium. It is a Preact app, and is transpiled using Webpack and Babel. Preact is a 3kB alternative to React developed by Jason Miller (forever thank you).

Required dependencies

MAC: brew install pkg-config cairo libpng jpeg giflib imagemagick redis

UBUNTU: sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ libkrb5-dev imagemagick redis-server

The dependencies will be installed automatically during the npm run setupdev process. You can however install then manually if you prefer.

Localhost connections to MongoDB

If mongo still refuses to connect from NodeJS eventhough it works using the terminal cli, you might have to enable or disable authentication from your mongo config file (typically located in /etc/mongod.conf, under security: authentication).

This information can be found easily online using search queries such as "Enable MongoDB authentication". We ran into this issue on multiple occasion, and it ended up being a different solution every time.

MongoDB with brew

On Mac, sometimes the MongoDB service will refuse connections from Lilium for obscure reasons. Our temporary solution it to start a mongod instance in a seperate terminal and add the desired parameters including the database path and authentation db. You also get an additional output stream from mongod.

There likely is a better solution to make this work with brew service, but like mentionned earlier, we don't actively support MacOS nor do we recommend to run Lilium in production on a different OS than Linux.

I want to code, too

That must mean you're amazing. See the Lilium CMS Wiki and get started!

Script mode

It is possible to run a Javascript file in script mode. It will prevent Lilium from loading the listeners, CAIJ and other modules related to networking. The websites and databases will still be loaded on a single thread, and the script passed as an argument will be executed.

node ./includes/runscript.js [script.js]

Random quote API

There is a random quote provider to add a cute message to The Daily Lilium, which is Lilium's newspaper.

Working with nginx

Nginx works well with Lilium. The following configuration is the most simplified version you can use. The config works with a Lilium instance located at /usr/share/lilium/lilium-cms, and runs at port 8080.

Since Lilium does not handle HTTPS requests, using nginx in front of Lilium makes it possible to have a fully operational SSL website running on Lilium, without the SSL overhead during the local proxy upstream.

Using Certbot / LetsEncrypt, you can quicky generate an HTTPS cert.

Basic nginx configuration file

upstream lilium_proxy  {
        keepalive 64;

map $http_sec_websocket_key $upgr {
    ""      "";           # If the Sec-Websocket-Key header is empty, send no upgrade header
    default "websocket";  # If the header is present, set Upgrade to "websocket"

map $http_sec_websocket_key $conn {
    ""      $http_connection;  # If no Sec-Websocket-Key header exists, set $conn to the incoming Connection header
    default "upgrade";         # Otherwise, set $conn to upgrade

proxy_cache_path /usr/share/lilium/html/nginxcache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m use_temp_path=off;

server {
        listen 80;

        server_name localhost;
        # port_in_redirect off;

        large_client_header_buffers 8 32k;
        index index.html;

        location / {
                proxy_cache my_cache;
                proxy_cache_revalidate on;
                proxy_cache_min_uses 3;
                proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
                proxy_cache_lock on;

                alias /usr/share/lilium/html/default/;
                try_files $uri $uri.html @lilium;

        location /(lilium|login)/ {
                try_files @lilium =404;

        location @lilium {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_set_header Host $host;
                proxy_set_header X-NginX-Proxy true;

                # prevents 502 bad gateway error
                proxy_buffers 8 32k;
                proxy_buffer_size 64k;

                proxy_pass http://lilium_proxy;
                proxy_redirect off;

                # enables WS support
                proxy_http_version 1.1;
                proxy_set_header Upgrade $upgr;
                proxy_set_header Connection $conn;

Production version






Mozilla Public License Version 2.0

About the license

TL;DR : You can use the CMS to make money as long as it remains open source. The typical use case involves no additional work.

Both individuals and businesses are allowed to use Lilium CMS. You are allowed to host a copy of Lilium CMS, modify it, redistribute it, create something different with it.

One important thing to note : you must disclose the source code, copyright, and must document any modification done. A copy of the license must be available. However, this does not mean you need to credit Narcity Media on your website or anything of the sort. Simply make the source code available and highlight the modifications if any.

That being said, you can still use Lilium CMS for almost any purposes.

Like most open source licenses, Narcity Media is not liable if anything happens with your server, data, etc. Lilium CMS does not come with a warranty.

The previous information is not legal advice, but should give you a good idea.

Mozilla Public License Version 2.0 is a simple, permissive license with conditions easy to respect. They have a great FAQ here.


© Narcity Media, 2019

Current Tags

  • 4.3.0                                ...           latest (5 months ago)

30 Versions

  • 4.3.0                                ...           5 months ago
  • 4.2.6                                ...           6 months ago
  • 4.2.5                                ...           6 months ago
  • 4.2.4                                ...           6 months ago
  • 4.2.3                                ...           6 months ago
  • 4.2.2                                ...           7 months ago
  • 4.2.1                                ...           7 months ago
  • 4.2.0                                ...           7 months ago
  • 4.1.13-R6                                ...           7 months ago
  • 4.1.13-R5                                ...           7 months ago
  • 4.1.13-R3                                ...           7 months ago
  • 4.1.13-R2                                ...           7 months ago
  • 4.1.13-R1                                ...           7 months ago
  • 4.1.13-R0                                ...           7 months ago
  • 4.1.12-R2                                ...           7 months ago
  • 4.1.12-R1                                ...           7 months ago
  • 4.1.11-P3                                ...           7 months ago
  • 4.1.11-P2                                ...           7 months ago
  • 4.1.11-P1                                ...           7 months ago
  • 4.1.11                                ...           7 months ago
  • 4.1.10                                ...           7 months ago
  • 4.1.9                                ...           7 months ago
  • 4.1.8                                ...           7 months ago
  • 4.1.6                                ...           7 months ago
  • 4.1.5                                ...           8 months ago
  • 4.1.4                                ...           8 months ago
  • 4.1.3                                ...           8 months ago
  • 4.1.2                                ...           8 months ago
  • 4.1.1                                ...           8 months ago
  • 4.1.0                                ...           8 months ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 30
Dependencies (9)
Dev Dependencies (101)
Dependents (0)

Copyright 2014 - 2016 © |