Skip to content

Proxy Server Setup

The proxy server binary (proxy.flexfs) is included in the flexFS Enterprise installation. It is typically deployed via the admin server’s deploy endpoint or the manage.flexfs tool.

If the proxy server needs static block storage credentials (access key and secret), initialize them before starting:

Terminal window
proxy.flexfs init creds \
--blockUser $USERNAME \
--blockPass $PASSWORD

This writes a TOML credentials file to the default location (~/.flexfs/proxy/creds):

blockPass = "$PASSWORD"
blockUser = "$USERNAME"

init creds flags:

FlagTypeDefaultDescription
--blockPassstring(empty)Block storage password / secret key
--blockUserstring(empty)Block storage username / access key ID
--forceboolfalseOverwrite an existing credentials file
Terminal window
sudo proxy.flexfs init systemd --now

This creates and enables a systemd unit at /etc/systemd/system/flexfs-proxy.service and optionally starts it immediately.

To pass additional flags to the proxy server at startup:

Terminal window
sudo proxy.flexfs init systemd --now \
--startFlags "--diskFolder /data/proxy-cache --diskQuota 500G"

init systemd flags:

FlagTypeDefaultDescription
--forceboolfalseOverwrite an existing systemd unit file
--nowboolfalseStart the service immediately after enabling
--startFlagsstring(empty)Additional flags passed to proxy.flexfs start

The proxy.flexfs start command accepts the following flags:

FlagTypeDefaultDescription
--bindAddrstring0.0.0.0:443Address and port to bind the HTTPS server
--dbFolderstring~/.flexfs/proxy/dataCache database folder path
--diskFolderstring/cacheOn-disk block cache folder path
--diskQuotastring95%Maximum disk usage for the block cache (e.g. 5%, 64M, 500G). Must be greater than zero.
--noSSLboolfalseDisable TLS for the REST API
--sslCertstring~/.flexfs/ssl/certPath to the TLS certificate file
--sslKeystring~/.flexfs/ssl/keyPath to the TLS private key file
--syncboolfalseFsync dirty block writes for full crash durability
--verbose / -vboolfalseEnable verbose logging
FlagTypeDefaultDescription
--blockPassstring(from creds)Block storage password (overrides credentials file)
--blockUserstring(from creds)Block storage username (overrides credentials file)
--bufferSizeuint321048576I/O buffer size in bytes
--dbMemCapacitystring10%Memory allocated to the cache database index (e.g. 5%, 64M)
--maxBopsuint32autoMaximum number of active parallel block operations
--noWritebackboolfalseDisable writeback to persistent object storage
--pprofboolfalseEnable the Go pprof profiler
--pprofPortint6064Pprof server port
--sseboolfalseEnable S3 server-side encryption (AES256) on writes
--writebackActiveuint32autoMaximum number of active parallel writeback operations (default: maxBops)
--writebackDelayuint320Milliseconds to sleep between writeback operations

By default, the proxy server auto-generates a self-signed TLS certificate if none exists at the configured paths. To use custom certificates:

Terminal window
proxy.flexfs start \
--sslCert /etc/ssl/proxy.crt \
--sslKey /etc/ssl/proxy.key

For testing or internal networks, --noSSL disables TLS entirely.

After starting, the proxy server logs its configuration:

proxy.flexfs | v1.9.0
--------------------------------------------------------------------------------
bindAddr | 0.0.0.0:443
diskFolder | /cache
diskQuota | 95% (475.00 GiB)
sslCert | ~/.flexfs/ssl/cert
sslKey | ~/.flexfs/ssl/key
--------------------------------------------------------------------------------
Binding to 0.0.0.0:443 (encrypted)

The server is ready to accept block requests from mount clients once the bind message appears.