Deploy DataLens | (Just Updated) Open-Source BI and Dashboards, Looker Studio Alternative, Sign-up Closed

DataLens open-source BI and dashboards, Looker Studio alternative

Deploy DataLens | (Just Updated) Open-Source BI and Dashboards, Looker Studio Alternative, Sign-up Closed

Deploy and Host DataLens on Railway

Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the admin password, the master tokens, the database password and a fresh set of signing keys are generated, the admin account exists before the site is reachable, and public sign-up is closed. DataLens is open-source business intelligence from Yandex: dashboards, charts, datasets and connections to ClickHouse, PostgreSQL, MySQL and more, a self-hosted alternative to Looker Studio, Metabase and Tableau.

About Hosting DataLens

This template runs nine services from the DataLens 2.9.0 component images, each pinned by digest in a thin wrapper. ui owns the one public domain (port 8080, HTTP healthcheck at /ping) and serves the web app and the /gateway API. Behind it, all private: ui-api (the web back end), us (the united storage: workbooks, datasets, charts and dashboards), auth (accounts and sessions), control-api and data-api (dataset and chart queries), meta-manager, temporal (the background workflow engine), and db, PostgreSQL 16 with the seven DataLens databases and a volume at /var/lib/postgresql.

What the wrapper fixes. Upstream's compose file ships the same RSA signing keys, master tokens and crypto key in every install and leaves sign-up open. The db wrapper generates a fresh key set on first boot, keeps it on its volume, and serves it to the other services over Railway's private network behind a secret path; every service fetches its share before starting. Sign-up is off, and the admin account takes its password from the generated AUTH_ADMIN_PASSWORD. Redeploys keep the keys, the accounts and every workbook.

Using it. Open your domain and sign in as admin with AUTH_ADMIN_PASSWORD (a variable of the auth service). An agent signs in through the API, keeps the session cookie, and calls /gateway/root/us/* with it. First start migrates seven databases and takes several minutes; connect your own data sources from the Connections page.

Agent contract

  • Public URL: https://RAILWAY_PUBLIC_DOMAIN (the generated domain of the ui service)
  • Private URL: http://ui.railway.internal:8080
  • Credentials: the variable AUTH_ADMIN_PASSWORD on the auth service (plain text, login admin); US_MASTER_TOKEN and AUTH_MASTER_TOKEN on the db service are internal service tokens, not for clients
  • Auth: POST /gateway/auth/auth/signin with JSON {"login":"admin","password":"AUTH_ADMIN_PASSWORD"} answers 200 and sets the session cookies; send them back (curl -b) on every other call; calls without them answer 401
  • Health: GET /ping returns 200 without credentials
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN (variable of the ui service), AUTH_ADMIN_PASSWORD (variable of the auth service); also curl.
R="https://$RAILWAY_PUBLIC_DOMAIN"; H="content-type: application/json"; JAR=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/ping")" = 200 ]; do n=$((n+1)); [ "$n" -le 180 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/ping"
# sign-up is closed: a stranger cannot create an account
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "$H" -d '{"login":"stranger","email":"stranger@example.com","password":"x-stranger-1"}' "$R/gateway/auth/auth/signup"
# sign in as the generated admin; the session cookie goes in the jar
curl -s -c "$JAR" -o /dev/null -w "signin: %{http_code}\n" -H "$H" -d "{\"login\":\"admin\",\"password\":\"$AUTH_ADMIN_PASSWORD\"}" "$R/gateway/auth/auth/signin"
curl -s -o /dev/null -w "signin wrong password: %{http_code}\n" -H "$H" -d '{"login":"admin","password":"x-wrong-1"}' "$R/gateway/auth/auth/signin"
# write-auth: creating a workbook needs the session; without it the answer is 401
curl -s -b "$JAR" -o /dev/null -w "read with key: %{http_code}\n" -H "$H" -d '{}' "$R/gateway/root/us/getWorkbooksList"
curl -s -b "$JAR" -o /dev/null -w "write with key: %{http_code}\n" -H "$H" -d "{\"title\":\"agent-$$\"}" "$R/gateway/root/us/createWorkbook"
curl -s -o /dev/null -w "read without key: %{http_code}\n" -H "$H" -d '{}' "$R/gateway/root/us/getWorkbooksList"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$H" -d "{\"title\":\"agent-$$\"}" "$R/gateway/root/us/createWorkbook"
rm -f "$JAR"

Expected output against a fresh deploy:

health: 200
public signup: 403
signin: 200
signin wrong password: 403
read with key: 200
write with key: 200
read without key: 401
write without key: 401

The refusals are the contract: a request without the session is refused (write without key: 401), a stranger cannot register (public signup: 403) and a wrong password is refused (signin wrong password: 403).

Why Deploy DataLens on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying DataLens on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

  • Agent-ready - no deployer fields, a contract block, and one script that proves the app is healthy, strangers cannot register, the generated admin signs in and writes are refused without a session.
  • Fresh keys per deploy - the signing keys and master tokens are generated for you, not the public ones from upstream's compose file.
  • Admin included - the admin account has a generated password before the site is reachable.
  • Data survives redeploys - the DataLens databases and the key set live on one PostgreSQL volume.
  • Pinned - every component image is pinned by digest, and the wrappers by tag and digest.

Common Use Cases

  • Self-hosted BI dashboards - charts and dashboards over your own databases without a Looker Studio or Tableau subscription.
  • Product and analytics reporting - connect ClickHouse, PostgreSQL or MySQL and share dashboards with a team.
  • Embedded analytics - build datasets once and serve them to many viewers.
  • BI driven by an AI agent - sign in through the API and create workbooks, datasets and charts.

Dependencies for DataLens Hosting

  • Nine services created by the template: ui, ui-api, us, auth, control-api, data-api, meta-manager, temporal and db, with one volume on db.

Deployment Dependencies


Template Content

More templates in this category

View Template
Plausible WordPress
Cookie-free WordPress stats from your own Plausible

onepush
0
View Template
Typesense Multilingual
Locale-aware multilingual search with Typesense

onepush
0
View Template
Formbricks
Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Two Workspaces
3