Portabase Logo
Advanced ConfigurationStorage

RustFS

Use RustFS as an S3-compatible distributed storage for your backups.

RustFS is a high-performance, S3-compatible, distributed object storage system built with Rust. It is designed for high availability and scalability, making it an excellent choice for storing Portabase backups.


You can run a single-node RustFS instance using Docker Compose.

1. Docker Compose configuration

docker-compose.yml
name: portabase-stack

services:
  # ... other services (portabase, db) ...

  rustfs:
    image: rustfs/rustfs:latest
    container_name: portabase-rustfs
    expose:
      - 9000
      - 9001
    environment:
      - RUSTFS_ADDRESS=0.0.0.0:9000
      - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
      - RUSTFS_CONSOLE_ENABLE=true
      - RUSTFS_ACCESS_KEY=${S3_ACCESS_KEY}
      - RUSTFS_SECRET_KEY=${S3_SECRET_KEY}
    volumes:
      - rustfs-data:/data
    networks:
      - traefik_network
      - default
    labels:
      - "traefik.enable=true"
      # Route 1: S3 API
      - "traefik.http.routers.rustfs-api.rule=Host(`s3.example.com`)"
      - "traefik.http.routers.rustfs-api.entrypoints=websecure"
      - "traefik.http.routers.rustfs-api.tls.certresolver=myresolver"
      - "traefik.http.services.rustfs-api.loadbalancer.server.port=9000"
      # Route 2: Web Console
      - "traefik.http.routers.rustfs-console.rule=Host(`console.s3.example.com`)"
      - "traefik.http.routers.rustfs-console.entrypoints=websecure"
      - "traefik.http.routers.rustfs-console.tls.certresolver=myresolver"
      - "traefik.http.services.rustfs-console.loadbalancer.server.port=9001"

volumes:
  rustfs-data:

networks:
  traefik_network:
    external: true

2. .env configuration

.env
STORAGE_TYPE=s3

# Connection settings
S3_ENDPOINT=s3.example.com
S3_PORT=443
S3_USE_SSL=true

# Credentials (used by both RustFS and Portabase)
S3_ACCESS_KEY=your_access_key
S3_SECRET_KEY=your_secret_key
S3_BUCKET_NAME=portabase-backups

Verification

  1. Restart the dashboard:
portabase restart . 
docker-compose down && docker-compose up -d 
  1. Trigger a manual backup on an agent.
  2. Verify the backup appears in your RustFS instance (via the console at console.s3.example.com).

On this page