🚀 Quick Start (Docker)
Prerequisites
- 🐳 Docker & Docker Compose
- 🛢 PostgreSQL / Supabase DB access
- ☁️ Cloud credentials (optional)
1️⃣ Clone and Configure
# Clone the repository
git clone https://github.com/querylab/supackup.git
cd supackup
# Copy configuration file
cp .env.example .env
⚙️ Environment Configuration .env.example
warning
⚠️ Never upload your real credentials in public repos.
# ============================================
# DATABASE CONFIGURATION
# ============================================
# Main PostgreSQL connection string used for creating database backups.
# Replace the placeholders with your Supabase (Cloud or Self-Hosted) credentials.
DATABASE_URL=postgresql://postgres.your-tenant-id:[YOUR-DATABASE-PASSWORD]@[YOUR-IP-OR-SUPABASE-ENDPOINT]/postgres
# ---------------- Example: Supabase Self-Hosted ----------------
# Format: postgresql://USER:PASSWORD@HOST:PORT/DATABASE
# Example:
# postgresql://postgres.your-tenant-id:zU22CNqZaLr11AC6rn6f-Q@111.111.111.11:5432/postgres
# ---------------- Example: Supabase Cloud ----------------------
# Cloud format provided by Supabase Dashboard:
# postgresql://postgres.<project-id>:<password>@aws-1-us-east-1.pooler.supabase.com:5432/postgres
# Example:
# postgresql://postgres.ej11wywt111zhglljoxm:zZ15CMMZTLWQqzC9rn0f-Q@aws-1-us-east-1.pooler.supabase.com:5432/postgres
# ================================================================
# ============================================
# SUPABASE CONFIGURATION
# ============================================
# Base URL of your Supabase project (self-hosted or cloud).
NEXT_PUBLIC_SUPABASE_URL=http://111.111.111.11:8000
# Service Role Key used for authenticated access.
# ⚠️ Keep this key private — it has elevated permissions.
SUPABASE_SERVICE_KEY=eyJhb11iOiJIUzI1NiIsInR5cCI11111VCJ9.eyJyb2xlIjoic212345jZV9yb2xlI1wiaXNzIj11c3VwYWJhc2UtZ11234ImlhdCI6MTc2NDA3ODgxMiwiZXhwIjoy1Dc5NDM4ODEyfQ.84gsS6ogDKc_ni4Zw5px8KfEp11111gUuDw4PL2MXPw
# Supabase Storage bucket for encrypted backups
# Optional — comment out if you don't want to upload to Supabase Storage
SUPABASE_BUCKET_NAME=supackup
# ==================================================
# BACKUP ENCRYPTION
# ==================================================
# Password used to encrypt backup archives (ZIP / AES)
# Use a strong, unique password
ZIP_PASSWORD=change-this-strong-password
# ==================================================
# CLOUD STORAGE PROVIDERS (Optional)
# Configure only the services you plan to use
# ==================================================
# -------- Cloudflare R2 --------
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_ENDPOINT_URL=
R2_BUCKET_NAME=supackup
# -------- Storj --------
STORJ_ACCESS_KEY=
STORJ_SECRET_KEY=
STORJ_ENDPOINT=https://gateway.storjshare.io
STORJ_BUCKET_NAME=supackup
# -------- Backblaze B2 --------
B2_APP_KEY_ID=
B2_APP_KEY=
B2_BUCKET_NAME=supackup
# -------- pCloud --------
PCLOUD_USERNAME=
PCLOUD_PASSWORD=
PCLOUD_FOLDER=supackup
# -------- Nextcloud --------
NEXTCLOUD_URL=
NEXTCLOUD_USERNAME=
NEXTCLOUD_PASSWORD=
NEXTCLOUD_FOLDER=supackup
# -------- Seafile --------
SEAFILE_SERVER_URL=
SEAFILE_USERNAME=
SEAFILE_PASSWORD=
SEAFILE_REPO_NAME=supackup
# -------- AWS S3 --------
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=us-east-1
AWS_S3_BUCKET_NAME=supackup
# ==================================================
# NOTIFICATIONS (Optional)
# ==================================================
TELEGRAM_TOKEN=
TELEGRAM_CHAT_ID=
DISCORD_WEBHOOK_URL=
NTFY_URL=
# ==================================================
# BACKUP SCHEDULING
# ==================================================
# Cron expression (default: every 24 hours)
BACKUP_SCHEDULE=0 */24 * * *
RUN_ON_STARTUP=true
TZ=America/New_York
🐳 2️⃣ Docker Compose Setup
The Docker container automatically runs the main.py script according to the defined schedule, backup your Supabase database and uploading it to the configured cloud storage services. Real-time notifications are sent to the channels you have selected. The backup frequency is fully customizable using the BACKUP_SCHEDULE variable. It is currently set to run every 24 hours (0 */24 * * *) but you can adjust it according to your needs.
services:
supackup:
container_name: supackup
hostname: supackup
image: docker.io/querylab/supackup:latest
env_file:
- .env
volumes:
- /root/supackup/backup:/app/backup
- /root/supackup/.env:/app/.env
restart: unless-stopped
- Run the docker container
docker compose up -d
🎉 Your automated backup system is now running!