Unable to host a websocket server with disabled TLS

I am trying to host a websocket server with disabled TLS, so that a client can connect to it using the “ws” prefix instead of the “wss” prefix. The Server and client perfectly well locally with disabled TLS (“ws” prefix) but I am not able to find the correct configurations for the fly.toml file to allow “ws” websocket connections.

fly.toml

# fly.toml file generated for quiet-star-6957 on 2023-03-16T18:59:11+05:30

app = "quiet-star-6957"
primary_region = "bos"

[build]
  dockerfile = "Dockerfile"

[[services]]
  internal_port = 8080
  protocol = "tcp"
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = "80"

  [[services.ports]]
    handlers = ["tls", "http"]
    port = "443"

  [[services.tcp_checks]]
    interval = 10000
    timeout = 2000

I tried removing “tls” form the handlers list in [[service.ports]] but it produced an error saying : “Error Services defined at indexes: 0 require a dedicated IP address”

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.