Hey can anyone guide me for the following:
1)install erpnext on fresh digital ocean ubuntu server 2) Connect domain name to that 3)then install ssl on that domain with auto renewal. 4) once domain is setup . Access via droplet IP will be disabled.
Note I don’t want one click install version that is availale on digital ocean but want to install using easy script of erp next
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi again :) As I mentioned in the previous answer, you would get the error installing ERPNext with MariaDB 10.5 (the most current and stable MariaDB version at the moment). Now I am going to explain a workaround for that problem. So, to install ERPNext with MariaDB 10.5 you need to perform all the steps as for version 10.4. The only difference is in the easy script parameter. The whole command would look like
The installation will be running for some time. You will be asked for creating the passwords for MariaDB root user and ERPNext Administrator in the meantime. Finally you will end with an error message looks like below and the installation will be stopped.
The cause of this problem is located in one of the MariaDB config files which was apparently added to version 10.5. The collation settings from that file overwrite the settings provided by easy install script. To fix that problem simply comment two lines in /etc/mysql/mariadb.conf.d/50-server.cnf, as it is shown below
Then, to return on installation path again, you need to do two things more.
1. Remove just created site directory.
You need to replace highlighted parts of the path with the values you provided as parameters to easy script:
--user
parameter--site
parameter2. Remove just created database. Log into database management interactive shell.
You will be asked for the password that you entered for MariaDB root user during the installation. After successful authentication you will get MariaDB/MySQL interactive shell prompt sign.
List existing databases.
The result will be similar to that
Remove the database with the name starting with underscore symbol
Exit the database management interactive shell
Then, you can restart your installation.
The installation should be done successfully now :)
Hi, Here is the really useful tutorial on the subject, however, the author made manual installation of most of the components: https://www.digitalocean.com/community/tutorials/how-to-install-an-erpnext-stack-on-ubuntu-18-04
But, if you want to get all process a bit simpler, and use easy install script, here are the steps.
1. Initial configuration. Follow the prerequisites, step 1 and 2 of the tutorial mentioned above. Do not forget to reboot the system after that.
2. ERPNext installation with easy install script. Download the script to your current location. It may be your home directory. You can remove the script after installation.
Run the script providing appropriate parameters
Explanation for some parameters.
--user
- user context which the application will be installed in. If the user does not exist in the system, script will create it.--mariadb-version
- it is obviously the version of MariaDB. Although the latest stable version is 10.5, I recommend installing version 10.4. You would get a problem installing ver. 10.5. I will describe the workaround for it in another answer to this post.--site
- specify your domain here. Domain must point at your droplet’s IP address. Domain will be automatically associated with ERPNext installation, and nginx server block will be configured with it, what actually meets one of your defined requirements.--verbose
- thanks to it you get a lot of information during installation what may be useful for troubleshooting possible problems.You will be asked for creating two passwords during the installation:
Keep both those passwords in safe place.
3. Securing the communication with Let’s Encrypt certificate.
It is quite likely you would like to access your application with more than one domain. Let’s assume that you would like to access it using both your.domain.info and www.your.domain.info. In such case, you need to modify ERPNext nginx server block configuration before installing a certificate. This server block configuration is contained in file /etc/nginx/conf.d/frappe-bench.conf. Find the server_name directive and modify it appropriately.
Check if syntax of nginx configuration is OK
Restart nginx service.
Ensure that you can access your ERPNext application with both your domains. If it is OK you can continue the installation.
To install Let’s Encrypt certificate you must install certbot first. So, install certbot’s repository
You will get a note, accept it pressing Enter.
Then, install certbot
Now you can obtain a certificate for your domain or domains. I included two domains in exemplary command below.
You will be asked for entering email address for sending notices on renewals. It is worthy to enter it. You may be also asked if you would like to redirect HTTP traffic to HTTPS. Agree to redirect.
If certificate installation is successful you will get info like
Installed certbot package takes care of certificate renewal process by adding a renew script to directory /etc/cron.d. You can run renewal test and check if it is going smoothly.
4. Disabling access to ERPNext via droplet’s IP address. To achieve that add the following server block configuration to the file /etc/nginx/conf.d/frappe-bench.conf.
Replace your-droplet-ip with corresponding IP address. You can also replace response code 444 (“Connection closed without response”) with the more appropriate one. The above configuration is related to HTTPS traffic. HTTP traffic was redirected to HTTPS by modifications done by certbot, so you do not have to do anything with that. You can just replace response code 404 with the one you like.
After the modifications check if syntax of nginx configuration is OK
Restart nginx service.
Now, you should have ERPNext installed, and have HTTPS access to it via your domain only, not via droplet’s IP address :)