Deploy Open Wearables

One self-hosted API for wearable health data, with sync jobs and MCP.

Deploy Open Wearables

Just deployed

/data

Just deployed

Just deployed

Just deployed

/var/lib/postgresql/data

Just deployed

Just deployed

Deploy and Host Open Wearables on Railway

Open Wearables logo

Open Wearables gives developers one REST API for wearable health data instead of a separate integration for every device brand. It is MIT-licensed, built with FastAPI, Celery and SvelteKit, and maintained by Momentum. Connect Garmin, Oura, Whoop, Polar, Suunto, Strava, Withings, Ultrahuman and Google Health through OAuth, add Apple Health, Health Connect and Samsung Health through the mobile SDKs, and read everything back in one schema. A built-in MCP server lets AI assistants query the same data. This template deploys the complete platform on Railway, with the API on its own domain, the developer portal, background sync workers, a task monitor, PostgreSQL and Redis. Aggregator APIs charge $300–499/month before usage. Running it yourself costs about $15–30/month, with no per-user fees.


What This Template Deploys

ServicePurpose
backendFastAPI API on port 8000 with a public domain. Runs migrations and seeds provider settings on start, then serves the REST API, OAuth callbacks, webhooks and docs at /docs.
frontendThe developer portal, built from /frontend, on its own public domain.
celery-workerExecutes sync, import and webhook jobs (scripts/start/worker.sh).
celery-beatFires scheduled syncs (scripts/start/beat.sh).
celery-flowerCelery's web dashboard for queued, running and failed tasks, with a public domain.
PostgresPostgreSQL 17 with SSL and a volume, database open-wearables.
RedisRedis 8.2.1 with a password and a volume. The Celery broker.

The four Python services build from /backend in the the-momentum/open-wearables repository, each with its own start script. Credentials, the secret key and public URLs are connected with Railway references.


About Hosting Open Wearables

Health apps want data from the devices their users already wear. Each brand has its own developer program, OAuth scopes, payload shapes and rate limits, and keeping five integrations healthy is a job in itself. Open Wearables does that integration work once, as open software, and stores the results in your own Postgres.

How a sync works. Your app sends the user a connection link. They approve access with their provider, the backend stores the encrypted tokens, and beat schedules regular pulls. The worker fetches new data, normalizes it into sleep, activity, workouts, heart rate, HRV, SpO2 and body metrics, and can push a webhook to your app when it lands.

Startup does the setup. On every deploy the backend applies database migrations, creates the database it needs for outgoing webhooks, and seeds provider and device priority tables, so a fresh install is ready without manual SQL.

Before your first deploy. ADMIN_EMAIL and ADMIN_PASSWORD on the backend are required. Production mode refuses the default password, and the values are only used to create the first admin.

Flower is public by default. The task dashboard has its own domain and no login. Remove that domain in Railway, or keep it only while debugging, so job details aren't exposed.

Typical cost: ~$15–30/month on Railway for seven services at small scale. Terra's Quick Start is from $499/month and Junction's Launch plan is $300/month.


Deploy Open Wearables in Under 10 Minutes

  1. Fill in ADMIN_EMAIL and ADMIN_PASSWORD on the backend service when Railway asks for them.
  2. Click Deploy on Railway and wait for the first builds to finish (several minutes).
  3. Open the frontend domain and sign in with that admin account.
  4. Create an API key, then add a provider's client ID and secret in the portal's provider settings.
  5. Send yourself a connection link, connect a device, and call the API from the backend's /docs page.

After that, syncs run on their own and new data arrives through the API or webhooks.


Common Use Cases

  • Add wearables to an existing app. Ship Garmin, Oura and Apple Health support with one integration.
  • AI health and coaching agents. Give an assistant tools to read sleep, recovery and training data through MCP.
  • Clinical and academic studies. Gather participant data from mixed devices into one database you control.
  • Personal training platforms. Show each client's workouts and recovery, whatever they wear.
  • Insurance and wellness programs. Collect activity data across brands with consistent fields.
  • Migrating off a paid aggregator. Swap per-user API pricing for flat hosting costs.
  • Apple Health exports. Let users upload their full Apple Health XML export, even large ones, and process it in the background.

