Why We Open Sourced the Anvil App Server
Tags: python, webdev, opensource
Published: 2020-10-27 16:02:41

---
title: Why We Open Sourced the Anvil App Server
published: true
date: 2020-05-20 00:00:00 UTC
tags: [python,webdev,opensource]
canonical_url: https://anvil.works/blog/why-open-source
summary: |
  We open-sourced the crown jewels of our developer platform, and the reaction was great! This is the rationale for our decision - and why we still have a business afterwards :)
---

# Why Open Source?

A little while ago, we open-sourced the [Anvil App Server](https://anvil.works/blog/open-source). The community reaction has been great, even a little overwhelming (yes, every reply to that announcement really did land in my inbox!). We’ve already incorporated a bunch of that feedback into our [version 1.2 release](https://github.com/anvil-works/anvil-runtime). But we keep getting asked, “ **Why did you open-source such a core part of your product?** “

### Why do this at all?

[Anvil](https://anvil.works) is a tool that makes it as simple as possible to build a web app. We do that by enabling you to build the whole application in one language, Python.

![Yes, really. All of these, for a simple web app.](https://anvil.works/blog/img/why-open-source/frameworks.png) <figcaption>
                <p>Yes, really. All of these, for a simple web app.</p>
            </figcaption>

If you want to build a web application today, it’s a mess. Even for the simplest application, you’ll need to know HTML, Javascript, CSS, Python, SQL, React, Redux, Bootstrap, Sass, Webpack…and that’s a _simple_ app. (Trust me, it gets [way worse](https://github.com/kamranahmedse/developer-roadmap#introduction).)

But even then, you’re not done! You need to know all about Git, about AWS, about how to secure a Linux system, how to set up a database…and then you’re on call to keep it all running. Forever.

Or…you could use Anvil. Build your UI with a [drag-and-drop designer](https://anvil.works/docs/client/ui), write all your [logic in Python](https://anvil.works/docs/client/python), and we’ll take care of the rest. We replace that whole teetering stack with “just write Python”. (Intrigued? [We’ve got tutorials](https://anvil.works/learn).)

### Simple hosting is part of that.

**The web platform is broken** , and Anvil is our attempt to fix it. And, because there is so much complexity in deploying a web app, a cloud-hosted service was the best way to provide the simplicity we want. That way, you can build your app in the Anvil Editor, and make it live on the Internet with [one click](https://anvil.works/docs/deployment).

But we kept hearing from people who said, “that’s great, _but_…”

- _”…but I need to run this on an offshore platform without reliable internet access”_
- _”…but I want to package my app into an IoT device I sell”_
- or simply, _”…but if I’m putting my eggs in this basket, how can I be sure I can still run my app in ten years’ time?”_

These are all good points! A cloud service isn’t the right solution for everyone. If we want to serve these users, there’s got to be some way for them to get their apps out of Anvil and run them locally, under their own complete control.

### Open Source: Escape hatch, not an ejector seat

We believe in [escape hatches, not ejector seats](https://anvil.works/blog/escape-hatches-and-ejector-seats). At conferences, we sometimes get asked, “can I export this as a Flask+JS app?”. Sure, it would be _possible_ – we could generate a server package, compile the client-side Python to Javascript, and spit out a classic web app. But it would have serious drawbacks, because:

![Not a comfy ride.](https://anvil.works/blog/img/escape-hatches-ejection-seat.jpg) <figcaption>
                <p>Not a comfy ride.</p>
            </figcaption>

**Code generation is an ejector seat.** Generated code is better than nothing – at least you can edit it! But the moment you edit that code, you lose all the benefits of the system that generated it. If you’re using Anvil because of its [drag-and-drop editor](https://anvil.works/docs/editor) and [Python in the browser](https://anvil.works/docs/client), why should our locally-hosted users have to use vim and Javascript?

**So we did it the right way:** we [open-sourced Anvil’s runtime engine](https://anvil.works/blog/open-source). It’s the same code that serves your app in our hosted service, and it represents your app the same way. You can edit your code with a text editor, run it, then `git push` it back into our online IDE. It’s not an ejector seat: there’s no explosive transition. It’s an escape hatch: you can climb out, and climb right back in.

### What about our business model?

Anvil was never meant to be one of those enterprise low-code systems that charge you $20/mo for each person who uses your app. **Anvil is a developer tool.** The apps you develop are _yours_. Enabling you to [run them on a Raspberry Pi](https://www.tomshardware.com/how-to/raspberry-pi-remote-control-camera-from-web) is cool, but it doesn’t change our business model.

We’re doing what we always were: We make and sell a [development tool](https://anvil.works/#1-minute-intro-video) that makes it drastically simpler to build web applications. We provide hosting for Anvil apps. We offer the entire development-and-hosting platform on-site for [enterprise customers](https://anvil.works/docs/overview/enterprise). And, of course, we offer a free plan so that everyone can use Anvil for hobby or educational purposes – or to start building something and see how it goes.

We’ve open-sourced the [Anvil App Server](https://anvil.works/blog/open-source) for the (relatively small) number of people who need it, and to provide the ultimate insurance policy. Sure, you can build an app with vim and host it yourself, without even registering an account with us (we’ve got [docs](https://github.com/anvil-works/anvil-runtime/blob/master/doc/creating-and-editing-apps.md) to show you how!). But the Anvil Editor is the world’s easiest way to build a web app, and our hosted service is the easiest way to deploy it – so that’s what we expect most of our users to continue doing. And you can build with confidence, knowing that the open-source code is [right there](https://github.com/anvil-works/anvil-runtime) if you need it.

### Try it yourself

If our development philosophy resonates with you, why not try Anvil yourself?

Go on – it’s free, and now it’s open source too:

**[Try Anvil](https://anvil.works/build)**

or

**[Read a tutorial](https://anvil.works/learn)**