Go the API page and create a spaces key.
You will also need to have installed the s3Cmd installed. Once installed, configure it following the instructions in the oficial docs.
Create the bucket:
export DO_SPACES_BACKUP_BUCKET=stackgres-tutorial
s3cmd mb s3://${DO_SPACES_BACKUP_BUCKET}