> ## Documentation Index
> Fetch the complete documentation index at: https://openwearables.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Open Wearables to Railway

> Deploy Open Wearables to Railway in one click. FastAPI, PostgreSQL, Redis, and Celery pre-configured. No manual infrastructure setup needed.

> [!WARNING]
>
> **Railway security incident (October 2026):** Railway has disclosed that customer environment variables may have been accessed. If you run Open Wearables on Railway, rotate all secrets stored in your environment variables and review your logs for unusual activity. Railway builds are currently paused, so new deployments won't work until they're restored. See [Railway's disclosure](https://blog.railway.com/p/security-disclosure-wednesday-october-21st) for details and updates.

Railway provides the fastest way to get a production Open Wearables instance running. The template deploys all required services with sensible defaults - no manual infrastructure setup needed.

[![Deploy on Railway](https://mintcdn.com/momentum-64cd1fcc/ZGg0VkLR1XDgPTzt/images/railway-button.svg?fit=max\&auto=format\&n=ZGg0VkLR1XDgPTzt\&q=85\&s=e2a7fcd8d59e6f815e485f015400f4fc)](https://railway.com/deploy/open-wearables-1)

[Railway deployment walkthrough](https://www.youtube.com/embed/Cn5IkLMi5Uo)

> [!TIP]
>
> The template asks for `ADMIN_EMAIL` and `ADMIN_PASSWORD` on the **Backend** service, and the first startup creates the admin account from them (only while no developer account exists yet). Changing them later does not update that account, so change the password from the developer portal instead. Additional accounts are added by invitation from the developer portal.
>
> **Deployed before the template required these variables?** If your admin account still uses the public default password (`your-secure-password`), production refuses it at sign-in. On the Backend service set `ADMIN_EMAIL` to that account's email and `ADMIN_PASSWORD` to a new password, then redeploy: on startup the account's password is changed to the new value. Only the account whose email matches `ADMIN_EMAIL` is updated.

## What gets deployed

The Railway template provisions seven services:

| Service | Description |
| - | - |
| **PostgreSQL** | Primary database for users, health data, and API keys |
| **Backend** | FastAPI application server |
| **Frontend** | Developer portal (SvelteKit) |
| **Redis** | Broker for Celery task queue and caching |
| **Celery Worker** | Processes background tasks (data syncs, webhooks) |
| **Celery Beat** | Schedules recurring sync jobs |
| **Flower** | Celery monitoring dashboard |

All inter-service networking and environment variables are configured automatically by the template.

## Post-deploy setup

**1. Configure provider OAuth credentials**

To enable wearable data syncing, add OAuth credentials for each provider you want to support on the **Backend** service.

> [!TIP]
>
> You only need to configure providers you plan to use. See [Supported Providers](https://openwearables.io/docs/providers/supported.md) for setup instructions for each one.

**2. Set up a custom domain (optional)**

Railway assigns a default `*.up.railway.app` domain to each service. To use your own domain:

1. Open your **Frontend** service in Railway
2. Go to **Settings > Networking > Custom Domain**
3. Add your domain and configure the DNS records as shown

Repeat for the **Backend** service if you want a custom API domain. Then update the following environment variables:

| Variable | Service | Value |
| - | - | - |
| `VITE_API_URL` | Frontend | Your backend URL (e.g. `https://api.yourdomain.com`) |
| `CORS_ORIGINS` | Backend | Your frontend URL (e.g. `https://yourdomain.com`) |

## Environment variables reference

The **Frontend** service needs only `VITE_API_URL`, the public URL of the backend. See [Frontend configuration](https://openwearables.io/docs/deployment/docker.md#frontend-configuration) for the optional `API_URL`.

Key variables you may want to customize on the **Backend** service:

| Variable | Description | Default |
| - | - | - |
| `SECRET_KEY` | JWT signing key | Auto-generated by template |
| `CORS_ORIGINS` | Allowed CORS origins (comma-separated) | Frontend Railway URL |
| `ACCESS_LOG_LEVEL` | Per-request access logging: `all`, `errors` (4xx/5xx only), or `off` | `errors` in production, `all` otherwise |
| `LOG_FORMAT` | Log output: `legacy` (structured app logs as JSON, other logs as text), `json` (every line JSON) or `text` (readable). See [Logs](https://openwearables.io/docs/deployment/docker.md#logs) | `legacy` |
| `LOG_LEVEL` | Drop log lines below this level: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` | not set |
| `OTEL_ENABLED` | Also send logs to an OTLP/HTTP collector set with `OTEL_EXPORTER_OTLP_ENDPOINT`. See [Exporting logs with OpenTelemetry](https://openwearables.io/docs/dev-guides/log-export.md) | `false` |
| `REDIS_SSL` | Enable TLS for Redis connections (`rediss://`). Required for managed Redis with transit encryption (e.g. AWS ElastiCache, Upstash with TLS). | `false` |

> [!NOTE]
>
> Database and Redis connection strings are injected automatically by Railway — you do not need to set these manually. `REDIS_SSL` defaults to `false` and is only needed if you swap Railway's built-in Redis for an external managed instance with TLS enabled.

## Related guides

> [card] [Supported Providers](https://openwearables.io/docs/providers/supported.md)
>
> Configure OAuth credentials for each wearable provider.

> [card] [API Reference](https://openwearables.io/docs/api-reference/introduction.md)
>
> Explore available API endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.