Lichen is the simplest possible CMS for the web that is friendly enough for non-technical users. Comprised of just a few Forth CGI scripts, it is extremely lightweight. This site is built in Lichen. It can also be used as a static site generator.


Git repository

Lichen Screenshot


When looking for a way for non-programmers to edit their website, many people reach for WordPress or something similar, which consumes many times more computing resources than the moon lander. Plugins, security updates, and a SQL database are a lot of overhead for sharing text and images online. On the other hand, writing HTML and CSS by hand is so complex these days that the layperson has no time or interest to learn to do it, not to mention understanding what a SSH key is and how to edit the site over SFTP. Installing dependencies, compiling a static site, and managing a Git repo involves similar complexity.

Lichen is designed to hit the sweet spot between WordPress and manually editing HTML. A technically-inclined person can easily set up many Lichen sites for friends with minimal effort without having to worry about the technical burden of maintaining a database-driven CMS.

Content is stored as Gemtext, the lightweight markup language of the Gemini protocol. Why Gemtext?

Gemtext Introduction

The content is the most important part of a site. When your content is constrained to a single column of text with hand-edited links, it is more intimate and intentional. The writer is required to make the content good enough to be worth reading without relying on the crutch of complex layouts and fancy web widgets. The reader is no longer burdened with heavy web pages and distracting/buggy UI. All of this adds up to an extremely lightweight environment: low cost, low resources, low cognitive overhead, low environmental impact.


Lichen Editor

Navigate to "/cgi-bin/edit.cgi" to edit your homepage. Changes you make to the raw Gemtext on the left are reflected in the live preview on the right.

Links to files with a .gmi extension will automatically be translated to .html. Links to files with common image, audio, and video extensions are automatically rendered to their respective HTML elements.

Click the green "Save" button at the bottom to save your content and render a fresh HTML file.

File Manager

The file manager allows you to create new pages and folders, and upload files like images and videos.

Click on a Gemtext file (.gmi) to edit it.

Hover a file and click the 🔗 button to return to the editor and insert a link to that file. It will be inserted at the current cursor position.


If you need to rebuild all pages of your site, run the "./" script in the root directory.

System Requirements

NearlyFreeSpeech is an excellent, inexpensive web host that works well with Lichen.


For example, run the following command on NearlyFreeSpeech in the public directory:

$ chgrp -R web /home/public

If your Apache server is not already configured to run CGI scripts, add this configuration and adjust the paths as necessary:

ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/
<Directory "/var/www/html/cgi-bin">


⚠️ Important ⚠️

Create an htpasswd file and update the path in the cgi-bin/.htaccess file. This password-protects the interface to edit your site.

htpasswd documentation

If you're not using Apache, follow your web server's instructions.


A complete page is comprised of Gemtext rendered to HTML and sandwiched between the contents of "template/_header.html" and "template/_footer.html". Edit these template files to customize the HTML that is common between all pages. Remember to rebuild all pages with the "./" script after editing any template files (HTML is only re-generated when the "Save" button is clicked from the web interface).

Local Development

Most CGI-compatible web servers should work. Busybox provides a lightweight one.

$ busybox httpd -p 8000 -f

The Forth code expects the current working directory to be it's own directory (cgi-bin), not the web root. Python's http.server does not work because it doesn't set the CWD to /cgi-bin when invoking a CGI script.


2.0 (2022-12-22)

Previous Version

Lichen v1.2 (PHP)