MCPSERV.CLUB
Algernon

Algernon

Self-Hosted

All‑in‑one Go web server with built‑in scripting and databases

Active(100)
3.0kstars
0views
Updated 2 days ago
Algernon screenshot

Overview

Discover what makes Algernon powerful

Alger — pronounced *al‑jehr*, a lightweight yet fully-featured web server written in Go—offers a single, self‑contained binary that bundles an extensive set of runtime capabilities. At its core it serves static files, HTTP/2, and QUIC traffic, while providing a rich extensibility layer through embedded scripting languages (Lua/Teal), templating engines (Pongo2, Amber), and a choice of persistent backends (BoltDB, SQLite, PostgreSQL, MySQL/MariaDB, MSSQL, Redis). The design prioritizes zero‑dependency deployments: the binary contains all libraries needed for scripting and database access, making it ideal for containerized or edge deployments where disk space and runtime isolation are critical.

Language & Runtime

Scripting & Templating

Persistence

Permissions & Users

Overview

Alger — pronounced al‑jehr, a lightweight yet fully-featured web server written in Go—offers a single, self‑contained binary that bundles an extensive set of runtime capabilities. At its core it serves static files, HTTP/2, and QUIC traffic, while providing a rich extensibility layer through embedded scripting languages (Lua/Teal), templating engines (Pongo2, Amber), and a choice of persistent backends (BoltDB, SQLite, PostgreSQL, MySQL/MariaDB, MSSQL, Redis). The design prioritizes zero‑dependency deployments: the binary contains all libraries needed for scripting and database access, making it ideal for containerized or edge deployments where disk space and runtime isolation are critical.

Architecture

  • Language & Runtime: Go 1.21+ powers the HTTP/2 and QUIC servers, leveraging the net/http standard library with custom handlers for WebSocket, rate limiting, and graceful shutdown. The server is a single executable that embeds compiled templates and static assets.
  • Scripting & Templating: Lua is executed via gopher-lua, while Teal adds optional static typing. Template engines include Pongo2 (Jinja‑like), Amber (Go‑style templating), and a lightweight HyperApp/JSX renderer that compiles JSX to vanilla JavaScript on the fly. Markdown is rendered using gomarkdown/markdown.
  • Persistence: A built‑in BoltDB file serves as a lightweight key/value store, mirroring SQLite’s file‑based model. For relational needs, the server supports PostgreSQL, MySQL/MariaDB, and MSSQL via standard drivers. Redis is the recommended cache/backend for high‑throughput scenarios.
  • Permissions & Users: The permissions2 package handles authentication, role‑based access control, and user management. It can be backed by any of the supported databases or BoltDB for simple setups.
  • Extensions: Plugins are discovered at runtime; developers can write Go modules that register new HTTP handlers, middleware, or scripting hooks. Webhooks and custom APIs are exposed through a minimal REST interface that can be secured with JWT or API keys.

Core Capabilities

  • Protocol Support: Native QUIC and HTTP/2 support with automatic TLS via autocert or user‑supplied certificates.
  • Rate Limiting: Per‑IP and per‑route throttling using token bucket algorithms, configurable via YAML or code.
  • Graceful Shutdown: Non‑blocking shutdown that waits for in‑flight requests to complete, with optional forced timeout.
  • Asset Preprocessing: Sass/SCSS and GCSS compilers run on the fly, enabling developers to write modern CSS without external build steps.
  • LLM Integration: Optional Ollama support allows embedding local language models directly into request handlers, facilitating AI‑powered endpoints.
  • Developer APIs: Exposes a small HTTP API for managing users, permissions, and plugin configuration. SDKs are available in Go and JavaScript (via goja-babel).

Deployment & Infrastructure

Alger is designed for rapid deployment in containerized environments. The official Docker image is under 12 MB, making it suitable for CI/CD pipelines and edge nodes. It can run on any OS supported by Go, including Linux, macOS, and Windows. The single binary eliminates the need for a package manager or runtime dependencies, simplifying rollback and version pinning. Horizontal scaling is achieved by deploying multiple instances behind a load balancer; the server’s stateless design ensures that any instance can serve any request, provided shared resources (e.g., Redis or a relational DB) are accessible.

Integration & Extensibility

  • Plugin System: Developers can write Go plugins that implement the Handler interface, register custom routes, or inject middleware. Plugins are loaded from a specified directory at startup.
  • Webhooks: External services can trigger server actions via signed POST requests to predefined endpoints, enabling CI/CD triggers or event‑driven architectures.
  • Custom APIs: The built‑in REST API can be extended with additional endpoints; authentication is handled by the permissions system, allowing fine‑grained access control.
  • Scripting Hooks: Lua/Teal scripts can be executed on request or response events, providing dynamic content generation without recompiling the server.

Developer Experience

The configuration is driven by a single YAML file (config.yaml) that exposes all runtime options—port numbers, TLS settings, database connections, rate limits, and plugin paths. The documentation is comprehensive: the README, TUTORIAL.md, and godoc references cover every public API. Community support is active on GitHub issues and the project's Discord channel, with frequent updates for new Go releases and security patches. The license (BSD‑3) allows commercial use without copyleft constraints, making it attractive for enterprise deployments.

Use Cases

  1. Static Site Hosting: Serve Markdown or Pongo2 templates with on‑the‑fly CSS preprocessing, all from a single binary.
  2. Microservice Gateway: Act as an API gateway that forwards requests to backend services, applying rate limiting and authentication via the permissions system.
  3. Edge Compute: Deploy on cloud edge nodes to run Lua/Teal scripts for request manipulation, or serve lightweight AI models via Ollama.
  4. Internal Tooling: Host internal dashboards that use BoltDB for quick prototyping, with user authentication and role‑based access.

Advantages

Open SourceReady to get started?

Join the community and start self-hosting Algernon today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
cloud-platforms
License
BSD-3-CLAUSE
Stars
3.0k
Technical Specs
Pricing
Open Source
Database
Multiple
Docker
Official
Supported OS
LinuxDocker
Author
xyproto
xyproto
Last Updated
2 days ago