@chancegold
It seems you have missed the point of my directing you to the solution post.
Your problem has nothing to do with port 8000 or anything else like that.
Your problem has to do with wkhtmltopdf NOT paying attention to normal internal hosting conventions.
The solution post I pointed you toward was an example of a similar but different situation related to a self hosted instance on a local box, but the concept is identical.
The wkhtmltopdf package is looking for higher level hostnames in order to process and pass information.
YES, it does appear to sometimes work intermittently without any specific hostname identified, but that has more to do with information left in the browser buffers at the time of the request and NOT the actual internal workings of wkhtmltopdf.
You don’t have to believe me. But you should try it with the correct syntax before you poo poo it.
Also remember once you have added the corrections to the site_config.json you must also do:
bench setup nginx
sudo service nginx restart
All of my existing systems are hosted on various VPS providers. All of them are multitenant configured even if some only have one tenant. All of them are running lets encrypt certificates.
And all of them had some level of the same problem until I used the solution I pointed you toward.
Here is an example of one command I ran on one of my stores VPS servers:
bench --site jmistore.com set-config hostname “https://erp.jmistore.com”
bench setup nginx
sudo service nginx restart
(note: jmistore.com if a fake address and is only used here for demonstration purposes)
Again, you seem to have misread the intent of the solution. It was just an example of syntax. Once you build the correct syntax for your server situation and follow the rest of the nginx steps, you should have solved you problems as well. The wkhtmltopdf package will them be able to collect the css information, the custom format, letterhead, and data before building the PDF file. Everything here is related to the wkhtmltopdf package NOT playing by the same set of rules as the rest of ERPNext so you have to make sure you tell it where to find things in a language it understands. It only seems to understand hostnames internal to itself. (only tested on v10 and v11)
BKM