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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Yaws is an Erlang HTTP/1.1 web server for dynamic-content applications. It serves static HTML, can execute Erlang code embedded in .yaws pages, and can run either as a standalone daemon or inside another Erlang application. The current project README requires Erlang/OTP 25.0 or newer to compile it.

What is Yaws?

The Yaws project describes it as “a webserver for dynamic content written in Erlang.” Its defining feature is that Erlang developers can use Erlang directly in dynamic pages, while also using Yaws as a conventional web server for static content. The project’s documentation presents two deployment modes: run Yaws as a standalone server, or embed it in an Erlang application.

That combination makes Yaws most relevant when an application already uses Erlang and its team wants the web server and application to share that ecosystem. It is not necessary to use embedded Erlang page code for every route: the documented feature set also includes application modules, streaming, WebSockets, uploads, and sessions. Yaws official documentation

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.

How does Yaws handle dynamic content?

HTML mixed with Erlang

A .yaws page can contain ordinary HTML alongside Erlang chunks. Each Erlang chunk provides an out/1 function. When Yaws processes the page, it calls that function and inserts the returned content into the response. The output can be ordinary HTML or structured EHTML.

The Yaws manual says compiled page chunks are cached, allowing later requests to invoke compiled modules rather than recompiling the page for every request. This page model puts Erlang logic directly in the server’s dynamic-page format, rather than relying only on an external CGI process. Yaws manual

Other application patterns

The official documentation index includes examples for several common web application needs:

  • WebSockets and AJAX/JSON RPC
  • Streaming data and server-sent events
  • File uploads and cookie-based sessions
  • Application modules, server-side includes, and embedding Yaws

These examples show what the documentation covers; they do not establish that a particular configuration is production-ready. You still need to assess security, configuration, deployment, and operational requirements for your application.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Can you embed Yaws in an Erlang application?

Yes. The project documents both standalone operation, where Yaws runs as a web-server daemon, and embedded operation within another Erlang application. Choose based on how you want to package, start, configure, and supervise the web server alongside the rest of your system. The documentation’s embedding examples are a useful starting point for the integrated approach; standalone mode may fit better when you want Yaws managed separately. Yaws official documentation

What Erlang version and tools does Yaws require?

The current Yaws project README states that Erlang/OTP 25.0 or higher is required to compile Yaws. It lists Erlang components, build tooling, and PAM development headers among the build dependencies. Generating documentation has additional TeX and Ghostscript dependencies. Check the README for the exact requirements for your operating system and chosen build route, since packages and development-header names vary by platform. Yaws project README

How do you build and start Yaws?

The README documents both an autotools build and a rebar3 route. These are project instructions, not a guarantee that a specific host has all required system packages or configuration in place.

Build from a Git checkout with autotools

The repository checkout does not include a generated ./configure script. The README says to run autoreconf -fi first, then configure the installation prefix and build:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
autoreconf -fi
./configure --prefix=/path/to/install
make

Replace /path/to/install with the intended installation location. Install the dependencies listed in the README before running the build.

Compile with rebar3

The README also documents compiling with rebar3 and starting a shell:

rebar3 compile
rebar3 shell

Its test-build example starts an HTTP service on 0.0.0.0:8000. Binding to that address exposes the service on all network interfaces available to the host, so consider network access and firewall rules when adapting the example.

Run an installed build

For an installed build, the README recommends starting Yaws interactively with its Yaws script. It also documents daemon operation with restart behavior using:

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

The README describes the default configuration as creating HTTP and HTTPS servers. Your own configuration, certificates, and deployment environment determine whether those services can start and how they should be exposed. Consult the project README for the current commands and configuration details: Yaws project README.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Is Yaws maintained, and is it faster than other servers?

The existence of a project repository does not by itself establish a maintenance commitment, support level, or release schedule. For a present-day adoption decision, check the repository’s current releases, recent activity, security guidance, and available community support directly. The documentation and README establish project features and build instructions, not a service-level support promise.

The Yaws project attributes its performance positioning to Erlang concurrency and describes each client as handled by a lightweight Erlang process. The sources cited here do not provide a comparable benchmark, throughput figure, latency distribution, or concurrency limit. That means they cannot establish that Yaws is faster than a particular alternative. A useful comparison requires equivalent versions, workloads, hardware, configuration, and measurement methods.

How does Yaws compare with Erlang/OTP Inets?

Inets is Erlang/OTP’s HTTP server and documents dynamic-content facilities including CGI and ESI. Its documentation characterizes it as providing basic web-server functionality. Yaws, by contrast, is a separate project with its own dynamic-page format, standalone and embedded modes, and documented examples for features such as WebSockets and streaming. This is a difference in project scope and documented approach, not proof that one is always the better choice. Erlang/OTP 28 Inets HTTP server documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Decision factor Yaws Inets
Dynamic content .yaws pages can run Erlang out/1 chunks; the manual says compiled chunks are cached. Official documentation describes CGI and ESI facilities.
Project positioning A dedicated Erlang web-server project with standalone and embedded modes. Erlang/OTP documentation describes basic web-server functionality.
Performance evidence in the cited sources No comparable benchmark is provided. No comparable benchmark is provided.

For a concrete choice, compare the integration model, required features, OTP and build constraints, configuration burden, operational expertise, and the project’s current maintenance and security information.

What should you learn before using Yaws?

Because Yaws is written in Erlang and its dynamic page model invokes Erlang functions, familiarity with Erlang and the OTP ecosystem will make it easier to build, extend, and troubleshoot an application. An Erlang programming book or other language-learning resource can help beginners, but buying one is not a requirement for compiling Yaws; the project README’s stated prerequisite is Erlang/OTP 25.0 or newer.

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.