https://github.com/openrundev/openrun
Open source alternative to Google Cloud Run and AWS App Runner. Easily deploy web apps declaratively.
https://github.com/openrundev/openrun
application-server appserver containers devops-tools docker golang htmx internal-tools low-code-platform self-hosted starlark
Last synced: 6 days ago
JSON representation
Open source alternative to Google Cloud Run and AWS App Runner. Easily deploy web apps declaratively.
- Host: GitHub
- URL: https://github.com/openrundev/openrun
- Owner: openrundev
- License: apache-2.0
- Created: 2023-04-13T18:29:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-22T22:12:30.000Z (12 days ago)
- Last Synced: 2026-01-23T15:35:19.991Z (11 days ago)
- Topics: application-server, appserver, containers, devops-tools, docker, golang, htmx, internal-tools, low-code-platform, self-hosted, starlark
- Language: Go
- Homepage: https://openrun.dev
- Size: 12.5 MB
- Stars: 720
- Watchers: 3
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-go - OpenRun - Open-source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools across a team. (Server Applications / HTTP Clients)
- awesome-go - openrundev/openrun
- fucking-awesome-go - OpenRun - Open-source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools across a team. (Server Applications / HTTP Clients)
- awesome-starlark - OpenRun - web app development and deployment (Users)
- awesome-go-with-stars - OpenRun - source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools across a team. | 2026-01-27 | (Server Applications / HTTP Clients)
- awesome-go - OpenRun - Open-source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools across a team. (Server Applications / HTTP Clients)
- awesome-go-cn - OpenRun - source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools across a team. [![近一周有更新][G]](https://github.com/openrundev/openrun) [![godoc][D]](https://godoc.org/github.com/openrundev/openrun) (服务器应用程序 / HTTP客户端)
README

App deployment simplified. Open source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools, on a single node with Docker/Podman or onto a Kubernetes cluster.
### Menu
- [Overview](#overview)
- [FAQ](#faq)
- [Features](#features)
- [Roadmap](#roadmap)
- [Setup](#setup)
- [Documentation](#documentation)
- [Getting help](#getting-help)
- [Contributing](#contributing)
## Overview
OpenRun is an Apache-2.0 licensed open source alternative to Google Cloud Run and AWS App Runner. OpenRun makes it easy to declaratively deploy applications built in frameworks like Streamlit/Gradio/FastHTML/NiceGUI etc. Apps can be deployed on a single node with Docker/Podman or onto a Kubernetes cluster.
OpenRun provides **declarative** GitOps based app deployment, OAuth/OIDC/SAML access controls, TLS certs & secrets management. OpenRun is built for teams to easily deploy internal tools, with full RBAC support. OpenRun apps are deployed directly from the git repo, no build step required. OpenRun scales idles apps down to zero and supports atomic updates across multiple apps.
This repo hosts the source code for OpenRun. The source for the documentation site [openrun.dev](https://openrun.dev) is in the [docs](https://github.com/openrundev/docs) repo. App specifications, which are templates to create apps, are defined in the [appspecs](https://github.com/openrundev/appspecs) repo. Sample apps are in the [apps](https://github.com/openrundev/apps) repo.

## FAQ
How does OpenRun compare to other deployment solutions like Coolify/Dokku/CapRover etc?
> The main differences are:
>
> - OpenRun is declarative. After initial OpenRun setup. Instead of using CLI commands or UI operations, all operations including creating new app and updating config for existing apps can be doing by updating a config file in Git. With most other solution, app creation/update is done manually through CLI or UI. Only app source code update can be done through Git.
> - OpenRun can deploy apps on a single machine with Docker/Podman or it can deploy apps onto a Kubernetes cluster. Most other solutions do not support deployment to Kubernetes.
> - OpenRun is implemented as a web server, it does not depend on external web server like Nginx/Traefik. This simplifies end-user usage and allows OpenRun to implement features like scale down to zero (for app containers) and OAuth/SAML/Cert based auth with RBAC.
> - OpenRun supports features like staged deployment and automatic dev env setup which are not available in other solutions.
Why is declarative configuration useful?
> Imperative CLI or UI operation are easy to start with, but they make it difficult to track changes and rollback updates. With a declarative config, all changes are version controlled. It is easy to create a new environment, since everything is in Git. If multiple folks are making config changes in a team, declarative systems are easier to manage.
>
> Declarative configuration is what makes Kubernetes and Terraform useful. OpenRun brings declarative configuration to web app deployment. Instead of writing pages of YAML, each app is specified as a couple of lines of Starlark (python-like) config. For example, see [utils.star](https://github.com/openrundev/openrun/blob/main/examples/utils.star).
What types of apps can be deployed with OpenRun?
> OpenRun can deploy any web app which runs in a single container. OpenRun supports [AppSpecs](https://openrun.dev/docs/container/overview/#app-specs) which allow zero-config deployment of frameworks like Streamlit/Gradio/FastHTML/NiceGUI/Shiny/Reflex based apps. For frameworks which have a AppSpec, no Dockerfile is required, no code changes are required in the app source code. For frameworks which do not have an AppSpec defined, a Dockerfile needs to be present in the app source repo.
>
> OpenRun does NOT support apps which require multiple containers using Docker Compose. The target use case is internal tools talking to existing API endpoints and web apps where the database is externally managed.
Does OpenRun support deployment of internal tools by teams?
> Yes, deployment of internal tools by teams is a target [use case](https://openrun.dev/docs/use-cases/team/). Features which are built for this use case include:
>
> - **Declarative Config**: Manage apps by [declaratively](https://openrun.dev/docs/applications/overview/#declarative-app-management) in git, allowing team to do follow regular SDLC for config
> - **OAuth/OIDC/SAML with RBAC**: Manage who can access which app using [RBAC](https://openrun.dev/docs/configuration/rbac/)
> - **Audit Logs**: All operations and API calls are automatically logged in [audit trail](https://openrun.dev/docs/applications/audit/)
How is OpenRun deployed?
> OpenRun can be deployed on a single node easily (Linux, Windows or OSX), using a SQLite database for storing metadata. Docker/Podman is the only dependency. OpenRun can be deployed across multiple machines, using an external Postgres database for storing metadata.
>
> Support for Kubernetes based deployment is being implemented. On Kubernetes, OpenRun will avoid the need to setup a build system like Jenkins, CD with ArgoCD and an IDP like BackStage.
## Features
OpenRun can be used to:
- Deploy [containerized applications](https://openrun.dev/docs/container/overview/), OpenRun will build and manage the container lifecycle
- Automatically generate a form based UI for backend [actions](https://openrun.dev/docs/actions/)
- Add OAuth/OIDC/SAML based [auth](https://openrun.dev/docs/configuration/authentication/) and [RBAC](https://openrun.dev/docs/configuration/rbac/) for app access
OpenRun supports the following for all apps:
- [Declarative](https://openrun.dev/docs/applications/overview/#declarative-app-management) app deployment
- Atomic updates (all or none) across [multiple apps](https://openrun.dev/docs/applications/overview/#glob-pattern)
- [Staging mode](https://openrun.dev/docs/applications/lifecycle/#staging-apps) for app updates, to verify whether code and config changes work on prod before making them live.
- [Preview app](https://openrun.dev/docs/applications/lifecycle/#preview-apps) creation support, for trying out code changes.
- Support for [github integration](https://openrun.dev/docs/configuration/security/#private-repository-access), apps being directly deployed from github code.
- [Automatic SSL](https://openrun.dev/docs/configuration/networking/#enable-automatic-signed-certificate) certificate creation based on [certmagic](https://github.com/caddyserver/certmagic).
- OAuth/OIDC/SAML based [authentication](https://openrun.dev/docs/configuration/authentication/#oauth-authentication)
- Support for domain based and path based [routing](https://openrun.dev/docs/applications/routing/#request-routing) at the app level.
- Integration with [secrets managers](https://openrun.dev/docs/configuration/secrets/), to securely access secrets.
For containerized apps, OpenRun supports:
- Managing [image builds](https://openrun.dev/docs/quickstart/#containerized-applications), in dev and prod mode
- Passing [parameters](https://openrun.dev/docs/develop/#app-parameters) for the container
- Building apps from [spec](https://openrun.dev/docs/develop/#building-apps-from-spec), no code changes required in repo for [supported frameworks](https://github.com/openrundev/appspecs) (Flask, Streamlit and repos having a Dockerfile)
- Support for [pausing](https://openrun.dev/docs/container/config/) app containers which are idle
For building Hypermedia based apps, OpenRun supports:
- Automatic [error handling support](https://openrun.dev/docs/plugins/overview/#automatic-error-handling)
- Automatic creation of ECMAScript modules using [esbuild](https://esbuild.github.io/) for dependencies.
- Support for [TailwindCSS](https://tailwindcss.com/) and [DaisyUI](https://daisyui.com/) watcher integration.
- Backend app code runs in a [security sandbox](https://openrun.dev/docs/applications/appsecurity/#security-model), with allowlist based permissions.
- [No build step](https://openrun.dev/docs/develop/#app-lifecycle), the development artifacts are ready for production use.
- Support for application data persistence using SQLite
- Virtual filesystem with [content hash based file names](https://openrun.dev/docs/develop/templates/#static-function) backed by SQLite database, enabling aggressive static content caching.
- Brotli compression for static artifacts, HTTP early hints support for performance.
## Roadmap
The feature roadmap for OpenRun is:
- Adding more app specs, to support additional frameworks out of the box
## Setup
### Certs and Default password
OpenRun manages TLS cert using LetsEncrypt for prod environments. For dev environment, OpenRun uses [mkcert](https://github.com/FiloSottile/mkcert) for local certs. Installing OpenRun using brew will automatically install mkcert.
For container based apps, Docker or Podman or Orbstack should be installed and running on the machine. OpenRun automatically detects the container manager to use.
### Install OpenRun On OSX/Linux
To install on OSX/Linux, run
```shell
curl -sSL https://openrun.dev/install.sh | sh
```
Start a new terminal (to get the updated env) and run `openrun server start` to start the OpenRun service.
### Brew Install
To install using brew, run
```
brew tap openrundev/homebrew-openrun
brew install openrun
brew services start openrun
```
### Install On Windows
To install on Windows, run
```
powershell -Command "iwr https://openrun.dev/install.ps1 -useb | iex"
```
Start a new command window (to get the updated env) and run `openrun server start` to start the OpenRun service.
### Install Apps
Once OpenRun server is running, to install apps declaratively, open a new window and run
```
openrun apply --approve github.com/openrundev/openrun/examples/utils.star
```
To schedule a background sync, which automatically applies the latest app config, run
```
openrun sync schedule --approve --promote github.com/openrundev/openrun/examples/utils.star
```
To install apps using the CLI (imperative mode), run
```
openrun app create --approve github.com/openrundev/apps/system/list_files /files
openrun app create --approve github.com/openrundev/apps/system/disk_usage /disk_usage
openrun app create --approve github.com/openrundev/apps/utils/bookmarks /book
```
Open https://localhost:25223 to see the app listing. The disk usage app is available at https://localhost:25223/disk_usage (port 25222 for HTTP). The bookmark manager is available at https://localhost:25223/book, the list files app is available at https://localhost:25223/files.
See [installation]({{< ref "installation" >}}) for details. See [config options]({{< ref "configuration" >}}) for configuration options. To enable Let's Encrypt certificates, see [Automatic SSL]({{< ref "configuration/networking/#enable-automatic-signed-certificate" >}}).
The release binaries are also available at [releases](https://github.com/openrundev/openrun/releases). See [install from source]({{< ref "installation/#install-from-source" >}}) to build from source.
To install a containerized app, ensure either Docker or Podman is running and run
```
openrun app create --spec python-streamlit --branch master --approve github.com/streamlit/streamlit-example /streamlit
```
If the source repo has a `Dockerfile` or `Containerfile`, run
```
openrun app create --spec container --approve /myapp
```
to install the app.
### Build from source
To install a release build, follow steps in the [installation docs](https://openrun.dev/docs/installation/#install-release-build).
To install from source:
- Ensure that a recent version of [Go](https://go.dev/doc/install) is available, version 1.21.0 or newer
- Checkout the OpenRun repo, cd to the checked out folder
- Build the openrun binary and place in desired location, like $HOME
```shell
# Ensure go is in the $PATH
mkdir $HOME/openrun_source && cd $HOME/openrun_source
git clone -b main https://github.com/openrundev/openrun && cd openrun
export OPENRUN_HOME=$HOME/clhome && mkdir -p $OPENRUN_HOME/config
go build -o $OPENRUN_HOME/openrun ./cmd/openrun/
```
### Initial Configuration For Source Install
To use the openrun service, you need an initial config file with the service password and a work directory. The below instructions assume you are using $HOME/clhome/openrun.toml as the config file and $HOME/clhome as the work directory location.
- Create the clhome directory
- Create the openrun.toml file, and create a randomly generate password for the **admin** user account
```shell
cd $OPENRUN_HOME
git clone -C config https://github.com/openrundev/appspecs
$OPENRUN_HOME/openrun password > $OPENRUN_HOME/openrun.toml
$OPENRUN_HOME/openrun server start
```
The service will be started on [https://localhost:25223](https://127.0.0.1:25223) by default (HTTP port 25222).
## Documentation
OpenRun docs are at https://openrun.dev/docs/. For doc bugs, raise a GitHub issue in the [docs](https://github.com/openrundev/docs) repo.
## Getting help
Please use [Github Discussions](https://github.com/openrundev/openrun/discussions) for discussing OpenRun related topics. Please use the bug tracker for bug reports and feature requests.
## Contributing
PRs welcome for bug fixes and enhancements. For application behavior related fixes, refer the [app unit test cases](https://github.com/openrundev/openrun/tree/main/internal/app/tests). Those test run as part of regular unit tests `go test ./...`. For API related changes, OpenRun uses the [commander-cli](https://github.com/commander-cli/commander) library for [automated CLI tests](https://github.com/openrundev/openrun/tree/main/tests). To run the CLI test, run `gmake test` from the openrun home directory.