diff --git a/cachix-api.cabal b/cachix-api.cabal
--- a/cachix-api.cabal
+++ b/cachix-api.cabal
@@ -1,6 +1,6 @@
 cabal-version:   2.2
 name:            cachix-api
-version:         1.12.1
+version:         1.13.0
 synopsis:        Servant HTTP API specification for https://cachix.org
 homepage:        https://github.com/cachix/cachix#readme
 bug-reports:     https://github.com/cachix/cachix/issues
@@ -20,6 +20,14 @@
   location: https://github.com/cachix/cachix
   subdir:   cachix-api
 
+flag ram
+  description:
+    Use ram instead of memory for Data.ByteArray, matching crypton >= 1.1.
+    The solver picks this automatically.
+
+  default:     True
+  manual:      False
+
 common defaults
   build-depends:      base >=4.7 && <5
   default-extensions:
@@ -91,12 +99,10 @@
     , async
     , bytestring
     , conduit               >=1.3.0
-    , crypton
     , deriving-aeson
     , exceptions
     , http-media
     , jose
-    , memory
     , nix-narinfo
     , protolude
     , resourcet
@@ -110,6 +116,16 @@
     , unordered-containers
     , uuid
     , websockets
+
+  if flag(ram)
+    build-depends:
+      , crypton  >=1.1
+      , ram
+
+  else
+    build-depends:
+      , crypton  <1.1
+      , memory
 
 test-suite cachix-api-test
   import:             defaults
