Run Floci Locally with Docker Compose
Run Floci with Docker Compose, point the AWS CLI to your local endpoint, preserve emulator data, and verify the setup with an S3 bucket.
Floci is a local emulator for AWS APIs. It lets developers exercise supported AWS workflows on a workstation or in a development environment without sending those requests to an AWS account. This guide runs Floci with Docker Compose, configures the AWS CLI to use its local endpoint, and verifies the setup with Amazon S3 commands.
Requirements
Install Docker Engine or Docker Desktop with Docker Compose v2. Floci’s current installation guide specifies Docker 23.0 or newer and the Compose v2 plugin. The standard Floci image is floci/floci:latest; the service listens on port 4566 by default. See the official installation guide for current platform requirements and image variants.
Define the Compose service
Create a directory for the lab, then add a compose.yaml file:
services:
floci:
image: floci/floci:latest
ports:
- "4566:4566"
environment:
FLOCI_STORAGE_MODE: hybrid
FLOCI_HOSTNAME: floci
volumes:
- ./data:/app/data
# Required only for services that start Docker containers.
- /var/run/docker.sock:/var/run/docker.sock
This configuration publishes Floci’s API at http://localhost:4566. FLOCI_STORAGE_MODE: hybrid keeps working state in memory and periodically writes it to disk. The bind mount maps the container’s /app/data directory to a local data directory so persisted state remains available when the container is recreated. Floci documents memory, persistent, hybrid, and wal storage modes in its configuration reference.
The Docker socket mount lets Floci start and manage additional containers for supported services such as Lambda and RDS. It is not needed for in-process services such as S3, SQS, or DynamoDB. Remove that mount if the lab does not use Docker-backed services. The socket grants access to the host’s Docker daemon, so use it only in a trusted local development environment.
Start Floci
From the directory containing compose.yaml, run:
docker compose up -d
Check the service logs if needed:
docker compose logs -f floci
Floci’s AWS-compatible endpoint is available at http://localhost:4566. The project README documents the endpoint and supported services.
Point the AWS CLI at Floci
Set local endpoint, region, and placeholder credentials in the shell where you will run AWS CLI commands:
export AWS_ENDPOINT_URL=http://localhost:4566
export AWS_DEFAULT_REGION=us-east-1
export AWS_ACCESS_KEY_ID=test
export AWS_SECRET_ACCESS_KEY=test
These values are for the local emulator. Do not reuse production credentials for a local lab. Floci accepts non-empty credentials by default; local credentials do not authenticate to AWS.
Verify with Amazon S3
Create a bucket and list the available buckets:
aws s3 mb s3://floci-learning-bucket
aws s3 ls
To verify object storage as well, upload a small file:
printf 'Floci local S3 check\n' > sample.txt
aws s3 cp sample.txt s3://floci-learning-bucket/sample.txt
aws s3 ls s3://floci-learning-bucket/
The AWS CLI and SDKs use the local endpoint when configured as above. Floci also supports explicit endpoint selection on individual AWS CLI commands with --endpoint-url http://localhost:4566.
Stop the service
Stop and remove the container while keeping the local data directory:
docker compose down
Start it again with docker compose up -d. To remove the persisted lab data, stop the service and delete the local data directory. Treat that as a reset: resources stored there will be lost.
What this setup is for
A local emulator is useful for learning service APIs, developing application integrations, and running repeatable tests without creating cloud resources. It does not reproduce every behavior or operational detail of AWS. Check Floci’s current service documentation for the services and behaviors relevant to a lab, and use an AWS account separately when practicing account configuration, IAM boundaries, billing controls, regional behavior, or deployments to the real service.