Configuration

VariableRequiredDescription
ADMIN_EMAIL⚠️ You set itEmail for the first admin account.
ADMIN_PASSWORD⚠️ You set itPassword for that account. The default is refused in production.
SECRET_KEY🔐 Auto-generatedSigns logins and encrypts provider tokens. Referenced by the Celery services.
FRONTEND_URL, CORS_ORIGINS✅ Auto-setThe portal's public URL and the origins allowed to call the API.
VITE_API_URL, API_URL✅ Auto-setThe backend's public URL, for the portal and the scheduler.
DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD✅ Auto-injectedPostgres over the private network.
REDIS_HOST, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD, REDIS_DB✅ Auto-injectedRedis broker connection.
ENVIRONMENT✅ Setproduction.
ACCESS_TOKEN_EXPIRE_MINUTES✅ Set60.
SENTRY_ENABLED✅ Setfalse.

Provider apps. Register a developer app with each wearable brand and set its redirect URL to your backend domain. You enter the credentials in the portal, not as Railway variables.

Webhooks. Register an HTTPS endpoint in the portal to receive new data as it syncs. Deliveries are signed, can be filtered by event or user, and can be replayed from the portal when debugging.

MCP access. Run the Open Wearables MCP server from your AI client with an API key from the portal. Data it returns is shared with that client's model provider.


Open Wearables vs. Alternatives

Open Wearables on RailwayTerraJunctionBuilding it yourself
Monthly cost~$15–30 usageFrom $499From $300Months of engineering
Self-hosted✅ Yes❌ No❌ No✅ Yes
Per-user pricing✅ None❌ Credits per connection⚠️ Tiered by users✅ None
Normalized data model✅ Yes✅ Yes✅ Yes❌ You design it
MCP server for AI agents✅ Included⚠️ Not core⚠️ Not core❌ You build it
Data in your own Postgres✅ Yes❌ Hosted❌ Hosted✅ Yes
License✅ MIT❌ Proprietary❌ Proprietary✅ Your own code

Dependencies for Open Wearables Hosting

  • Railway account. Hobby is enough to try it; Pro for more sync volume.
  • Developer accounts with the wearable providers you want to support.
  • Optional: the iOS, Android, Flutter or React Native SDK for on-device health data.

Deployment Dependencies

Implementation Details

The services build from the repository's default branch. The backend start script runs migrations and seeding before serving on port 8000. Flower waits until a worker answers a ping, then starts its dashboard. Postgres uses the open-wearables database, and Redis requires a password and saves to its volume.

The template follows the repository's default branch rather than a release tag, so each redeploy builds the latest code. Back up Postgres before redeploying in production.


Frequently Asked Questions

What does Open Wearables do? It connects users' wearables and health apps, syncs their data in the background, and serves it through one normalized REST API, webhooks and an MCP server.

How does the cost compare with Terra or Junction? About $15–30/month on Railway for everything here, with unlimited connected users. Terra's entry plan is from $499/month and Junction's starts at $300/month.

Which providers can users connect? Garmin, Oura, Whoop, Polar, Suunto, Strava, Withings, Ultrahuman and Google Health by OAuth, plus Apple Health, Health Connect and Samsung Health through the mobile SDKs.

Do I need to run database migrations myself? No. The backend applies migrations and seeds its provider tables every time it starts.

Should I keep Flower public? Only while you need it. Flower has no login in this setup, so remove its public domain once syncs are running smoothly.

Can AI agents use the data? Yes. The MCP server exposes tools for users, sleep summaries and time series, authenticated with an API key you create in the portal.


Why Deploy and Host Open Wearables 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 Open Wearables on Railway, you get a ready-to-use wearable data API with background sync, a developer portal and AI access, at a flat monthly cost.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1