Skip to content

magicserverjs/magicserver

magicserver wordmark

Easy, automatic HTTPS

Certificate issuance and renewal automation with intuitive usage and sensible defaults.

main License npm version

Tip

magicserver is in active development. Feel free to request features, share your use case, and provide feedback on ease of use. Open discussions

Quick Start

As a library, magicserver provides platform-specific utilities for each platform it supports. After configuring DNS records, starting an automatic HTTPS server requires just a few lines of code:

import { createMagicServer } from "@magicserver/magicserver"

const server = createMagicServer("example.com", (req, res) => {
  res.end("Hello, world!")
})

Here, createMagicServer() requests a certificate for "example.com" from Let's Encrypt, verifies ownership of the domain, and finally starts an HTTPS server that responds with "Hello, world!".

To learn more about how to use magicserver, please review our documentation.

Features

  • Easy configuration with best-practice defaults that just work.
  • Enterprise-ready with flexibility to use a custom CA for internal names.
  • Scale vertically and horizontally with direct access to the certificates.
  • Bloat free with minimal dependencies and modular design.
  • HTTP/1.1 and HTTP/2 support.

Important

Interested in what I do? I am looking for full-time oppurtunities! Hi, I am Arsh. I am a serial builder addicted to difficult and impactful challenges. You can review my work on my website and on my GitHub profile. Let's schedule an introduction.

Potential Future Features

Prioritization of features is based on user feedback. If one of these features is important to you, please create an issue.

  • Integration with Next.js, Remix, Nuxt, Astro, Bun, Deno, and Express
  • Google, ZeroSSL, Buypass CA Authorities
  • HTTP to HTTPS redirect
  • Structured logging
  • Serving application over insecure HTTP in addition to HTTPS
  • 6 day certificates (waiting for CA support)
  • Persistent accounts
  • ACME Renewal Information (ARI) extension support
  • IP address certificates with TLS-ALPN-01 challenge
  • Wildcard domain certificates with DNS-01 challenge
  • Storage of certificates to share within a fleet of servers

Troubleshooting

For bug reports, please open an issue with a minimal reproducible example. If you an run into an issue that you are unsure is a bug, please start a discussion for help.

Code of Conduct

When interacting with other people, be kind, constructive, and respectful. We follow the Contributor Covenant 3.0 to standardize and communicate our expectations for acceptable behavior. You can read the full code of conduct here.

Contributing

We welcome contributions of any size and skill level. You can read the full contributing guide here.

Security

We take security seriously. We have mitigations against ongoing supply chain attacks, and a responsible disclosure policy. Please refer to SECURITY.md for more information.

License

This project is licensed under the MIT License. Parts of magicserver are derived from the following projects:

Changelog

See CHANGELOG.md for a history of changes to the magicserver package.

About

Automatic HTTPS for any Node.js application. Fully managed TLS certificate issuance and renewal.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •