# 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).
To follow this tutorial you will need:
- Docker Desktop (opens new window) and Docker Compose (opens new window) (preferably the latest versions)
- 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
# Powergate docker compose setup
To set up Powergate:
- Download the
powergate-docker-<version>.zipfrom the releases page (opens new window).
- Unzip the release, go into the created folder:
unzip powergate-docker-v*.zip cd powergate-docker-v*
- Expose port
8080on the go-ipfs daemon so that we can access the HTTP gateway. (We use the HTTP gateway to fetch the files in our browser)
- Open the docker-compose-localnet.yaml file in your favorite editor, and add
- 8080:8080in the
ipfs: ports: - 5001:5001 - 8080:8080
- Close the editor after making the change.
- Open the Docker Desktop (opens new window) and start Powergate using the provided Makefile:
BIGSECTORS=true make localnet
Powergate is now running.
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.