Deploying a ScyllaDB App
Introduction
ScyllaDB is a high-performance, Cassandra-compatible NoSQL database. Deploying ScyllaDB with a Dockerfile on Klutch.sh provides reproducible builds, managed secrets, and persistent storage—all configured from klutch.sh/app. This guide focuses on a single-node deployment using one TCP app for the CQL port.
Prerequisites
- A Klutch.sh account (sign up)
- A GitHub repository containing your ScyllaDB Dockerfile (GitHub is the only supported git source)
- A CQL client (e.g.,
cqlsh) to test connectivity
For onboarding, see the Quick Start.
Architecture and ports
- Klutch.sh allows one port per app. Expose ScyllaDB’s CQL TCP port only:
- CQL: TCP traffic on internal port
9042; clients connect viaexample-app.klutch.sh:8000(Klutch TCP external) mapped to internal9042.
- CQL: TCP traffic on internal port
- This guide uses a single-node setup; clustering requires additional ports and is not covered here due to single-port routing.
Repository layout
scylladb/├── Dockerfile # Must be at repo root for auto-detection└── README.mdKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Build and run locally:
docker build -t scylla-local .docker run -p 9042:9042 \ -e SCYLLA_CLUSTER_NAME=klutch-scylla \ -e SCYLLA_SEEDS=127.0.0.1 \ scylla-local --smp 1 --memory 1G --overprovisioned 1Dockerfile for ScyllaDB (production-ready)
Place this at the repo root; Klutch.sh auto-detects Dockerfiles.
FROM scylladb/scylla:latest
EXPOSE 9042
# Run with conservative defaults for single-node in constrained environmentsCMD ["--smp", "1", "--memory", "1G", "--overprovisioned", "1"]Notes:
- Pin to a specific tag (e.g.,
scylladb/scylla:5.4) for stability. - Adjust
--memoryand--smpto match your plan’s resources.
Environment variables (Klutch.sh)
Common settings:
SCYLLA_CLUSTER_NAME=klutch-scyllaSCYLLA_SEEDS=127.0.0.1(single-node)- Optional:
SCYLLA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
If deploying without the Dockerfile and relying on Nixpacks:
NIXPACKS_START_CMD=./scylla --smp 1 --memory 1G --overprovisioned 1
Attach persistent volumes
Add storage in Klutch.sh (path and size only):
/var/lib/scylla— data files and commit logs.
Ensure the path is writable inside the container.
Deploy ScyllaDB on Klutch.sh (Dockerfile workflow)
- Push your repository—with the Dockerfile at the root—to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Select TCP traffic and set the internal port to
9042. - Add environment variables (cluster name, seeds) as needed.
- Attach a volume at
/var/lib/scyllasized for your data. - Deploy. Connect with a CQL client at
example-app.klutch.sh:8000.
Sample CQL usage
Create a keyspace and table:
CREATE KEYSPACE IF NOT EXISTS demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};USE demo;CREATE TABLE IF NOT EXISTS users (id uuid PRIMARY KEY, name text);INSERT INTO users (id, name) VALUES (uuid(), 'Alice');SELECT * FROM users;Run these statements via cqlsh example-app.klutch.sh 8000.
Health checks and production tips
- Use
nodetool status(from a maintenance pod/host) to verify node health. - Keep single-node constraints in mind; clustering requires additional ports not exposed here.
- Pin image versions and test upgrades in staging before production.
- Monitor volume usage on
/var/lib/scylla; resize before hitting capacity.
ScyllaDB on Klutch.sh delivers a reproducible single-node setup with managed secrets and persistent storage—without extra YAML or CI steps. Configure the TCP port, attach storage, and connect your clients over CQL to start serving data.