DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

Yaws: How Erlang’s Dynamic Web Server Works and How to Run It

Yaws is an Erlang HTTP/1.1 server with a built-in dynamic page format, standalone and embedded modes, and documented patterns for streaming, WebSockets, uploads, and sessions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yaws is an HTTP/1.1 web server written in Erlang, designed especially for dynamic content. It can run as a standalone daemon or inside another Erlang application. Its distinctive page format, .yaws, combines HTML with Erlang code that generates part of the response.

What is Yaws?

The Yaws project describes it as “a webserver for dynamic content written in Erlang.” It serves static HTML and provides a built-in model for dynamic pages, alongside documented patterns for WebSockets, streaming, uploads, sessions, and other application needs. See the Yaws project README and the official documentation site.

As an Amazon Associate I earn from qualifying purchases.

Yaws can be used in two ways: as a conventional standalone web-server daemon, or embedded within another Erlang application. The choice depends on whether you want to operate it as a separate server or integrate its operation with an existing Erlang system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How does Yaws handle dynamic content?

A .yaws page combines ordinary HTML with Erlang chunks. Each Erlang chunk must provide an out/1 function. Yaws invokes that function and inserts its result into the response; the result can be regular HTML or structured EHTML. According to the Yaws manual, compiled chunks are cached so later requests can call the compiled modules.

This puts application logic in Erlang code within the page format, rather than requiring every dynamic response to be handled by an external CGI process. It is a particular fit for teams already building and operating Erlang applications.

What can Yaws do beyond serving pages?

The official documentation includes examples for several application patterns:

  • Real-time communication: WebSockets and server-sent events.
  • Streaming: sending streaming data to clients.
  • Application integration: appmods and AJAX/JSON RPC.
  • Request and session handling: file uploads and cookie sessions.
  • Page composition: server-side includes and embedding.

These examples show what the documentation covers; they do not establish that a particular configuration is production-ready for every workload. Evaluate deployment, security, and operational requirements for your application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Erlang version and build tools does Yaws require?

The current project README specifies Erlang/OTP 25.0 or higher to compile Yaws. It documents both autotools and rebar3 build routes, with build dependencies that include Erlang components, build tooling, and PAM development headers. Generating optional documentation requires additional TeX and Ghostscript dependencies. Check the README for the current dependency list and instructions for your environment.

Build from a source checkout with autotools

The README notes that a GitHub source checkout does not include a ./configure script. Run autoreconf -fi first, then configure an installation prefix and build:

autoreconf -fi
./configure --prefix=/path/to/install
make

Replace /path/to/install with the prefix appropriate for your system. These are the project’s documented build steps, not a guarantee that every operating system has the same prerequisites or packaging.

Build with rebar3

The README also documents compiling with rebar3 and launching an interactive shell:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
rebar3 compile
rebar3 shell

Its test-build example starts an HTTP service on 0.0.0.0:8000. Because that address listens on all network interfaces, consider where the service is reachable before using a test configuration on a networked machine.

How do you start Yaws?

For an installed build, the README recommends invoking the Yaws script interactively. It also documents daemon operation with --daemon --heart, where the heart option provides restart behavior. The README says the default configuration creates HTTP and HTTPS servers; actual availability depends on your configuration, certificates, and deployment environment.

yaws
# Daemon operation with restart behavior
yaws --daemon --heart

These commands reflect the project README’s instructions. Review the current configuration and deployment requirements before exposing a server publicly.

Is Yaws maintained, and what should you check before adopting it?

The project repository is the appropriate place to check current releases and code changes, but a repository alone does not establish a support commitment or guarantee a particular maintenance level. Before adopting Yaws, review recent release and repository activity, security guidance, and the support channels available to your team. The documentation site also provides usage and feature information.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Is Yaws faster than other web servers?

The Yaws project presents performance as an advantage and attributes it to handling each client with a lightweight Erlang process and Erlang’s concurrency model. That is the project’s explanation, not a comparative benchmark. The reviewed materials do not provide a measured throughput figure, latency distribution, test hardware, or cross-server workload comparison, so they do not establish that Yaws is faster than another server.

For a useful comparison, benchmark the versions and configurations you would actually deploy, using the same hardware, workload, and measurement method. Include the application behavior and operational constraints that matter to your system, not just static requests.

How does Yaws compare with Erlang’s Inets HTTP server?

Inets is part of the Erlang/OTP ecosystem. Its HTTP server documentation describes basic web-server functionality and dynamic-content facilities including CGI and ESI. Yaws, by contrast, offers its own .yaws page model and documents a broader set of application patterns, along with standalone and embedded operation. The Erlang/OTP 28 Inets documentation is a useful reference for that comparison.

Decision point Yaws Inets HTTP server
Dynamic-content approach .yaws pages with Erlang out/1 chunks Includes CGI and ESI facilities
Project positioning Dedicated Erlang web-server project for dynamic content Documentation describes basic web-server functionality
Additional patterns covered here Official examples include WebSockets, streaming, server-sent events, uploads, sessions, and embedding Not stated in the cited Inets comparison documentation

Neither description alone determines the better choice. Compare the integration model, required features, build and runtime constraints, configuration needs, and the maintenance expectations for your application.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.