algernon is a free, open source databases project written in JavaScript and released under BSD-3-Clause. It has 3,028 GitHub stars, 149 forks and 19 open issues, and was last pushed 7 days ago. On this registry it ranks #183 of 203 tracked projects in Databases, with 5 head-to-head comparisons available.

What is algernon?

Algernon is a small, self-contained web server written in pure Go that serves dynamic sites and applications from a single executable, with built-in support for Lua, Teal, Markdown, Pongo2, TypeScript, npm-less React 19, and a choice of SQLite, PostgreSQL, Redis and other database backends — aimed at developers and operators who want to run a web application without assembling and maintaining a separate runtime stack.

What it is

Algernon lives in the Go ecosystem and is distributed as one executable. Rather than combining a web server, a scripting runtime, a template engine, an asset pipeline and a database driver into a deployment, it bundles all of them: HTTP/2, HTTP/3 over QUIC, Lua interpretation through gopher-lua, optional Teal, Markdown rendering, the Amber and Pongo2 template languages, Sass (SCSS) and GCSS preprocessing, and JSX/TSX bundling via esbuild. User handling and permissions come from permissions2, and logging from logrus. The whole server is a single portable binary that also ships as a Docker image under 17MB.

The concrete problem it solves is toolchain sprawl on the server side. A directory of files is the application: the special filenames index.lua, index.html, index.md, index.txt and index.pongo2 (or index.po2 / index.tmpl) are interpreted in a fixed priority order, so a page can be Lua code, rendered Markdown, a template or static HTML depending on which file is present. The topic list marks this as build-less and npm-less, and React 19 can be used without invoking npm at all. That replaces the usual arrangement of a separate Node.js build step, a separate application server and a separately configured reverse proxy for a site that may only need a little logic.

Key capabilities

  • Serves HTTP/2 over SSL/TLS by default when a certificate and key are supplied, and falls back to regular HTTP otherwise; HTTP/3 (QUIC) can be turned on with a flag through quic-go.
  • Dispatches requests by filename, interpreting index.lua as a handler function for the current directory, then index.html, index.md, index.txt, and finally the Pongo2 variants.
  • Runs handlers in Lua with gopher-lua, with optional Teal for type-safe Lua scripting.
  • Renders Markdown through gomarkdown/markdown and supports Amber and Pongo2 templates alongside Sass (SCSS) and GCSS CSS preprocessing.
  • Bundles and converts JSX and TSX to JavaScript with esbuild, enabling npm-less React 19 front ends.
  • Connects to BoltDB (built in, storing the database in a file), SQLite, PostgreSQL, MariaDB, MySQL, MSSQL, and Valkey or Redis as the database backend.
  • Applies permissions from permissions2, where /data and /repos require user permissions, /admin requires admin permissions, and / is public by default.

Who uses it and how

  • Operators deploying a complete site as one binary to a fresh host, avoiding a package-by-package install of server, runtime and drivers.
  • Developers running the published Docker image, which is under 17MB, mounting a working directory at /srv/algernon and serving it on port 4000.
  • Teams on distributions that carry Algernon as a package, as tracked by the Repology packaging badge.
  • Users who need to target a database they already run, selecting PostgreSQL, MariaDB, MySQL, MSSQL, SQLite, BoltDB, Redis or Valkey while keeping the same server.
  • Workflows that want live reload, server-sent events, cross-platform binaries for a range of platforms and architectures, or a local LLM served through Ollama.

Getting started

Install with go install github.com/xyproto/algernon@latest, which requires Go 1.26 or later, or run the prebuilt image with docker run -it -p4000:4000 -v .:/srv/algernon xyproto/algernon and open http://localhost:4000. Releases for a variety of platforms and architectures are available from the project's release page, and TUTORIAL.md covers first steps.

How it compares

The provided facts do not name competing products, paid or otherwise, so this entry stands alone in this registry on that axis. Comparisons should therefore be drawn from the components it absorbs — a separate Go HTTP server, a Lua runtime, a Markdown renderer, a bundler such as esbuild, and a permissions library — all of which Algernon supplies under one BSD-3-Clause licence.

When to use it — and when not to

Self-hosting means operating the pieces behind the binary: a database backend of your choice, with BoltDB and SQLite file-based, while PostgreSQL, MariaDB, MySQL, MSSQL, Redis and Valkey require a server you run and secure; a certificate and key if HTTP/2 over TLS is wanted; and a Go 1.26 toolchain if installing from source. Teams that want a managed hosted platform, or that will not patch a hand-built binary, should choose something else, and because many subsystems are compiled in, upgrading one of them means upgrading Algernon. Documentation is also split, with the README pointing to TUTORIAL.md for guidance rather than covering it inline.

project readme (upstream, from github) — read inline

Algernon

Build GoDoc License FOSSA Status Stand With Ukraine

Web server with built-in support for HTTP/2, HTTP/3 (QUIC), Lua, Teal, Markdown, Pongo2, HyperApp, Amber, Sass(SCSS), GCSS, JSX, TypeScript, Ollama (LLMs), BoltDB (built-in, stores the database in a file, like SQLite), Redis, Valkey, PostgreSQL, SQLite, MariaDB, MySQL, MSSQL, IPv6, npm-less React 19, rate limiting, graceful shutdown, plugins, users and permissions.

All in one small self-contained executable.

Distro Packages

Packaging status

Quick installation

Requires Go 1.26 or later.

go install github.com/xyproto/algernon@latest

Or manually (development version):

git clone https://github.com/xyproto/algernon
cd algernon
go build -mod=vendor
./welcome.sh

Releases and pre-built images

See the release page for releases for a variety of platforms and architectures.

