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
--blockUserstring(empty)Block storage username / access key ID
--blockPassstring(empty)Block storage password / secret key
--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
--nowboolfalseStart the service immediately after enabling
--startFlagsstring(empty)Additional flags passed to proxy.flexfs start
--forceboolfalseOverwrite an existing systemd unit file

The proxy.flexfs start command accepts the following flags:

FlagTypeDefaultDescription
--bindAddrstring0.0.0.0:443Address and port to bind the HTTPS server
--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
--dbFolderstring~/.flexfs/proxy/dataCache database folder path
--syncboolfalseFsync dirty block writes for full crash durability
--verbose / -vboolfalseEnable verbose logging
FlagTypeDefaultDescription
--blockUserstring(from creds)Block storage username (overrides credentials file)
--blockPassstring(from creds)Block storage password (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
--writebackActiveuint32autoMaximum number of active parallel writeback operations (default: maxBops)
--writebackDelayuint320Milliseconds to sleep between writeback operations
--sseboolfalseEnable S3 server-side encryption (AES256) on writes
--pprofboolfalseEnable the Go pprof profiler (port 6064)

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.