Preconfigure a new instance

Hello,

I’m using invoice ninja with docker in a self hosted variant. To speed up my local development environment, I’ld like to preconfigure/provision a newly created instance with some customized data like company, locale settings (e.g. timezone, datetime format) as well as options on invoice design structure (e.g. order of $company fields).

Is there any way for this?

  • The easiest way would be using an export method, but this seems to be limited to customers, invoices etc - not for the base configuration.
  • Maybe a mysql dump after one inital setup; which tables do I need to look for?
  • The env file seems pretty limited for this, or are there any further fields for a pre-provisioned setup?
  • Last but definately the longest way would be writing a PHP script and communicate with the API

Do you have any advices on this?

Hi,

The JSON import/export includes the data and settings. You could configure a blank company and export the JSON file, then when creating a new company you’d import the JSON file to load the settings.

Hello hillel,

thanks for the answer! I thought the type dropdown would just change the output format from CSV to JSON with the specific entity type. The JSON export is exactly what I looked for!

Hi Hillel,

Would importing JSON file into IN that already has existing Invoices/Clientes replace the current data?

Thanks

I don’t believe so but I haven’t tested it.