shelf_letsencrypt
2.0.8, released 3 weeks ago by an unverified publisher
Let's Encrypt support and automatic HTTPS certificate management for the shelf package.
What it does
Brings Let's Encrypt automated HTTPS certificate support to the shelf web package. It handles ACME challenges, stores certificates securely with appropriate permissions, and provides tools for domain certificate renewals.
AI-written summary of version 2.0.8, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Dart backend using shelf and need free automated HTTPS certificates.
- You want built-in certificate generation, storage management, and automatic renewals.
Skip it when
- You are not using the shelf package for your server.
- Your deployment environment terminates SSL at a reverse proxy or load balancer rather than the application server.
Strengths
- Automatic Let's Encrypt certificate issuing and renewal for shelf servers.
- Supports multi-domain configurations on the same HTTPS port.
- Includes a robust command-line tool for inspecting, requesting, and renewing certificates.
Weaknesses
- Requires proper NAT and DNS configurations in development environments.
- Requires root privileges on Linux to open ports 80 and 443.
Setup
- Kind
- FFI (native library)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 9
Requires domain names, email addresses, and appropriate permissions (root privileges to bind to standard ports 80 and 443 on Linux).
import 'dart:io';
import 'package:shelf/shelf.dart';
import 'package:shelf_letsencrypt/shelf_letsencrypt.dart';
void main(List<String> args) async {
final domains = Domain.fromDomainsNamesAndEmailsArgs('www.domain.com', 'info@domain.com');
final certificatesHandler = CertificatesHandlerIO(Directory('/var/lib/myapp/certs'));
final letsEncrypt = LetsEncrypt(certificatesHandler, production: false);
final pipeline = const Pipeline().addMiddleware(logRequests());
final handler = pipeline.addHandler((request) => Response.ok('OK'));
await letsEncrypt.startServer(handler, domains, loadAllHandledDomains: true);
}Alternatives
Packages that do the same job and could replace shelf_letsencrypt.
- shelf_proxy
A shelf handler for proxying HTTP requests to another server.
86Compare - shelf_helmet
Secure Dart Shelf and Dart Frog apps by setting HTTP security headers
45Compare
Works with
Packages commonly used together with shelf_letsencrypt: ones it builds on, ones built on it, and its own family.
- shelfshelf_letsencrypt depends on itComposable web server middleware for Dart
- ffishelf_letsencrypt depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- shelf_staticshelf_letsencrypt depends on itServe static files over HTTP with the shelf package
- argsshelf_letsencrypt depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- basic_utilsshelf_letsencrypt depends on itCommon utility classes for Strings, Dates, X509, PKCS, Cryptography and HTTP requests.
- bones_apiBuilt on shelf_letsencryptA powerful API backend framework for Dart with HTTP server, routing, SQL translator, and DB adapters.