Deploying a ZincSearch App
Introduction
ZincSearch is a lightweight Elasticsearch alternative with a simple API and built-in UI. This guide shows how to containerize ZincSearch with a Dockerfile, configure credentials, persist indexes, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM public.ecr.aws/zinclabs/zincsearch:latest
# Default ZincSearch portENV PORT=4080EXPOSE 4080Required environment variables
ZINC_FIRST_ADMIN_USER– admin usernameZINC_FIRST_ADMIN_PASSWORD– admin passwordZINC_DATA_PATH=/dataPORT=4080– internal port
Optional environment variables
ZINC_SERVER_ADDRESS=0.0.0.0ZINC_TELEMETRY=falseZINC_LOG_LEVEL=info
Persistence
Persist indexes and configuration:
- Mount path:
/data - Size: based on expected index size and retention
Networking
- Protocol: HTTP
- Internal port:
4080 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port4080inside the container.
Health check (recommended)
curl -I http://localhost:4080/healthzDeployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
4080. - Add environment variables for
ZINC_FIRST_ADMIN_USER,ZINC_FIRST_ADMIN_PASSWORD, and data path. Mark secrets as sensitive. - Attach a persistent volume at
/datasized for your indexes. - Deploy. After the app starts, log in to the UI with your admin credentials and create your first index.
Verification
-
UI: open
https://example-app.klutch.shand confirm the ZincSearch dashboard loads. -
Health:
Terminal window curl https://example-app.klutch.sh/healthz
Next steps
- Secure access with strong credentials and restrict exposure to trusted clients.
- Configure index retention and backups for the
/datavolume. - Integrate your applications using the ZincSearch API to ingest and query logs or documents.