504 Error when trying to use Invoice Design

I have a fresh install on a dedicated CWP server using php 8.0 and am getting a 504 error when trying to customize an invoice. The UI just spins for about 30 sec and throws the error. I have turned of ModSecurity for this domain but still get the error. Here are the logs Im getting…

[2021-12-21 19:37:03] production.ERROR: file_get_contents(https://my.domain.com/public/storage/fw4Wqj2v0GFh5RabPTfxc1zQHjsEbsouGTDUZmmaMkpfUAh27AAjqAHUHeBkDe4n/x5WsyFtOeJMr9qWYNsBavTk42UAz9hGLYqqImGuD.png): Failed to open stream: Connection timed out {"userId":1,"exception":"[object] (ErrorException(code: 0): file_get_contents(https://my.domain.com/public/storage/fw4Wqj2v0GFh5RabPTfxc1zQHjsEbsouGTDUZmmaMkpfUAh27AAjqAHUHeBkDe4n/x5WsyFtOeJMr9qWYNsBavTk42UAz9hGLYqqImGuD.png): Failed to open stream: Connection timed out at /home/username/my.domain.com/app/Models/Presenters/CompanyPresenter.php:69)

Any help with this error?

FYI, I have another instance of Invoice Ninja v4 running on this server that works great.

Hi,

It may help to set LOCAL_DOWNLOAD=true in the .env file

https://invoiceninja.github.io/docs/env-variables/

Thank you! That was it. I can now see the Design preview. For anyone else seeing this, I did have to run the command “php artisan optimize” after I made the change to the .env file for it to work.

Thanks again hillel!