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
- Open
http://your-server-ip:8080in your browser - Create your user account
- Upload an activity file (GPX, TCX, or FIT) to verify the setup
- Optionally connect Strava or Garmin under Settings → Integrations
Importing from Strava
To import your existing Strava history:
- Create a Strava API application at
developers.strava.com - Add your Client ID and Client Secret to the environment variables
- Restart the container
- Authorize the Strava connection in Endurain’s settings
- 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
| Format | Source | What It Contains |
|---|---|---|
| GPX | Most GPS devices | GPS coordinates, elevation, timestamps |
| TCX | Garmin, older devices | GPS + heart rate, cadence, power |
| FIT | Garmin, Wahoo, modern devices | Full 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
}
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
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.
Frequently Asked Questions
Can Endurain replace Strava completely?
For activity logging, route visualization, and performance metrics — yes. You lose Strava’s social features (segments, leaderboards, clubs, follower feeds) and the third-party app ecosystem. If you primarily use Strava as a personal training log, Endurain is a solid replacement. If competition and segments motivate you, you’ll miss those.
Does Endurain support heart rate zones and power data?
Yes, if your activity files contain sensor data. FIT files from modern GPS watches and bike computers include heart rate, cadence, and power metrics. GPX files typically only contain GPS coordinates and elevation — use FIT or TCX exports for richer data.
Can I run Endurain on a Raspberry Pi?
Yes. Endurain is lightweight (~150 MB RAM idle) and runs fine on a Raspberry Pi 4 with 2+ GB RAM. Activity file parsing will be slower than on x86 hardware, but daily usage is responsive.
Is the Garmin Connect integration reliable?
It works but uses unofficial screen scraping, not an official API. Garmin may change their authentication at any time, breaking the sync until Endurain updates. The Strava integration uses the official API and is more stable long-term.
Can multiple users share one Endurain instance?
Yes, Endurain supports multiple user accounts. Each user gets their own activity library and dashboard. There’s no social interaction between users — each account is independent.
How do I migrate my existing Strava data?
Enable the Strava integration with your API credentials and Endurain pulls your history automatically. Alternatively, request a bulk export from Strava (Settings → My Account → Download Request) and upload the files directly.
Related
Get self-hosting tips in your inbox
Get the Docker Compose configs, hardware picks, and setup shortcuts we don't put in articles. Weekly. No spam.
Comments