An HTTP frontend for Redis-compatible services.


  • Supports HTTP, HTTP/2, and Websockets
  • Automatic Let’s Encrypt certificates and host binding
  • Flexible access-control list for HTTP clients
  • Returns the raw RESP outputs
  • Works with Redis-compatible services like Tile38, Redcon, KeyDB, Uhaha, etc.

Build and Run

./rfront --config config.json


A config.json file is always required.

Configuration properties

  • hosts: Array of publically accessible https hosts.
  • port: Server port. Used for non-TLS http hosting.
  • cluster.addrs: Array of Redis server addresses.
  • cluster.auth: For authorizing the connection to the Redis servers.
  • acl.tokens: Array of tokens for authorizing http clients for the current policy.
  • acl.access: Default access for commands sent by http clients.
    • allow: Allow all incoming commands.
    • disallow: Deny all incoming commands.
  • acl.except: Array of commands that are exceptions to acl.access.

Automatic updates

Changes to the acl and cluster properties of the config.json file will automatically be picked up by the running server, and do not require a server restart.

Configuration Examples

Bind the Redis server at to http://localhost:8000 and allow all commands from all clients, except for the SHUTDOWN command.

    "port": 8000,
    "cluster": {
        "addrs": [ "" ],
        "auth": ""
    "acl": [
            "tokens": [ "" ],
            "access": "allow",
            "except": [ "shutdown" ]

Bind the Redis cluster at, to https://example.com and use the Redis AUTH my-redis-auth. This config includes two client tokens where one only allows the read-only commands ping, get, and scan. While the other also allows for the write commands set and del.

    "hosts": [ "example.com" ],
    "cluster": {
        "addrs": [ "", "" ],
        "auth": "my-redis-auth"
    "acl": [
            "tokens": [ "reader-client-token" ],
            "access": "disallow",
            "except": [ "ping", "get", "scan" ]
        }, {
            "tokens": [ "writer-client-token" ],
            "access": "disallow",
            "except": [ "ping", "get", "scan", "set", "del" ]


HTTP Client Examples

Let’s say you are using the first configuration above.

Here’s a client connecting over websockets using the wscat client.

$ wscat -c ws://localhost:8000
connected (press CTRL+C to quit)
> ping

> set hello world
< +OK

> get hello
< $5


Notice that the responses are in the RESP format.

If you want to send HTTP requests:

$ curl 'http://localhost:8000?cmd=ping'
$ curl 'http://localhost:8000?cmd=set+hello+world'
$ curl 'http://localhost:8000?cmd=get+hello'

Finally if you require an ACL client token, as in the last configuration above, you can use the token querystring key such as:

$ wscat -c wss://example.com?token=reader-client-token
$ curl 'https://example.com?token=reader-client-token'

Or, you can provide the HTTP header Authorization: Token reader-client-token


View Github