temetro is in beta and under active development. Expect things to change.
temetro

Deploying the relay

Put temetro online so patients can scan to connect from anywhere — with simple, click-by-click steps for Render, Railway, or Fly.io.

When a patient taps Scan to connect, their phone talks to your temetro server. For that to work when the phone is not on your clinic's Wi-Fi (for example, on mobile data), your server needs to be on the internet with its own web address (a URL like https://yourclinic.onrender.com).

This page shows how to do that. You don't need to be a developer — pick one of the hosts below and follow the steps.

Just want to try it on your own phone first?

You don't have to put anything online to test. There are two ways to run temetro with Docker — the difference is whether phones on other networks (mobile data) can scan:

Command (run inside the backend folder)What runsCan a phone on mobile data scan?
docker compose up --buildThe full app (database, server, staff web app) on your computerNo — the phone must be on the same Wi-Fi
npm run docker:tunnelThe same full app plus a temporary public web addressYes — works from any network

So for off-network testing, use npm run docker:tunnel. It creates a temporary public address automatically and wires it into the QR; the address disappears when you stop it. (Both need Docker installed.)

Give it a few seconds

After npm run docker:tunnel, wait until the logs print “Wallet relay reachable via Cloudflare tunnel: https://…” before generating the QR — that line means the public address is live (it takes ~10–30 seconds). Then scan with your phone on mobile data. See Import from a patient app.

What "putting it online" means

Two things get created:

  1. A server — a copy of temetro running on a host (a company that runs computers for you), with a public web address.
  2. A database — where your clinic's data is stored.

The hosts below set up both for you. After it's running, you fill in three web addresses so temetro knows how to reach itself and your staff app. That's the whole job.

The three addresses you'll paste in (we'll remind you below)

  • PUBLIC_RELAY_URL — your new server's address. This is the one that makes phone scanning work, so it must be the real public address (the host gives it to you), not localhost.
  • BETTER_AUTH_URL — the same address as above.
  • FRONTEND_URL — the address where your staff use the temetro web app.

Option 1 — Render (most beginner-friendly, all clicks)

  1. Create a free account at render.com and connect your GitHub.
  2. Click New → Blueprint and choose the temetro repository. Render reads the included backend/render.yaml and offers to create the server + database together — click Apply. (If it asks for a "Root Directory", enter backend.)
  3. Wait for it to finish (a few minutes). Render shows your server's address at the top — something like https://temetro-backend.onrender.com. Copy it.
  4. Open the service's Environment tab and set:
    • PUBLIC_RELAY_URL → the address you just copied
    • BETTER_AUTH_URL → the same address
    • FRONTEND_URL → the address of your staff web app
  5. Click Save changes — Render restarts automatically. Done.

Option 2 — Railway (also click-based)

  1. Create an account at railway.app and connect GitHub.
  2. New Project → Deploy from GitHub repo, pick the temetro repo. In the service settings, set Root Directory to backend (Railway uses the included backend/railway.json).
  3. In the project, click + New → Database → Postgres. Then open your backend service → Variables and add DATABASE_URL with the value ${{Postgres.DATABASE_URL}}.
  4. In the service's Settings → Networking, click Generate Domain to get your public address (like https://temetro.up.railway.app). Copy it.
  5. Back in Variables, set PUBLIC_RELAY_URL and BETTER_AUTH_URL to that address, and FRONTEND_URL to your staff web app's address. Railway redeploys. Done.

Option 3 — Fly.io (uses a terminal)

If you're comfortable with a command line, Fly works from the backend folder using the included fly.toml:

fly launch --no-deploy --copy-config        # pick an app name + region
fly volumes create temetro_data --size 1    # keeps your data between updates
fly postgres create
fly postgres attach <postgres-app-name>      # connects the database
fly secrets set \
  PUBLIC_RELAY_URL=https://<your-app>.fly.dev \
  BETTER_AUTH_URL=https://<your-app>.fly.dev \
  FRONTEND_URL=https://<your-staff-app>
fly deploy

Check that it worked

  1. Open your new server address with /health on the end (e.g. https://temetro-backend.onrender.com/health) in a browser — you should see a small "ok" response, not an error page.
  2. In the temetro web app, go to Patients → Import from a patient app → QR → Generate QR, and have someone scan it on mobile data. The record should come through.

If scanning still doesn't work

Almost always it's the PUBLIC_RELAY_URL. It must be your server's real public address starting with https:// — not localhost and not a 192.168.x.x Wi-Fi address. Double-check it matches the address the host gave you, then restart/redeploy.

For developers

All three hosts build the backend's production Dockerfile, which auto-generates secrets and runs database migrations on start. The full variable contract is DATABASE_URL, PUBLIC_RELAY_URL, BETTER_AUTH_URL, FRONTEND_URL (plus optional BETTER_AUTH_SECRET / AI_CREDENTIALS_KEY — the entrypoint generates them if unset). Behind a TLS proxy the backend honors x-forwarded-proto, so a derived URL is https. The same contract works on any Docker host. Config files: backend/render.yaml, backend/railway.json, backend/fly.toml.

On this page