Upload a GPX file, get a shareable link. Interactive 2D maps, elevation profiles, and 3D terrain flythroughs β all in a single Go binary.
No third-party services. No accounts. Just a URL.
OpenStreetMap-powered map with the trail rendered as a polyline. Hover to see elevation and distance at any point.
WebGL terrain rendering with satellite, topographic, street, and dark basemap styles. Real elevation data, 1.5Γ exaggerated for impact.
Animated camera follows the trail at 1Γ, 2Γ, 5Γ, or 10Γ speed. Scrub to any position along the route.
Chart.js elevation profile synced with the map cursor. Collapsible panel keeps the map front and centre.
Distance (Haversine), total elevation gain, and duration (when GPX timestamps are present) shown at a glance.
Each trail gets a UUID-based URL. Map position, 3D mode, and playback state are encoded in query params for bookmarking.
Simple web UI with API key stored in browser storage. Or use curl for scripted uploads.
Go backend embeds the built frontend. Drop one binary, set one env var, done. SQLite for metadata, filesystem for GPX files.
Three steps from GPX file to 3D terrain flythrough.
Drag and drop onto the web UI or curl -F file=@trail.gpx to the /upload endpoint with your API key. The server stores the file and returns a unique URL.
A UUID-based URL like https://trails.example.com/550e8400-... is yours instantly. Send it to anyone β no account required to view.
Viewers see an interactive map with elevation profile. Switch to 3D mode for a first-person terrain flythrough with playback controls.
Requires Go 1.21+ and Node.js 16+ to build from source.
# Clone and build git clone https://github.com/fuzue/share-gpx cd share-gpx make build # Run the server API_KEY=your-secret-key ./share-gpx # Open http://localhost:8080 in your browser
curl -X POST https://your-domain.com/upload \ -H "X-API-Key: your-secret-key" \ -F "file=@trail.gpx" # {"url":"https://your-domain.com/550e8400-e29b-41d4-a716-446655440000"}
No config files. Everything is set via environment variables.
| Variable | Default | Description |
|---|---|---|
API_KEY required |
β | Secret key for the /upload endpoint. Use openssl rand -hex 32 to generate one. |
DATA_DIR |
/data |
Directory where GPX files and the SQLite database are stored. Must be writable. |
PORT |
8080 |
HTTP listen port. |
PUBLIC_URL |
http://localhost:{PORT} |
Base URL returned in upload responses. Set this to your public domain. |
Carefully chosen dependencies that stay out of your way.
Self-host in minutes. MIT licensed. No sign-up required.