> ## 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.

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.

<a href="https://railway.com/deploy/open-wearables-1" target="_blank">
  <img noZoom src="https://mintcdn.com/momentum-64cd1fcc/ZGg0VkLR1XDgPTzt/images/railway-button.svg?fit=max&auto=format&n=ZGg0VkLR1XDgPTzt&q=85&s=e2a7fcd8d59e6f815e485f015400f4fc" alt="Deploy on Railway" style={{ maxWidth: "183px" }} width="183" height="40" data-path="images/railway-button.svg" />
</a>

<iframe width="100%" height="400" src="https://www.youtube.com/embed/Cn5IkLMi5Uo" title="Railway deployment walkthrough" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

<Tip>
  An admin account is created automatically on first startup (`admin@admin.com` / `your-secure-password`). To use custom credentials, set `ADMIN_EMAIL` and `ADMIN_PASSWORD` on the **Backend** service before deploying (as shown on the video)
</Tip>

## 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**      | React dashboard                                       |
| **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

<Steps>
  <Step title="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](/providers/supported) for setup instructions for each one.
    </Tip>
  </Step>

  <Step title="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`)    |
  </Step>
</Steps>

## Environment variables reference

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       |
| `LOG_LEVEL`    | Application log level                                                                                                                        | `info`                     |
| `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.
</Note>

## Related guides

<CardGroup cols={2}>
  <Card title="Supported Providers" icon="plug" href="/providers/supported">
    Configure OAuth credentials for each wearable provider.
  </Card>

  <Card title="API Reference" icon="terminal" href="/api-reference/introduction">
    Explore available API endpoints.
  </Card>
</CardGroup>
