# Step 1 - Start Powergate docker compose scripts

The Powergate documentation (opens new window) describes several ways to set up the Powergate. For the purpose of this tutorial, the easiest and fastest way is to run a Docker + localnet setup. This configuration of Lotus runs a localnet at high speed, specifically designed local testing and development. It's easy to use via a localnet Docker compose configuration (opens new window).

# Requirements

To follow this tutorial you will need:

  1. Docker Desktop (opens new window) and Docker Compose (opens new window) (preferably the latest versions)
  2. Powergate docker compose files: The Powergate releases page (opens new window) includes bundled Docker Compose files that use appropriate Docker image versions of Powergate, Lotus, and IPFS. Check package-lock.json (opens new window) to see the appropriate release to download and run. Look for @textile/grpc-powergate-client. Its version number corresponds to the version of Powergate the underlying gRPC bindings were created from. For the following tutorial, the version is 0.0.1-beta.10.

# Powergate docker compose setup

To set up Powergate:

  1. Download the powergate-docker-<version>.zip from the releases page (opens new window).
  2. Unzip the release, go into the created folder:
unzip powergate-docker-v*.zip
cd powergate-docker-v*
  1. Expose port 8080 on the go-ipfs daemon so that we can access the HTTP gateway. (We use the HTTP gateway to fetch the files in our browser)
  2. Open the docker-compose-localnet.yaml file in your favorite editor, and add - 8080:8080 in the ports section of ipfs
ipfs:
  ports:
    - 5001:5001
    - 8080:8080
  1. Close the editor after making the change.
  2. Open the Docker Desktop (opens new window) and start Powergate using the provided Makefile:
BIGSECTORS=true make localnet

Powergate is now running.

TIP

Important note on BIGSECTORS: When running the localnet setup, the Lotus node is configured with a mocked sector builder, using either "small" or "big" sector sizes. The configuration has practical effects on the size of files you can store in the localnet and how quickly the storage deals will complete. Using BIGSECTORS=false limits storage to files of approximately 700 bytes and deals execute in 30-60 seconds. Using BIGSECTORS=true allows storage of files from 1Mb to 400Mb, but deals execute in 3-4 minutes. Be sure to choose the value that makes sense for your development scenario.