How to deploy a gun server
1. Launch an aws ec2 instance
-
go to aws ec2 console
-
click
Instances>Launch an instance -
Configure the instance according to the table below and create it
key value comment Instance Name my-gun-server Image Ubuntu Quick Start > Ubuntu > 64-bit(x86) Instance type t3.mediumrecommended -
Find the created instance named
my gun serverinInstancesand wait for the instance creation to complete -
Select the instance, find and click on the security group
Security groupsin theSecuritysection below -
Edit inbound rulesStart adding rules and save them.Type Source HTTP Anywhere-IPv4 HTTPS Anywhere-IPv4 HTTP Anywhere-IPv6 HTTPS Anywhere-IPv6 -
Select the instance, find and click
Connectto connect to the instance and entersudo - sto obtain root permissions
2. Deploy the latest version of gun relay peer
# Setup Gun Services
wget https://alpha.biz/app/scripts/deploy-gun-server.sh
bash ./deploy-gun-server.sh
systemctl daemon-reload
# gun service will start automatically after reboot
systemctl enable gun-server.service
# Start the gun service immediately
systemctl start gun-server.service