Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattLoyeD/3077f2d7f2ceaa4edd0883d987daa02b to your computer and use it in GitHub Desktop.
Save MattLoyeD/3077f2d7f2ceaa4edd0883d987daa02b to your computer and use it in GitHub Desktop.
This script allow you to plot easely on chia blockchain (v1.0.1) with AWS S3 on your server. This is based on ubuntu 20.04 LTS.
# Please note :
# - This has only been tested on ubuntu 20.04
# - You need to create a S3 Bucket and IAM credentials securely
# - This is based on the fact that your user is named "ubuntu" which might not be your case
# - Plotting k 32 = 101 Go as far as I remember. 100 of K32 = 10 TB kind of.
# This was costing a 550$/month on S3 last time I checked.
aws_access_key=
aws_secret_key=
bucket_name=my_bucket_name
plot_type=32
plot_numbers=1
# We begin on your home as its more convenient :)
cd ~;
# modify these credentials with your AWS IAM credentials
echo $aws_acces_key:$aws_secret_key > ~/.passwd-s3fs
# install chia blockchain
sudo apt update -y
sudo apt install python3 git -y
python3.7 -m venv venv
ln -s venv/bin/activate
. ./activate
pip install --upgrade pip
pip install -i https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10
pip install chia-blockchain==1.0.1
# install S3 drive system
sudo apt-get update;
sudo apt-get install s3fs;
chmod 600 ~/.passwd-s3fs
mkdir ~/s3-bucket
s3fs $bucket_name ~/s3-bucket -o passwd_file=~/.passwd-s3fs
# lets prepare chia blockchain now
chia init
chia generate keys
chia plots create -k $plot_type -n $plot_numbers -t /home/ubuntu/chia/plots-tmp -2 /home/ubuntu/chia/plots-tmp -d ~/s3-bucket/plots-final
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment