Hosting a Broker Daemon on the Cloud allows the user to offload resources and have a machine that is available 24/7. Although a self-hosted setup is ideal (avoids inherent security risks with 3rd parties managing your infrastructure), some users may prefer to run the Broker Daemon on a Cloud provider such as AWS. Below you will find a guide on how to setup a hosted Broker Daemon on AWS.
WARNING: Hosting the Broker Daemon on third party providers can expose you to risk as they will have access to your wallet/currency.
WARNING: Always examine scripts downloaded from the internet before running them on your server.
AWS setup guide
Launch an EC2 Instance
From your AWS EC2 console:
- Click on "Launch Instance"
- Select "Ubuntu Server 18.04 LTS (HVM), SSD Volume Type" 
- Select the "c5.xlarge" instance 
- Change the Root Volume to 400 GiB of Storage 
- Add any tags you want
- Set your security group  to have the following ports open:
- AWS SSH default (port 22, source of "Anywhere")
- TCP port range "10113-10114" with a source of "Anywhere" for "LND Inbound Connections"
- Launch it! 🚀
Install and configure Sparkswap
From here, you can follow the installation instructions for Sparkswap.
Downgrade your instance type
Once Sparkswap has been installed and all blockchains have been synced (In the Broker folder, check
docker-compose logs -f bitcoind to see the syncing progress, it should take about 24 hours) you may want to downgrade your instance type to one that is more cost effective.
Before downgrading your instance, you should ensure that you do not have any open orders or any funds committed to the Relayer.
To downgrade, you'll need to:
- Stop your instance (Actions > Instance State > Stop)
- Change your instance type (Actions > Instance Settings > Change Instance Type) "t3.medium" seems to be performant enough on an ongoing basis
- Start your instance (Actions > Instance State > Start)
- In your Broker folder, Re-create your docker-compose stack with the following command:
docker-compose up -d
You now have a functional sparkswap node hosted on AWS.
For more advanced help, please ask for assistance on Discord.
If you select a different image, the below steps may still work, but they were tested on the above image. ↩
Yes, it's a lot. We need to store the full blockchain for every chain on which you trade. ↩