Git Product home page Git Product logo

https-rpc's Introduction

https-RPC

how to set up a https RPC, using NGINX and Certbot.

Update System Packages

Frist, ensure that all packages are up to date. This can prevent security vulnerabilities.

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y

Install Monitoring and Web Server Tools.

sudo apt install -y glances

Install Nginx: A high-performance web server and a reverse proxy, often used for load balancing.

sudo apt install -y nginx

Configure UFW Firewall for Nginx: Make sure Nginx can receive HTTP and HTTPS traffic.

sudo ufw enable && \
sudo ufw allow 'Nginx HTTP' && \
sudo ufw allow 'Nginx HTTPS' && \
sudo ufw allow 22

Intall Certbot.

sudo apt-get install -y certbot python3-certbot-nginx

setup Certbot with your domain.

sudo certbot certonly --manual --preferred-challenges dns \
--email <your-email-address> \
-d <your-domain.abc>

Set Up Nginx Configuration

Remove Existing Nginx Configuration: sudo rm -rf /etc/nginx/nginx.conf

Edit New Configuration: Use a text editor like nano to create a new configuration file.

sudo nano /etc/nginx/nginx.conf

  • Replace the contents with your load balancer configuration. You can use the Example Nginx config as a starting point.

  • Modify RPC/LCD/gRPC server entries and domain names as required.

Test Nginx Configuration: Ensures your syntax is correct.

sudo nginx -t

Enable and Start Nginx: This will make sure Nginx starts on boot and starts running immediately.

sudo systemctl enable nginx && sudo systemctl start nginx

Finally, add a cronjob to crontab to enable auto-newing of the certificates:

crontab -e

Then, add:

0 12 * * * /usr/bin/certbot renew --quiet

https-rpc's People

Contributors

amis13 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.