How to secure using SSL ERP next that is running in Docker in ubuntu 18.04

Hi. I bought a VPS server(ubuntu 18.04) that doesn’t provide SSL. and I deployERPNEXT using docker. If you know any steps that I can follow please guide me. thank you

1 Like

How did you deploy using docker?

The variations of production setups from docs come with letsencrypt configuration include. You’ve to setup the dns config with your domain registrar and set the appropriate environment variables to enable letsencrypt

How you are routing port 443 (SSL port) traffic to your docker?

hi revant_one

I Deployed it by watching a tutorial from YouTube ERPNext is a free, self hosted, open source ERP System that is Enterprise and Production ready. - YouTube its very easy to deploy it using docker but i was not able to secure it.

1 Like

I opened file name docker_compose.yml file routing information is listed over here.

I actually want to help but posting a youtube link to go and figure out yourself is kind of rude.
Still as I want to help…
According to your link, following is your entire stack infra.

Can you share your docker compose file? Don’t forget to remove any sensitive/privacy information while sharing here.

@jalajc I’m sorry for my text. sir. I thought It would help us since you asked me how did I deploy it on docker. I shared a screenshot as you requested. thank you

If this is your production system then don’t use edge tags
You need to change the .env file for changing site name and version tags

Share your .env file for at least relevant variables

1 Like

Use Traefik, like this GitHub - suodrazah/docker_swarm: A deployment method and collection of basic docker swarm stacks.

As can be seen from stack, any request from any IP (internal, external) on host port 80, 443 is handled by traefik
You may refer this link for validation of your ssl settings. (Refer option 2 if you want let’s encrypt SSL )

As @revant_one has requested, kindly validate your .env file for variables referred in your docker_compose.yml

If variables are correct in .env file I think it should work immediately.

1 Like

@revant_one hi sir, I’m having a problem exporting my DB to the local folder from VPS that is running in the docker container . how do we export the database and import it to localhost?

use docker cp command to get backups from containers to container host
backups are in sites volume, you can access it through /var/lib/docker/volumes as well

@revant_one I didn’t understand…sir I want to copy the database and download it to my localhost
pc and after I formated my VPS I want to import it again.

Check this Docker: Copying files from Docker container to host - Stack Overflow
Or refer the docker documentation for “docker cp” command