Self-Hosting Endurain with Docker Compose

What Is Endurain?

Endurain is a self-hosted fitness tracking platform — essentially a personal Strava that runs on your own server. It ingests activity data from GPX, TCX, and FIT files (the standard formats from GPS watches and bike computers), displays routes on maps, tracks performance metrics, and stores your complete workout history. It also syncs directly with Strava and Garmin Connect, so you can import existing activity history.

Updated February 2026: Verified with latest Docker images and configurations.

Prerequisites

  • A Linux server (Ubuntu 22.04+ recommended)
  • Docker and Docker Compose installed (guide)
  • 512 MB of free RAM
  • 2 GB of free disk space
  • A domain name (recommended for remote access from mobile devices)

Docker Compose Configuration

Create a docker-compose.yml file:

services:
  endurain:
    image: ghcr.io/endurain-project/endurain:v0.17.6
    container_name: endurain
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - endurain_data:/app/data
    environment:
      # Database connection
      - DB_HOST=db
      - DB_PORT=5432
      - DB_USER=endurain
      - DB_PASSWORD=changeme_endurain_password
      - DB_NAME=endurain
      # Secret key for JWT tokens — CHANGE THIS
      - SECRET_KEY=changeme_generate_a_random_64_char_hex_string
      # Strava integration (optional)
      # - STRAVA_CLIENT_ID=your_strava_client_id
      # - STRAVA_CLIENT_SECRET=your_strava_client_secret
      # Garmin Connect integration (optional)
      # - GARMIN_CONNECT_EMAIL=your_garmin_email
      # - GARMIN_CONNECT_PASSWORD=your_garmin_password
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:16-alpine
    container_name: endurain-db
    restart: unless-stopped
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=endurain
      - POSTGRES_PASSWORD=changeme_endurain_password
      - POSTGRES_DB=endurain
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U endurain"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  endurain_data:
  postgres_data:

Start the stack:

docker compose up -d

Initial Setup

  1. Open http://your-server-ip:8080 in your browser
  2. Create your user account
  3. Upload an activity file (GPX, TCX, or FIT) to verify the setup
  4. Optionally connect Strava or Garmin under Settings → Integrations

Importing from Strava

To import your existing Strava history:

  1. Create a Strava API application at developers.strava.com
  2. Add your Client ID and Client Secret to the environment variables
  3. Restart the container
  4. Authorize the Strava connection in Endurain’s settings
  5. Endurain pulls your activity history automatically

Importing from Garmin Connect

Add your Garmin Connect email and password to the environment variables. Endurain syncs activities from your Garmin account on a schedule. This uses unofficial Garmin Connect scraping — it works but may break if Garmin changes their login flow.

Configuration

Activity File Formats

FormatSourceWhat It Contains
GPXMost GPS devicesGPS coordinates, elevation, timestamps
TCXGarmin, older devicesGPS + heart rate, cadence, power
FITGarmin, Wahoo, modern devicesFull sensor data, laps, training metrics

FIT files contain the richest data. If your device supports FIT export, prefer that over GPX.

Performance Metrics

Endurain calculates and displays:

  • Distance, duration, pace/speed
  • Elevation gain/loss
  • Heart rate zones (if HR data available)
  • Cadence (cycling/running)
  • Route visualization on OpenStreetMap tiles
  • Weekly/monthly/yearly activity summaries

Multi-Language Support

Endurain supports multiple languages via Crowdin community translations. Change your preferred language in user settings.

Reverse Proxy

Nginx Proxy Manager configuration for fitness.yourdomain.com:

  • Scheme: http
  • Forward Hostname: endurain
  • Forward Port: 8080
  • Enable SSL with Let’s Encrypt

For Caddy:

fitness.yourdomain.com {
    reverse_proxy endurain:8080
}

Reverse Proxy Setup

Backup

Back up both the PostgreSQL database and the data volume:

# Database backup
docker compose exec db pg_dump -U endurain endurain > endurain-backup.sql

# Data volume backup
docker run --rm -v endurain_data:/data -v $(pwd):/backup alpine tar czf /backup/endurain-data-backup.tar.gz /data

Backup Strategy

Troubleshooting

Activity file upload fails

Symptom: Uploading a GPX/TCX/FIT file returns an error. Fix: Check the file is valid and not corrupted. FIT files from some devices may use proprietary extensions — try converting to GPX first using GPSBabel. Ensure the data volume has sufficient disk space.

Strava sync not importing activities

Symptom: Strava connection shows as authorized but no activities appear. Fix: Verify your Strava API application is set to “read” scope. Check container logs (docker compose logs endurain) for API rate limiting. Strava limits API calls to 100 requests per 15 minutes.

Map tiles not loading

Symptom: Activity routes display but the background map is blank. Fix: Endurain uses OpenStreetMap tiles by default. Ensure your server can reach tile.openstreetmap.org. If running behind a strict firewall, whitelist OSM tile servers.

Resource Requirements

  • RAM: ~150 MB idle, ~250 MB during file processing
  • CPU: Low to moderate (file parsing is CPU-intensive for large FIT files)
  • Disk: ~200 MB for application, plus ~1-5 MB per activity file

Verdict

Endurain is the best self-hosted Strava alternative if you primarily want to track outdoor activities with GPS data. The Strava and Garmin Connect integrations make migration straightforward — you don’t lose your history. The activity visualization and metrics are solid for individual use.

Where it falls short compared to Strava: no social features (no segments, leaderboards, or following other athletes), no route planning, and no third-party app ecosystem. If you use Strava mainly as a personal log and don’t care about the social layer, Endurain is a strong replacement. If segments and competition motivate your training, you’ll miss those features.

For gym workouts and strength training rather than GPS-tracked outdoor activities, wger is the better tool. For general health record aggregation, pair Endurain with Fasten Health.

Comments