spacedrive Docker & Self-Hosted Deployment

GitHub

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.

RAW Compose
1. Pull Image (DOCKERHUB) docker pull spacedriveapp/spacedrive
2. Docker Run (1-Click Launch) docker run -d --name spacedrive -p 8080:8080 --restart always spacedriveapp/spacedrive:latest
3. Podman Run podman run -d --name spacedrive -p 8080:8080 --restart always spacedriveapp/spacedrive:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/spacedriveapp/spacedrive:latest
5. ORAS Pull (OCI Artifact) oras pull spacedriveapp/spacedrive:latest
6. Compose Deployment docker compose up -d
apps/server/docker-compose.yml
Download .yml
services:
  spacedrive:
    build:
      context: ../..
      dockerfile: apps/server/Dockerfile
    container_name: spacedrive-server
    restart: unless-stopped

    # Ports
    ports:
      - "8080:8080"  # HTTP server
      - "7373:7373"  # P2P networking

    # Volumes
    volumes:
      - spacedrive-data:/data
      # Optional: Mount your file systems here
      # - /mnt/storage:/storage:ro

    # Environment variables
    environment:
      # Data directory (inside container)
      - DATA_DIR=/data

      # HTTP server port
      - PORT=8080

      # Authentication (REQUIRED for security!)
      # Format: "username:password,username2:password2"
      # Or set to "disabled" to disable auth (NOT RECOMMENDED)
      - SD_AUTH=${SD_AUTH:-admin:changeme}

      # Enable P2P networking
      - SD_P2P=true

      # Logging
      - RUST_LOG=info,sd_core=debug

      # Timezone
      - TZ=UTC

    # Health check
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

    # Resource limits (adjust as needed)
    deploy:
      resources:
        limits:
          memory: 2G
        reservations:
          memory: 512M

volumes:
  spacedrive-data:
    driver: local