SERVER_RELEASE_SETUP.md
This document explains the changes made to integrate Spacedrive server builds into the release workflow.
The server app (sd-server) is now built and released in two formats:
Both are automatically built and published when a git tag is pushed (e.g., v2.0.0-alpha.2).
Note: The root /Dockerfile has been removed as it was redundant. The only Docker image for self-hosting is apps/server/Dockerfile, which builds the HTTP server with embedded daemon and full media processing support.
.github/workflows/release.yml)Added: server-build job
Builds static server binaries for:
linux-x86_64 (Intel/AMD servers)linux-aarch64 (ARM servers, Raspberry Pi, AWS Graviton)Features:
heif, ffmpeg features enabled)gcc-aarch64-linux-gnu.tar.gz for easy distributionArtifacts uploaded:
sd-server-linux-x86_64.tar.gzsd-server-linux-aarch64.tar.gzUpdated: release job
server-build to dependencies.tar.gz files.github/workflows/server.yml)Changed trigger:
release: types: [published]push: tags: ["v*"]Multi-arch support:
amd64 onlyamd64 + arm64Fixed paths:
context: ./apps/server/docker (incorrect)context: . (repo root)containerfiles: ./apps/server/docker/Dockerfile (incorrect)containerfiles: ./apps/server/Dockerfile (correct)Image tagging:
v2.0.0-alpha.2) → ghcr.io/spacedriveapp/spacedrive/server:v2.0.0-alpha.2 + latestghcr.io/spacedriveapp/spacedrive/server:<commit-sha> + stagingapps/server/Dockerfile)Added media processing dependencies:
Builder stage:
cmake, nasm - Build tools for native dependencieslibavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev - FFmpeg dev librarieslibheif-dev - HEIF image format supportRuntime stage:
distroless/cc to debian:bookworm-slimlibavcodec59, libavformat59, libavutil57, libswscale6, libheif1spacedrive user (UID 1000) for securityEnabled features in build:
cargo build --release -p sd-server --features sd-core/heif,sd-core/ffmpeg
This enables:
Tag a release:
git tag v2.0.0-alpha.2
git push origin v2.0.0-alpha.2
GitHub Actions automatically:
Review and publish:
Test static binary build:
# From project root
cargo build --release -p sd-server --features sd-core/heif,sd-core/ffmpeg
# Test locally
./target/release/sd-server --data-dir /tmp/sd-test
Test Docker build:
# From project root
docker build -f apps/server/Dockerfile -t sd-server-test .
# Run locally
docker run -p 8080:8080 -e SD_AUTH=admin:test sd-server-test
Test multi-arch Docker build:
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64 \
-f apps/server/Dockerfile \
-t sd-server-multiarch \
.
# Download from GitHub release
wget https://github.com/spacedriveapp/spacedrive/releases/download/v2.0.0-alpha.2/sd-server-linux-x86_64.tar.gz
tar -xzf sd-server-linux-x86_64.tar.gz
# Verify checksum
sha256sum -c sd-server-linux-x86_64.sha256
# Install
sudo mv sd-server-linux-x86_64 /usr/local/bin/sd-server
sudo chmod +x /usr/local/bin/sd-server
# Create systemd service
sudo nano /etc/systemd/system/spacedrive.service
Example systemd unit:
[Unit]
Description=Spacedrive Server
After=network.target
[Service]
Type=simple
User=spacedrive
Environment="DATA_DIR=/var/lib/spacedrive"
Environment="SD_AUTH=admin:your-secure-password"
ExecStart=/usr/local/bin/sd-server --data-dir /var/lib/spacedrive
Restart=on-failure
[Install]
WantedBy=multi-user.target
docker run -d \
--name spacedrive \
-p 8080:8080 \
-p 7373:7373 \
-v spacedrive-data:/data \
-e SD_AUTH=admin:password \
ghcr.io/spacedriveapp/spacedrive/server:latest
Use the provided docker-compose.yml in apps/server/:
cd apps/server
docker-compose up -d
Or create your own:
version: '3.8'
services:
spacedrive:
image: ghcr.io/spacedriveapp/spacedrive/server:latest
ports:
- "8080:8080"
- "7373:7373"
volumes:
- spacedrive-data:/data
- /mnt/storage:/storage:ro # Optional: mount storage
environment:
SD_AUTH: "admin:your-password"
TZ: "America/New_York"
restart: unless-stopped
volumes:
spacedrive-data:
| Platform | Binary | Docker |
|---|---|---|
| Linux x86_64 (Intel/AMD) | ✅ | ✅ |
| Linux ARM64 (Raspberry Pi, AWS Graviton) | ✅ | ✅ |
| macOS | ❌ (desktop app only) | ❌ |
| Windows | ❌ (desktop app only) | ❌ |
After a release is created, verify these files exist:
Server binaries:
sd-server-linux-x86_64.tar.gzsd-server-linux-aarch64.tar.gzDesktop apps:
Spacedrive_<version>_aarch64.dmg (macOS ARM)Spacedrive_<version>_amd64.deb (Linux)dist.tar.xz (frontend assets)Docker images: Check ghcr.io:
docker pull ghcr.io/spacedriveapp/spacedrive/server:v2.0.0-alpha.2
docker pull ghcr.io/spacedriveapp/spacedrive/server:latest
sd-server.exe for Windows Server deployments.deb and .rpm packages for easier installationmusl for maximum compatibilitydocs/overview/self-hosting.mdx)The workflow now automatically includes sd-core/heif and sd-core/ffmpeg features. If this fails:
Current runtime image uses debian:bookworm-slim (~80-100MB base) plus runtime libraries.
To reduce size:
ARM builds can be slow via QEMU emulation. Options:
The container runs as user spacedrive (UID 1000). If mounting volumes:
# Fix permissions
sudo chown -R 1000:1000 /path/to/data
Or run as root (not recommended):
docker run --user root ...