Securing KeyDB?

I’ve used KeyDB - Launch on Fly.io · Fly to create a KeyDB instance. How can I update this instance so that it is only accessible via the .internal domain and not accessible via {name}.fly.dev?

According to this Early look: PostgreSQL on Fly. We want your opinions. - #56 by kurt. You could download the app’s configuration and edit it. I imagine it would look something like this:

app = "keydb-example"

[experimental]
private_network = true

[mount]
source = "keydb_server"
destination = "/data"


[[services]]
  internal_port = 6379
  protocol = "tcp"

  [[services.ports]]
    handlers = []
    port = "10000"


[[services.script_checks]]
  interval = 5000
  timeout = 1000
  command = "/fly/check_ready.sh"
  restart_limit = 0

[[services.script_checks]]
  interval = 5000
  timeout = 1000
  command = "/fly/check_replicas.sh"
  restart_limit = 0

Remove the [[services.ports]] section and redeploy it. Then you have to manually deallocate the IP addresses with flyctl ips release. Anyways that’s what I did for one of a Redis deployment of mine.

2 Likes

This is the correct answer! For KeyDB, you can just clone this repository, change fly.toml and run flyctl deploy: GitHub - fly-apps/keydb: KeyDB server on Fly