---
title: Install h2static on Linux | Snap Store
description: Get the latest version of h2static for Linux - Tiny static web server
  with TLS and HTTP/2 support
url: https://snapcraft.io/h2static
---

# h2static

[Alberto Donato (ack)](https://snapcraft.io/publisher/ack "View all snaps from Alberto Donato (ack)")

* [Alberto Donato (ack)](https://snapcraft.io/publisher/ack "View all snaps from Alberto Donato (ack)")
* [Server and Cloud](https://snapcraft.io/search?categories=server-and-cloud)

latest/stable 2.4.8

Install latest/stable of h2static

This channel hasn't been updated in a while. It might be unmaintained and have stability or security issues.

---

**Install using the command line**

```
sudo snap install h2static
```

Don't have snapd? [Get set up for snaps](https://snapcraft.io/docs/installing-snapd).

---

### Package name

* h2static

---

### License

* EUPL-1.2

---

### Last updated

* 11 January 2024 - latest/stable
* 4 October 2026 - latest/edge

---

### Websites

* [github.com/albertodonato/h2static](https://github.com/albertodonato/h2static "https://github.com/albertodonato/h2static")

---

### Contact

* [github.com/albertodonato/h2static/issues](https://github.com/albertodonato/h2static/issues "https://github.com/albertodonato/h2static/issues")

---

### Source code

* [github.com/albertodonato/h2static](https://github.com/albertodonato/h2static "https://github.com/albertodonato/h2static")

---

### Report a bug

* [github.com/albertodonato/h2static/issues](https://github.com/albertodonato/h2static/issues "https://github.com/albertodonato/h2static/issues")

---

##### Report a Snap Store violation

* [Report this Snap](https://snapcraft.io/h2static#report-snap-modal)

---

* [Description](https://snapcraft.io/h2static#tab-description)
* [Security](https://snapcraft.io/h2static#tab-security)

#### Tiny static web server with TLS and HTTP/2 support

Static web server using the builtin Go http library.

It supports HTTP/2 and TLS.

This snap provides both an `h2static` command that can be run by any user,
with access to the user home directory, and a system-wide daemon service.

The service can be configured with the following options (via `snap set`):

* `allow-outside-symlinks`

  allow access to symlinks whose target is outside of the `serve-path`. This
  is disabled by default since it might be a security issue.
* `basic-auth`

  content of the crednetials file for Basic Authorization. Each line should
  contain colon-separated pair of username and SHA512 hash of the password.
* `disable-h2`

  set to true to disable HTTP/2 support.
* `disable-index`

  set to true to disable directory index.
* `disable-lookup-with-suffix`

  set to true to disable disable matching files with .htm(l) suffix for paths
  without suffix.
* `listen`

  the `address:port` for the service to listen on. The address can be omitted
  (e.g. `:8080`) to bind all addresses.

  If this option empty or null, the service will not be started.
* `request-path-prefix`

  a path prefix to be stripped for the request. This is mostly useful in the
  case where the server is behind a reverse proxy with a prefix set.
* `serve-path`

  the directory to serve content from. it's set to `$SNAP_COMMON` if not
  specified.

  If the `removable-media` interface is connected, paths under `/media` can
  also be used.
* `show-dotfiles`

  set to true to show hidden files (starting with a dot).
* `tls.cert`, `tls.key`

  ASCII contents of the TLS certificate and key. If both are set, HTTPS
  support will be enabled.

---

## Install h2static on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the [installing snapd documentation](https://snapcraft.io/docs/installing-snapd).

[### Arch Linux](https://snapcraft.io/install/h2static/arch)

[### CentOS](https://snapcraft.io/install/h2static/centos)

[### Debian](https://snapcraft.io/install/h2static/debian)

[### elementary OS](https://snapcraft.io/install/h2static/elementary)

[### Fedora](https://snapcraft.io/install/h2static/fedora)

[### KDE Neon](https://snapcraft.io/install/h2static/kde-neon)

[### Kubuntu](https://snapcraft.io/install/h2static/kubuntu)

[### Manjaro](https://snapcraft.io/install/h2static/manjaro)

[### Pop!\_OS](https://snapcraft.io/install/h2static/pop)

[### openSUSE](https://snapcraft.io/install/h2static/opensuse)

[### Red Hat Enterprise Linux](https://snapcraft.io/install/h2static/rhel)

[### Ubuntu](https://snapcraft.io/install/h2static/ubuntu)

[### Raspberry Pi](https://snapcraft.io/install/h2static/raspbian)
