selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

scalar logo

Self-host scalar

release-2026-11-16-44f7c9b

OpenAPI reference docs and API client

ReleaseOpen SourceMIT
docker run -p 8080:8080 -e API_REFERENCE_CONFIG='{"sources":[{"url": "https://registry.scalar.com/@scalar/apis/galaxy?format=json"}],"theme": "purple"}' scalarapi/api-reference:latest
Updated2 hours ago
LanguageTypescript
Setup difficultyEasy
ThemeDark mode
Stars
16 412
Port
8080 (HTTP UI of the self-hosted API Reference container (mapped 8080:8080))
Docker
scalarapi/api-reference

What is scalar?

Scalar is an open-source toolkit for publishing and trying out HTTP APIs. The heart of it is the API Reference, a JavaScript widget that takes an OpenAPI or Swagger file and turns it into browsable documentation where every operation can be executed and where request snippets are produced for numerous languages. That widget can be embedded with a CDN script tag, wired into dozens of web frameworks through dedicated plugins, or run standalone as the scalarapi/api-reference container, which listens on 8080, picks up OpenAPI and AsyncAPI files you mount at /docs, reads a JSON config from an environment variable, honours a subpath prefix for reverse proxies and answers on a health endpoint. The monorepo also holds the API Client, a desktop and browser tool that treats an OpenAPI document as its collection, adds environments, dynamic variables, pre-request scripts and assertion tests, and can ingest Swagger 2.0, Postman and cURL inputs. Rounding it out are a CLI, a mock server, an OpenAPI parser with upgrade and Markdown-export helpers, and an HTTP echo server. Team collaboration, Git sync, hosted documentation sites, SDK builds and MCP servers belong to Scalar's managed platform with free and paid tiers rather than to the container you run yourself.

scalar alternatives

All self-hosted alternatives to Postman →

Should you self-host scalar?

scalar scores 76/100 on selfhost.directory (how scoring works) and ranks #3 of 12 in API. It has 16 412 GitHub stars, +161 in the last 30 days.

It shipped 52 stable releases in the past year. The latest, release-2026-11-16-44f7c9b, came out on 16 November 2026. New versions land roughly every 3 days.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Hoppscotch Community Edition (84/100, 80 829 stars). It scores higher overall, so compare the two before you pick. See scalar vs Hoppscotch Community Edition side by side.

Features

  • AsyncAPI support
  • Built-in API testing tool
  • Container health check
  • Environments and variables
  • Generated code examples
  • Import from OpenAPI, Postman or cURL
  • Live spec sync (watch mode)
  • Offline-first API client
  • OpenAPI/Swagger documentation rendering
  • Pre-request Scripts
  • Response tests
  • Theming
  • Two layouts

scalar README

How to install scalar

Install scalar with Docker

Environment variables
API_REFERENCE_CONFIG, BASE_PATH, CDN_URL
docker run \
  -p 8080:8080 \
  -e API_REFERENCE_CONFIG='{"sources":[{"url": "https://registry.scalar.com/@scalar/apis/galaxy?format=json"}],"theme": "purple"}' \
  scalarapi/api-reference:latest

Either API_REFERENCE_CONFIG must be set OR documents must be mounted to /docs. Visit http://localhost:8080 to see your API reference.

How to configure scalar

  • API_REFERENCE_CONFIGJSON configuration for the API Reference
  • BASE_PATHURL prefix when serving under a subpath (for example /docs); only changes the URLs the client requests, the reverse proxy must still strip the prefix
  • CDN_URLURL for the API Reference CDN

scalar releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Can I write tests for API responses?

Yes, post-response scripts can assert on status codes, headers and bodies with the Postman-compatible pm API.

Does the API Client work offline?

Yes, it is offline-first: requests and collections live on your machine, and the desktop app only needs a network for the requests you send.

Can I import an OpenAPI or Swagger file?

OpenAPI 3.x in JSON or YAML is the native format; Swagger 2.0 is upgraded to OpenAPI 3.1, and URL, Postman collection or cURL imports also work.

Which platforms does the API Client run on?

The browser, plus desktop apps for macOS, Windows and Linux.

Is Scalar a Postman alternative?

For many teams it is: requests, collections, environments, scripts and response tests are covered, and Postman v2.0/v2.1 collections can be imported, but collections are built from your OpenAPI document.

Is Scalar API Client free?

Yes, it is MIT-licensed open source and free in the browser at client.scalar.com or as a desktop app.

More in API

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…