Change Domain v5

Wanted to know how I could change the domain to invoice ninja
it is currently hosted on a virtual Linux server.
I want to change the domain from billing.example.com to billing.newsite.com

You should only need to change the APP_URL in your .env file

@david,

We switched today from docker to LXC and changed the URL at the same time.
The domain name is present in the “company” tables. Simply changing the variables doesn’t work.
You got issue downloading the invoice and accessing the logos.

Column :
portal_domain varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

Julien

Same issue here. Updated the domain in the .env but the logo URL points to the old domain and does not get updated. I’m also seeing several elements and issues because the domain hasn’t updated throughout the install. What futher steps ensure the URL is updated accross the install after changing it in the .env @david ?

You would need to reupload the logo.

The logo is stored as a full URL in the settings object.

Is this done for a reason? It would seem more versatile to have the logo uploaded to a directory and make reference to the current url set in the .env?

Eg. https://[siteurl]/sitelogo.jpg

Hello,

I would change the URL also. But it redirects the Invoice Portal to the old address. The APP_URL is the new domain.

Edit: only the generated Email shows the wrong URL
Edit2: found the settings

Hello,
Happy new Year :slight_smile:

I am new to invoiceNinja and I came here for this :smiley:

I was trying invoice ninja as self-hosted and backup procedure by using docker.
What I did for test is to backup the content of volumes(IN and Mariadb) and restore them fully in a new instance with own domain.

And indeed, the url of the logo was not displayed in the UI
Here are what I found :

  • The UI theme chose by user was not restored (dark style)
  • the logo was not displayed in UI, but the invoices tab can use them when generating invoice .
  • In mariadb, the path of the logo is stored in full as an URL,with old domain name
  • when I try to download the pdf of an invoice without generating a new one, it does not work, as it is pointing to the old domain name. so I need to regenerate the invoice

so, I suspect that all generated documents, uploaded documents, or anything that must be downloaded or is in storage folder may have the same issue. which is problematic in the long run.

For now, the only solution I see for a “working restore of a Backup with downloadable content” is to use the same domain.

I hope this will be fixed really soon, as for now it is not a blocking matter for me, but may be in the future.

one solution may be to force the regeneration of every document and reupload of logo by using the API and a script, if it is too risky to change the core of the application.

best regards