Getting Started

See TUTORIAL.md.

Docker

The Docker image is less than 17MB and can be tried out (on x86_64) with:

mkdir localhost
echo 'hi!' > localhost/index.md
docker run -it -p4000:4000 -v .:/srv/algernon xyproto/algernon

And then visiting http://localhost:4000 in a browser.

Technologies

Written in Go. Uses Bolt (built-in), MySQL, PostgreSQL, SQLite or Valkey/Redis (recommended) for the database backend, permissions2 for handling users and permissions, gopher-lua for interpreting and running Lua, optional Teal for type-safe Lua scripting, http2 for serving HTTP/2, quic-go for serving QUIC, gomarkdown/markdown for Markdown rendering, amber for Amber templates, Pongo2 for Pongo2 templates, Sass(SCSS) and GCSS for CSS preprocessing. logrus is used for logging, esbuild for bundling and converting JSX/TSX to JavaScript, tollbooth for rate limiting and pie for plugins.

Design decisions

  • HTTP/2 over SSL/TLS (https) is used by default, if a certificate and key is given.
    • If not, regular HTTP is used.
  • HTTP/3 (QUIC) can be enabled with a flag.
  • /data and /repos have user permissions, /admin has admin permissions and / is public, by default. This is configurable.
  • The following filenames are special, in prioritized order:
    • index.lua is Lua code that is interpreted as a handler function for the current directory.
    • index.html is HTML that is outputted with the correct Content-Type.
    • index.md is Markdown code that is rendered as HTML.
    • index.txt is plain text that is outputted with the correct Content-Type.
    • index.pongo2, index.po2 or index.tmpl is Pongo2 code that is rendered as HTML.
    • index.amber is Amber code that is rendered as HTML.
    • index.hyper.js, index.hyper.jsx or index.happ is JSX+HyperApp code that is rendered as HTML.
    • index.jsx is a React JSX/JavaScript file that is rendered as HTML with bundled JavaScript.
    • index.tsx is a React TSX/TypeScript file that is rendered as HTML with bundled JavaScript.
    • index.tl is Teal code that is interpreted as a handler function for the current directory.
    • index.prompt is a content-type, an Ollama model, a blank line and a prompt, for generating content with LLMs.
    • data.lua is Lua code, where the functions and variables are made available for Pongo2, Amber and Markdown pages in the same directory.
    • If a single Lua script is given as a command line argument, it will be used as a standalone server. It can be used for setting up handlers or serving files and directories for specific URL prefixes.
    • style.gcss is GCSS code that is used as the style for all Pongo2, Amber and Markdown pages in the same directory.
  • The following filename extensions are handled by Algernon:
    • Markdown: .md (rendered as HTML)
    • Pongo2: .po2, .pongo2 or .tpl (rendered as any text, typically HTML)
    • Amber: .amber (rendered as HTML)
    • Sass: .scss (rendered as CSS)
    • GCSS: .gcss (rendered as CSS)
    • JSX: .jsx (rendered as JavaScript/ECMAScript)
    • TypeScript: .ts, .tsx (rendered as JavaScript/ECMAScript)
    • Lua: .lua (a script that provides its own output and content type)
    • Teal: .tl (same as .lua but with type safety)
    • HyperApp: .hyper.js or .hyper.jsx (rendered as HTML)
  • Other files are given a mimetype based on the extension.
  • Directories without an index file are shown as a directory listing, where the design is hard coded.
  • UTF-8 is used whenever possible.
  • The server can be configured by command line flags or with a lua script, but no configuration should be needed for getting started.

Features and limitations

  • Supports HTTP/2, with or without HTTPS (browsers may require HTTPS when using HTTP/2).
  • Also supports HTTP/3 (QUIC) and regular HTTP.
  • Can use Lua scripts as handlers for HTTP requests.
  • The Algernon executable is compiled to native and is reasonably fast.
  • Works on Linux, macOS and 64-bit Windows.
  • The Lua interpreter is compiled into the executable.
  • The Teal typechecker is loaded into the Lua VM.
  • Live editing/preview when using the auto-refresh feature.
  • The use of Lua allows for short development cycles, where code is interpreted when the page is refreshed (or when the Lua file is modified, if using auto-refresh).
  • Self-contained Algernon applications can be zipped into an archive (ending with .zip or .alg) and be loaded at start.
  • Built-in support for Markdown, Pongo2, Amber, Sass(SCSS), GCSS and JSX/TSX.
  • Redis is used for the database backend, by default.
  • Algernon will fall back to the built-in Bolt database if no Redis server is available.
  • The HTML title for a rendered Markdown page can be provided by the first line specifying the title, like this: title: Title goes here. This is a subset of MultiMarkdown.
  • No file converters needs to run in the background (like for SASS). Files are converted on the fly.
  • If -autorefresh is enabled, the browser will automatically refresh pages when the source files are changed. Works for Markdown, Lua error pages and Amber (including Sass, GCSS and data.lua). This only works on Linux and macOS, for now. If listening for changes on too many files, the OS limit for the number of open files may be reached.
  • Includes an interactive REPL.
  • If only given a Markdown filename as the first argument, it will be served on port 3000, without usi

readme truncated — read the full docs on github

Frequently asked questions

Is algernon free to use?

algernon is open source under the BSD-3-Clause licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does algernon do?

Small self-contained pure-Go web server with Lua, Teal, Markdown, HTTP/2, QUIC, Redis, TypeScript, npm-less React 19, SQLite, and PostgreSQL support ++

What is algernon written in?

algernon is primarily written in JavaScript. Its source is publicly available at https://github.com/xyproto/algernon, and it has 3,028 GitHub stars.