Skip to content

Goliworks/Quark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

A fast reverse proxy and file server for Linux written in Rust.

Features

  • Easy configuration in TOML files.
  • Automatic HTTPS configuration simply by specifying certificates in the config file.
  • Native IPv6 support (alongside IPv4) thanks to dual-stack sockets.
  • HTTP/2 by default for HTTPS connections.
  • Load balancing with support for Round Robin, Weighted Round Robin, and IP Hash algorithms.
  • Full static content serving capabilities for files, static websites, and single-page applications.

Installation and configuration

Download the latest release or build it with ./tools/build.sh, extract the archive and run ./install.sh. The server will start immediately on port 80 after installation. Then, edit /etc/quark/config.toml and restart the server with systemctl restart quark.

You can use the config.example.toml file, located in the same directory, as a template.

The server’s log files are stored in /var/log/quark/

You can remove Quark from your machine by running ./uninstall.sh.

Quick usage

Run the binary with the following command:

./quark --config /path/to/your/config_file.toml --logs /path/to/logs/directory

If you run the binary without any parameters, the server will attempt to use the default paths.

Simple configuration example

Here's a simple config.toml configuration.

[services.your_service_name]
domain = "yourservice.com"
tls.certificate = "/path/to/your/certificate.pem"
tls.key = "/path/to/your/key.pem"

[[services.your_service_name.locations]]
source = "/*"
target = "http://192.168.0.10:8888"

It will start a server on :80 and :443 ports.

Warning

Quark is still in early development. The .toml config options might change in future releases, so if you’re using the server as-is, keep an eye on the README and example config in upcoming versions to catch any breaking changes.

Docker deployment

The latest release includes minimal Docker configuration files for containerized deployment. You are free to adapt them to your needs or use them as is.

Quick start

# With inline variables
HTTP_PORT=8080 HTTPS_PORT=8443 CONFIG_PATH=/etc/quark LOGS_PATH=/var/log/quark docker compose up -d

# With a custom .env file
docker compose --env-file .env.custom up -d

Environment variables

  • HTTP_PORT / HTTPS_PORT - Port mappings (default: 8080/8443)
  • CONFIG_PATH - Configuration directory (default: /etc/quark)
  • CONFIG_FILE - Config filename (default: config.toml)
  • LOGS_PATH - Logs directory (default: /var/log/quark)
  • STATIC_PATH - Static files directory (default: /var/www)
  • TLS_PATH - TLS certificates directory (default: /etc/ssl)

Logs are available in your mounted LOGS_PATH directory.

Build

The project can be built using the conventional Cargo workflow or the provided build.sh helper script, which also packages the binary into a tar.gz archive.

Standard Cargo Build

cargo build --release

This compiles the project for the host architecture using the default Rust toolchain. The resulting binary is placed in target/release/quark

Using the Build Script

A convenience script, ./tools/build.sh, is provided to compile and package Quark into a .tar.gz archive. By default, it builds for the x86_64 architecture using musl and the default cargo compiler.

You can customize the build process using the following command-line arguments:

Argument Description Options
--target Target CPU architecture x86_64 (default) or aarch64
--libc C standard library to link against musl (default) or gnu
--compiler Build tool to invoke cargo (default) or cross

Examples

Default build for x86_64 with musl using Cargo:

./tools/build.sh

Build for ARM64 (aarch64) with GNU libc using Cross:

./tools/build.sh --target=aarch64 --libc=gnu --compiler=cross

Output

After a successful run, the script creates a compressed archive inside a ./dist directory at the project root.
The archive follows the naming convention:

quark-<VERSION>-<ARCHITECTURE>-linux.tar.gz
  • <VERSION> – the version string defined in the project (e.g., 1.2.3).
  • <ARCHITECTURE> – the target architecture you built for (x86_64 or aarch64).

The archive contains:

  • The compiled quark binary.
  • The example configuration file (config.example.toml)
  • Any additional assets required for installation and deployment.

Minimum Supported Rust Version

The current MSRV is 1.85.

License

Quark is provided under the MIT license. See LICENSE.