Install
Download a signed GitHub Release binary, pull the GHCR image, or build from source.
Megabase is one Rust binary next to PostgreSQL. Unimplemented routes return HTTP 501 {"code":"MEGABASE_NOT_IMPLEMENTED",...}. Nothing here is production software.
The Release workflow attaches musl-static linux x86_64 and aarch64 binaries, SHA256SUMS, Sigstore signatures, and SLSA provenance, and publishes ghcr.io/zouhairmaj/megabase tagged with that version. v0.1.0 and v0.1.1 shipped without those assets. Use a later tag that lists megabase-*-unknown-linux-musl on Releases. To backfill an asset-less tag, dispatch Release with Use workflow from set to that tag. That run creates the assets. Use the tag after the workflow completes. Commands for download and verification live only on this page.
Release binary
Install cosign. Set TAG to a release that includes the musl assets, then authenticate SHA256SUMS before trusting the checksum or running the binary.
TAG=vX.Y.Z
case "$(uname -m)" in
x86_64) ARCH=x86_64-unknown-linux-musl ;;
aarch64|arm64) ARCH=aarch64-unknown-linux-musl ;;
*) echo "Unsupported architecture: $(uname -m)" >&2; exit 1 ;;
esac
BASE=https://github.com/Zouhairmaj/megabase/releases/download/${TAG}
ASSET=megabase-${TAG}-${ARCH}
curl -fsSL -O "${BASE}/${ASSET}"
curl -fsSL -O "${BASE}/SHA256SUMS"
curl -fsSL -O "${BASE}/SHA256SUMS.sig"
curl -fsSL -O "${BASE}/SHA256SUMS.pem"
cosign verify-blob \
--certificate SHA256SUMS.pem \
--signature SHA256SUMS.sig \
--certificate-identity-regexp '^https://github.com/Zouhairmaj/megabase/\.github/workflows/release\.yml@refs/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing
chmod +x "${ASSET}"
./"${ASSET}"The binary listens on 0.0.0.0:8000 (MEGABASE_HOST / MEGABASE_PORT). See Configuration.
Verify signatures
Release blobs are signed keylessly with Sigstore (cosign sign-blob in .github/workflows/release.yml). The signing identity is this repository's Release workflow; the OIDC issuer is GitHub Actions. The install sequence above already authenticates SHA256SUMS before the checksum check.
To verify a binary instead of the checksum file, use that asset's .pem and .sig (same identity flags). SLSA provenance is megabase-${TAG}.intoto.jsonl on the Release and in GitHub attestations:
gh attestation verify "${ASSET}" --repo Zouhairmaj/megabaseContainer image
After the Release workflow publishes an image, it is ghcr.io/zouhairmaj/megabase:<tag> (also tagged without the leading v) and signed with cosign sign in the same job. v0.1.0 has no image until that job is dispatched for the tag.
docker pull ghcr.io/zouhairmaj/megabase:vX.Y.Z
cosign verify \
--certificate-identity-regexp '^https://github.com/Zouhairmaj/megabase/\.github/workflows/release\.yml@refs/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
ghcr.io/zouhairmaj/megabase:vX.Y.Z
docker run --rm -p 8000:8000 ghcr.io/zouhairmaj/megabase:vX.Y.ZPass -e DATABASE_URL=... if the process should create the standard API roles and install the Auth SQL objects. The image includes megabase-healthcheck, which probes /_megabase/health.
Clone
git clone --recurse-submodules https://github.com/Zouhairmaj/megabase.git
cd megabaseVendor pins live in vendor/ (vendor.toml). Coverage and the judge need the submodules.
Build from source
MSRV is 1.89. From the repository root:
cargo build --release --locked -p megabase
./target/release/megabaseEnvironment variables are in Configuration. just lists every recipe that works today.
When DATABASE_URL is set, startup creates the standard API roles (anon, authenticated, service_role, authenticator) and the Supabase admin roles (supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_realtime_admin) when the cluster lacks them, then the Auth schema objects Megabase currently implements. Both installs are idempotent, so an existing Supabase migration runs unchanged on an empty database. The connecting role needs CREATEROLE (or superuser) on a stock cluster. An attribute it cannot grant is skipped and logged, and startup continues. See Configuration. Without DATABASE_URL the process still serves HTTP.
The public site generator is separate:
cargo run --manifest-path site/Cargo.toml -- --repo-root . --out _siteBuild the image locally
The root Dockerfile builds the release image. Both FROM lines are official Docker Hub tags pinned by digest (Scorecard Pinned-Dependencies; alerts #6 and #7 on main). They are pulled from ghcr.io mirrors of the Amazon ECR Public copies, at the same digests, so neither Hub 429s nor the ECR Public data quota fail CI (decision 0040):
| Stage | Image | Upstream (same digest) |
|---|---|---|
| Builder | ghcr.io/zouhairmaj/rust:1.89-slim-bookworm@sha256:d7fc7de78bb8c1469933aeecbf801314d30d7d6e9f0578bba4cfa285bfa37fe6 | public.ecr.aws/docker/library/rust |
| Runtime | ghcr.io/zouhairmaj/debian:bookworm-slim@sha256:7c7b2c966bc9ee8cedfeef67e0e279108992c77681fa595db4a9d65c06ccc587 | public.ecr.aws/docker/library/debian |
If the mirror cannot be pulled, replace ghcr.io/zouhairmaj/ in the FROM lines with public.ecr.aws/docker/library/; the digests stay the same.
The Cloud Agent image in .cursor/Dockerfile is pinned the same way: ubuntu:24.04@sha256:534baea6a22c03a63003dbc8dbe78fe34bc0d7e595d9a9dc9834884ff530eb55 (index digest for that tag, verified 2026-10-09).
That Dockerfile does not pipe installers into a shell. rustup-init 1.29.1 and cargo-binstall v1.25.2 are downloaded, checked with a hard-coded SHA-256, then executed (Scorecard Pinned-Dependencies downloadThenRun, alerts #17 and #18 on main). The pin is those two bootstrap binaries only: rustup-init then installs the floating stable toolchain (the checkout's rust-toolchain.toml selects the channel after the repo is present), and cargo binstall installs latest just, cargo-deny, cargo-audit, and cargo-llvm-cov. Those later fetches are outside alerts #17 and #18. The Cloud Agent install script in .cursor/environment.json uses the same hashes when those tools are missing. Hashes were re-verified on 2026-10-09 against static.rust-lang.org/rustup/archive/1.29.1 and the GitHub release asset digests. Renovate does not bump these archive hashes; bump the version comment, URL, and digest together.
Renovate's docker datasource has pinDigests: true, so a tag bump and its digest move in the same PR. Do not un-pin these images to a bare tag.
docker build -t megabase .
docker run --rm -p 8000:8000 megabaseRequirements
| Tool | Why |
|---|---|
| Rust 1.89+ | Workspace MSRV; CI also checks 1.89 |
| PostgreSQL 15+ | External database (not required just to start the 501 gateway) |
| Docker | Release image; Compose for the judge |
| cosign (optional) | Verify Sigstore signatures on Release assets and GHCR |
Wrong or unfinished? Open an issue or edit docs/install.md on GitHub.