A basic web server for single-file
  • Rust 66.3%
  • Nix 33.7%
Find a file
2025-06-25 01:17:35 +02:00
.forgejo/workflows init 2025-06-24 19:18:18 +02:00
src listenfd support 2025-06-25 01:17:35 +02:00
.envrc init 2025-06-24 19:18:18 +02:00
.gitignore initial version 2025-06-24 22:07:08 +02:00
Cargo.lock listenfd support 2025-06-25 01:17:35 +02:00
Cargo.toml listenfd support 2025-06-25 01:17:35 +02:00
flake.lock init 2025-06-24 19:18:18 +02:00
flake.nix initial version 2025-06-24 22:07:08 +02:00
README.md listenfd support 2025-06-25 01:17:35 +02:00

single-file-server

A basic web server for single-file

Configuring

[listen]
# by default the server listens over tcp
# address = "0.0.0.0" # defaults to "127.0.0.1"
# port = 1234 # defaults to 7366
# you can set it to listen over a unix socket instead.
socket = "/run/single-file.sock"

[single-file]
# path to single-file-cli
executable = "/path/to/single-file" # defaults to "single-file"

[browser]
# path to the browser used by single-file
executable = "/path/to/chome" # defaults to "chromium"

In additional to the listen configuration, the server will automatically detect if it get's activated trough systemd socket activation and takes the provided socket.

Usage

single-file-server --config config.toml

If no config is provided, then an all-default config will be used.

You can then request the single page version of a website by requesting <listening address>/fetch/<encoded url>.