Advertisement
byteflick

Install SSL Certificate for ERPNext

Dec 14th, 2023
963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.46 KB | Software | 0 0
  1. Subscribe my Youtube Channel and Support me
  2. https://youtube.com/@byteflick
  3.  
  4. After login check for any updates or upgrade on the server and reboot the server by executing this command.
  5.  
  6. sudo apt update && sudo apt upgrade && sudo reboot
  7.  
  8. Now login into your frappe main user.
  9.  
  10. sudo su erpnext
  11.  
  12. Now change the directory where you installed the frappe bench.
  13.  
  14. cd /home/erpnext/frappe-bench
  15.  
  16. Now connect your preferred domain which you want to access. For example, I want to access ERPnext with byteflick.shadefocus.com
  17.  
  18. So, first, add the A type record on your domain DNS. I am using cloudflare dns on my domain. We will now add the A record which will link the domain to our server IP.
  19.  
  20. I want to access the ERPNext with this URL if you want to use another URL change this name to your preferred URL.
  21.  
  22. Remember to turn off this proxy option otherwise, it will not work.
  23.  
  24. Now we will turn on the DNS support on our ERPNext by using this command.
  25.  
  26. bench config dns_multitenant on
  27.  
  28. Now we will use this command to connect our domain with our site.
  29.  
  30. bench setup add-domain yourdomain.com --site yoursitename
  31.  
  32. Change youdomain.com to your preferred URL which we added the A record on cloudflare or any other dns provider and change the yoursitename to your site where you want to connect the domain.
  33.  
  34. Now we will resetup the nginx configuration and restart nginx service.
  35.  
  36. bench setup nginx && sudo service nginx reload
  37.  
  38. Install packages that are important for letsencrypt SSL generation.
  39.  
  40. sudo snap install core
  41. sudo snap refresh core
  42. sudo snap install --classic certbot
  43. sudo ln -s /snap/bin/certbot /usr/bin/certbot
  44.  
  45. Now we will generate the SSL certificate by uing this command.
  46.  
  47. sudo certbot --nginx
  48.  
  49. Here type your email address where you want to receive important notices.
  50.  
  51. Type "Y" to agree with Terms and Conditions.
  52. Again type Y and press enter.
  53.  
  54. Now type the number where your domain is showing. My domain is showing on number 1. I will type 1 and press enter.
  55.  
  56. Now access your ERPNext with your domain on your browser.
  57.  
  58. Congratulations! We have successfully installed the SSL on the ERPNext on Linux server. So, that's all. I hope you have enjoyed my video. Do not forget to press the like button If you have not subscribed to my channel then please subscribe my channel and hit the bell icon to get the update on my latest videos.
  59.  
  60. If you want videos on any other topic then comment below. We will try our best to help you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement