Skip to main content

Local Deployment

Get Safebucket running locally in minutes using Docker Compose. This guide will walk you through setting up a complete development environment.

Prerequisites

  • Docker and Docker Compose
  • Git for cloning the repository
  • At least 1GB RAM available for containers

Quick Start

  1. Clone the repository:

    git clone https://github.com/safebucket/safebucket
    cd safebucket/deployments/local
  2. Start the services:

    docker compose up -d
  3. Verify the deployment:

    docker compose ps

Services Overview

The local deployment includes the following services:

ServicePortPurpose
Safebucket8080Main application (API + Web)
PostgreSQL5432Main database
RustFS API9000Object storage API
Valkey6379Caching layer
NATS4222Event streaming
Loki3100Activity logging
Mailpit Web8025, 1025Email testing (Web UI + SMTP)

Default Credentials

Application

Infrastructure

  • RustFS Storage:

  • Database:

    • Host: localhost:5432
    • Username: safebucket-user
    • Password: safebucket-password
    • Database: safebucket
  • Valkey:

    • Host: localhost:6379
    • Password: safebucket-password
  • Mailpit (Email Testing):

Accessing Services

RustFS Storage

RustFS provides S3-compatible storage. To manage buckets and files directly, you can use:

AWS CLI:

# Configure AWS CLI with RustFS credentials
aws configure --profile rustfs
# Access Key: rustfsadmin
# Secret Key: rustfsadmin
# Region: us-east-1
# Output: json

# List files in the safebucket bucket
aws --profile rustfs --endpoint-url http://localhost:9000 s3 ls s3://safebucket

# Upload a file
aws --profile rustfs --endpoint-url http://localhost:9000 s3 cp myfile.txt s3://safebucket/

S3 Browser Tools:

  • Use any S3-compatible client (Cyberduck, S3 Browser, etc.)
  • Configure with endpoint http://localhost:9000 and the credentials above

Mailpit (Email Testing)

View all emails sent by Safebucket:

  1. Open http://localhost:8025 in your browser
  2. Perform actions that trigger emails (user invites, password resets, sharing notifications)
  3. View captured emails in the Mailpit web interface

Configuration Files

The local deployment uses these configuration files:

  • .env: Environment variables for Docker Compose
  • docker-compose.yml: Service definitions
  • config/loki.yaml: Loki configuration for logging

Next Steps