+ qryn + qryn

How to run qryn using Docker + ClickHouse


3 min read


If you're a user, you can start an instance of qryn in seconds using our public Docker images and seamlessly connect it to your local or remote ClickHouse.


  • account and browser access to the WebCLI

  • Any ClickHouse Service (ClickHouse Cloud, DoubleCloud, Altinity, Gigapipe)

  • Something to observe! add Logs, Metrics or Traces from anywhere

Ready? Let's get started!

Configure qryn

Configure the ENV settings to match your ClickHouse server endpoint.

flyctl secrets set CLICKHOUSE_SERVER = "your.clickhouse.server"
flyctl secrets set CLICKHOUSE_AUTH = "admin:secretpassword"
flyctl secrets set CLICKHOUSE_PROTO = "https"
flyctl secrets set CLICKHOUSE_PORT = 8443

Launch qryn

Double check your settings and deploy your qryn container.

fly launch --image qryn:latest --now

The fly launch command detects your Dockerfile and builds it.

? App Name (leave blank to use an auto-generated name):
? Select region: lax (Los Angeles, California (US))
? Would you like to deploy now? (y/N)

Choose y or run fly open to open your deployed app in a browser.

SSL/Encryption are automatically handled by the edge servers. ๐Ÿ”’

That's it! Your API instance is up and running! ๐ŸŽ‰


The system is quite boring without data. Let's insert some and start querying!

As a quick example, let's use CURL to send our first little log:

curl -X POST -H "Content-Type: application/json" \ --data '{"streams":[{"stream":{"type":"test"},"values":[["'$(date +"%s%N")'", "hello qryn"]]}]}'

๐Ÿ‘๏ธ qryn view

๐Ÿ‘๏ธ Grafana

Grafana user? No problem! qryn works using the native Loki, Tempo and Prometheus data sources available in any setup without plugins or special settings.


The free instances should handle 100s and even 1000s of inserts per second into ClickHouse but might fall short when querying very large datasets requiring memory and time-series buffering.


You can increase instance resources using the Fly Dashboard or Fly CLI.

# Give the vm 2GB of ram
fly scale memory 2048


Since qryn is completely stateless, multiple instances can be deployed in parallel across different regions and scaled to handle large amounts of traffic, split insert/read roles, partition users over the same ClickHouse cluster, etc.

Easy wasn't it? Learn more about all the project features and capabilities using the online documentation and enjoy your superlight, free qryn polyglot stack on Fly!

๐Ÿ“ Notes


If you'd rather build the fly.toml configuration yourself, here's a template:

# fly.toml file cloned from

app = "qrynjs"
primary_region = "mad"

  image = "qxip/qryn:latest"

  CLICKHOUSE_AUTH = "default:xxxxxxxxxxxx"
  CLICKHOUSE_DB = "qryn"
  HOST = ""
  PORT = 3100

  internal_port = 3100
  protocol = "tcp"
    hard_limit = 25
    soft_limit = 20

    handlers = ["http"]
    port = "80"

    handlers = ["tls", "http"]
    port = "443"

    interval = 10000
    timeout = 2000

That's it! Enjoy your free polyglot stack!

Running large scale and looking for an all-inclusive cloud solution? Try

Did you find this article valuable?

Support qryn by becoming a sponsor. Any amount is appreciated!