Clone
9
Quick Start with weed mini
Chris Lu edited this page 2026-01-29 22:49:54 -08:00

Quick Start with weed mini

Note

: The weed mini command is designed for learning, development, and testing only. It may not guarantee backward compatibility between versions. For production deployments, use the Multi-Component Setup.

Overview

weed mini is an all-in-one SeaweedFS command designed specifically for S3 beginners, small deployments, and development environments. It starts all essential SeaweedFS components in a single process with optimized defaults. If there are enough disk space, weed mini should be trouble-free in most cases.

Perfect for:

  • Learning SeaweedFS and S3-compatible storage
  • Development and testing
  • Prototyping
  • Small deployments with minimal configuration

Features

The weed mini command starts:

  • Master Server - Cluster coordination
  • Volume Server - Data storage
  • Filer - Hierarchical file system interface
  • S3 Gateway - S3-compatible API endpoint
  • WebDAV Gateway - WebDAV file access
  • Admin UI - Web-based management console
  • Maintenance Worker - Background tasks (vacuuming, erasure coding, balancing)

All components run in a single process with optimized settings:

  • Auto-configured volume size limit (suitable for most use cases)
  • Auto-scaling volumes based on available disk space
  • Single master mode (no cluster coordination overhead)
  • 1-second pre-stop time (faster startup/shutdown)
  • Embedded IAM for S3 credential management

Quick Start

Basic Usage

weed mini -dir=/data

This starts all services with the default configuration:

Custom Data Directory

weed mini -dir=/path/to/data

Custom Port

weed mini -dir=/data -master.port=9444 -s3.port=8334

S3 Credentials Setup

Set AWS credentials before starting:

export AWS_ACCESS_KEY_ID=your-access-key
export AWS_SECRET_ACCESS_KEY=your-secret-key
export S3_ENDPOINT=http://localhost:8333
weed mini -dir=/data

The initial IAM config will be created automatically for the mini user with these credentials.

Option 2: Admin UI

  1. Start weed mini
  2. Open http://localhost:23646 in your browser
  3. Navigate to the IAM/Credentials section
  4. Create new identities with S3 credentials

Default S3 Access

By default, the SeaweedFS S3 gateway starts in "Allow All" mode if no S3 credentials are configured. This is designed for maximum ease of use in development and testing environments, and it applies to all S3 instances, including weed mini.

  • No credentials configured: All S3 operations are allowed without authentication.
  • Credentials added: As soon as any credentials are configured (either initially via flags/env vars or dynamically via the Admin UI/Shell), authentication is automatically enabled and all requests will then require valid credentials.

Enabling Authentication

To enable authentication for weed mini, use one of the following methods:

  1. Environment Variables: Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY before starting.

export AWS_ACCESS_KEY_ID=any export AWS_SECRET_ACCESS_KEY=any export S3_ENDPOINT=http://localhost:8333 weed mini -dir=/data

2. **Config File**: Use the `-s3.config` flag with a JSON credentials file.
   ```bash
   weed mini -dir=/data -s3.config=s3.config
  1. Dynamic Configuration: Start normally, then add users through the Admin UI or weed shell. The server will automatically switch from "Allow All" to "Authentication Required" mode.

Using S3 Endpoint

Unauthenticated Access (Default)

If you haven't configured any credentials, you can use the S3 endpoint with the --no-sign-request flag in the AWS CLI:

# Create a bucket
aws --endpoint-url $S3_ENDPOINT s3 mb s3://my-bucket --no-sign-request

# List contents
aws --endpoint-url $S3_ENDPOINT s3 ls s3://my-bucket/ --no-sign-request

Authenticated Access

If you have configured credentials, you'll need to use your access keys:

# Using AWS CLI
aws configure
# AWS Access Key ID: <your-access-key>
# AWS Secret Access Key: <your-secret-key>

# Use the local endpoint
aws --endpoint-url $S3_ENDPOINT s3 ls s3://my-bucket/

Web Interfaces

Admin UI

  • URL: http://localhost:23646
  • Purpose: User/credential management, task monitoring, system status
  • No authentication by default (configurable)

Filer UI

  • URL: http://localhost:8888
  • Purpose: Hierarchical file system browser
  • View and manage files with directory structure

Master UI

  • URL: http://localhost:9333
  • Purpose: Cluster topology and volume management
  • Monitor volume distribution across servers

Common Options

# Specify data directory
weed mini -dir=/data

# Custom S3 port
weed mini -dir=/data -s3.port=8334

# Custom IAM config file
weed mini -dir=/data -s3.iam.config=/path/to/iam.json

Stopping the Server

# Press Ctrl+C in the terminal
# All services will gracefully shut down

Next Steps

Performance Considerations

The mini command is optimized for development and small deployments. For production workloads:

  • Separate components on different servers (see Production-Setup.md)
  • Increase volume size limits based on your needs
  • Use dedicated object storage for cloud integration
  • Configure replication for data safety
  • Set up monitoring and alerting