Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Redbean - single-file distributable web server

Redbean - single-file distributable web server

Scheduled Pinned Locked Moved App Packaging & Development
1 Posts 1 Posters 508 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • robiR Offline
    robiR Offline
    robi
    wrote on last edited by
    #1

    [red stuffed lobster logo]

    redbean

    single-file distributable web server

    redbean is an open source webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share.

    redbean embeds Lua, SQLite, and MbedTLS into a fork() driven application server that benchmarks at 1.1 million qps on a personal computer. It's got a live bestline REPL with code completion and a UNIX module too, that lets you directly use the Cosmopolitan Libc system call interface. redbean furthermore provides sandboxing and system call tracing for security. This makes redbean a great fit for when you want to build an app that's vertically integrated into a single tiny file that runs on nearly all PCs and servers.

    Others have been taking this excellence to great heights:

    https://github.com/kissgyorgy/redbean-docker

    The smallest possible web server in Docker!
    Built from Redbean: https://redbean.dev/, a single-file distributable web server.

    The final container takes only 501 kB:

    $ docker images redbean-static
    REPOSITORY      TAG         IMAGE ID      CREATED         SIZE
    redbean-static  latest      814da89a2fa7  16 minutes ago  501 kB
    

    or just 186 kB if you use the tinylinux version of Redbean:

    $ docker images redbean-tinylinux
    REPOSITORY         TAG         IMAGE ID      CREATED        SIZE
    redbean-tinylinux  latest      0b98596e96d8  2 seconds ago  186 kB
    

    Examples

    There are a couple of example Dockerfiles in this repo if you want to build it yourself:

    • Dockerfile-multistage of how to produce a container from "scratch"
    • Dockerfile-tinylinux for the world record small version
    • Dockerfile-onbuild if you just want a scratch container

    Conscious tech

    1 Reply Last reply
    2

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Bookmarks
    • Search