Documentation

Deploy a fully working tileserver-rs instance with sample data in minutes. No configuration needed — sample tile data is automatically downloaded on first start.

One-Click Deploy

PlatformDeployConfig File
RailwayDeploy on Railwayrailway.toml
RenderDeploy on Renderrender.yaml
DigitalOceanDeploy to DO.do/deploy.template.yaml
Fly.iofly launch --copy-configfly.toml
Dockerdocker compose up -dcompose.yml

Each platform builds from the included Dockerfile. The container automatically downloads sample data on first start if no tile files are present.

How Sample Data Works

When the Docker container starts with an empty /data directory (no .pmtiles or .mbtiles files), the entrypoint script automatically downloads sample data (~15 MB) from the latest GitHub release. This includes:

  • Protomaps sample tiles (PMTiles) — world basemap extract
  • Zurich MBTiles — detailed city extract
  • Noto Sans fonts — for label rendering
  • Protomaps Light style — ready-to-use map style
  • Sample raster data — COG test files
Info

Sample data is downloaded only when no tile files exist in /data. Mount your own data volume to skip the download entirely.

Pinning a Version

By default, the latest release is downloaded. Pin a specific version with the SAMPLE_DATA_VERSION environment variable:

docker run -d -p 8080:8080 \
  -e SAMPLE_DATA_VERSION=v2.13.0 \
  ghcr.io/vinayakkulkarni/tileserver-rs:latest

Platform Guides

Railway

The included railway.toml configures:

  • Dockerfile-based builds
  • Health check at /health (60s timeout)
  • Auto-restart on failure

After clicking the deploy button, Railway builds the image and starts the service. The sample data downloads automatically on first boot.

Adding your own data:

Railway supports persistent volumes. Attach a volume at /data and upload your tile files:

# Install Railway CLI: https://docs.railway.com/guides/cli
railway volume create --mount /data

Render

The render.yaml blueprint configures a web service with:

  • Docker runtime
  • Health check at /health
  • Starter plan (512 MB RAM)
  • Oregon region

After clicking the deploy button, Render auto-discovers the blueprint and provisions the service.

Adding your own data:

Render supports persistent disks. Add one to your service and mount at /data.

DigitalOcean

The .do/deploy.template.yaml App Platform spec configures:

  • Dockerfile-based component
  • Auto-deployed from the repository

Adding your own data:

Use DigitalOcean Spaces or a mounted volume for persistent tile storage.

Fly.io

# Install flyctl: https://fly.io/docs/flyctl/install/
fly launch --copy-config
fly deploy

The included fly.toml configures:

  • Auto-stop/start machines (cost-efficient — scales to zero when idle)
  • 512 MB RAM, shared CPU
  • HTTPS with automatic TLS
  • Connection-based concurrency (soft: 200, hard: 250)

Adding persistent storage:

# Create a 10 GB volume in your preferred region
fly volumes create tile_data --size 10 --region iad

# Update fly.toml to mount the volume
# [mounts]
#   source = "tile_data"
#   destination = "/data"

Using Your Own Data

All platforms follow the same pattern — mount your tile data at /data:

# Docker
docker run -d -p 8080:8080 \
  -v /path/to/your/data:/data:ro \
  ghcr.io/vinayakkulkarni/tileserver-rs:latest

# Or with a config file
docker run -d -p 8080:8080 \
  -v /path/to/your/data:/data:ro \
  -v /path/to/config.toml:/app/config.toml:ro \
  ghcr.io/vinayakkulkarni/tileserver-rs:latest

The server auto-detects .pmtiles, .mbtiles, style.json, fonts, and GeoJSON files from /data. No config file is required for basic setups.

Environment Variables

VariableDescriptionDefault
RUST_LOGLog level (error, warn, info, debug)info
PORTServer port8080
SAMPLE_DATA_VERSIONPin sample data to a specific release taglatest

Next Steps