ERPNext.com Frappe Cloud Support Partners Foundation

Installing ERPNext after using Frappe for some time

We have been using frappe for our ngo only for some time now (using docker-compose without bench) and would like to add the erpnext app.
I tried to edit the .env file with INSTALL_APPS=erpnext and did docker-compose pull followed by docker-compose --project-name project up -d
but erpnext is still not installed:
image
is it possible to install erpnext on top of frappe without bench?
if bench is really needed, can we still install it now without loosing our data?
thx in advance for your support.
Best,
Bernard

It is only possible if you’ve not yet run the wizard.

It needs fresh site with wizard yet to complete before you install ERPNext.

If you’ve fresh site, enter the erpnext-python container and execute bench --site sitename.domain.ltd install-app erpnext

Thank you!
Unfortunately I don’t have a fresh site.
And I don’t remember if I ran the wizard yet.
Shouldn’t it be possible to install custom apps on non-fresh sites? Why not to have the possibility to install erpnext then?

Try it.

ERPNext can’t be installed once setup wizard is run.
That’s part of frappe/ERPNext code and is has nothing to do with docker.

Add feature request in ERPNext that you want to install ERPNext after wizard is complete.

Also redeploying the docker-compose doesn’t reinstall anything. Site creator container only runs once, second time it’ll stop if it finds same site already existing.

To manipulate the existing site, you’ll need to enter the erpnext-python container and issue bench helper commands. Same can also be done by creating new containers with attached network and volumes from existing frappe_docker project

1 Like

unfortunately it seems that i ran the wizzard before:

frappe@01e36404ce48:~/frappe-bench/sites$ bench --site mysite.org install-app erpnext

Installing erpnext...
An error occurred while installing erpnext:
ERPNext can only be installed on a fresh site where the setup wizard is not completed.
You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 18, in <module>
    [sys.executable, bench_helper, 'frappe'] + sys.argv[1:],
  File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/frappe/frappe-bench/env/bin/python', '/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py', 'frappe', '--site', 'mysite.org', 'install-app', 'erpnext']' returned non-zero exit status 1.

What if I do some partial backup and then re-install the whole site (with ERPnext) and then partially restoring the backup?
do you think such a thing could work?

one possible solution is to start a fresh site including ERPNext and then import the metadata and data one by one.
let me know what are your thoughts :wink:
thx

How much data you added just in frappe cms?
What’s the data you’re trying to restore?

1 custom module with 3 doctypes each with about 600 entries; 2 of them are also linked.
we also have about 30 users
1 email domain/address configured for notifications
1 webpage as the landing page
1 custom script on 1 of the custom doctypes
is this feasible? do i need to recreate each doctype before the import? will i face loads of errors and incompatibilities?

If you have track of all these try “data export” - “data import”

Export the data, create new instance with ERPNext and then import it.

I think users will have to reset passwords, or if you’ve social login that’ll save rest passwords.

1 Like

is it possible to export/import the doctype metadata itself? or we need to re-create it manually?

If you have created the doctype as part of your custom app, installing the app will create the doctype metadata.

unfortunately the custom doctypes I have created directly under the frappe app :frowning:
is it a best practice to create a separate app for my custom doctypes?

Best practice, yes, but what revant_one outlined above should still be possible. Give it a try and let us know how it goes.

are you suggesting i create a new app and move the custom doctypes i have to this new app?
but then how do i export a specific app with its doctypes and then import them?

Try data export/import with the doctype doctype.

Filter it with “Custom” check box set.

To create custom app:

  • Take backup
  • Restore locally in development bench
  • create app, save the doctypes under your app, set it as standard

Go through basic Frappe framework tutorial for more information

1 Like

it seems very complicated to export/import every individual doctype dependencies :frowning: (i’ve tried it and failed miserably either because i am doing something wrong or because i’m insisting on the dependencies in order to guarantee logs and versions)

I have submitted this feature request: (in the hope that we will be able to use ERPNext using the same frappe installation soon)

P.S: We (local branch of the Lebanese Red Cross) are currently only using it for custom modules for recruitment, but we hope to be able to use it also for inventory management and other tasks.

I don’t know if you will get to install ERPNext with wizard complete.

Another workaround I can think of,

  • keep the current frappe server as your Authorization server.
  • install another ERPNext server and add your frappe server as social login key. OAuth 2 provider for Frappe Apps

With this your previous server continues to be live.
ERPNext server will login using the accounts from frappe server.

1 Like

thank you @revant_one,
unfortunately we can not afford to have a second server (at least not for now especially with the current economical crisis in Lebanon :frowning: )

Besides, we are looking to have all our work in one place; ERPNext: one platform to rule them all!

i was thinking maybe i could export the files of erpnext and install them the same way as other new apps, but then i will loose the automatic updates, no?
even if i choose to do that, i guess i will need to do some more research.
Worst case scenario i wait until some hero finds our feature-request and do it :wink:

just add a fresh site in same bench setup. Use the multi-tenant feature of frappe.

No need to setup one more server.

You won’t be able to keep frappe data and install ERPNext. You either reset everything and start fresh. Or add one more site for ERPNext.

Generally people pause when they see 3 step setup wizard instead of more steps that ERPNext has.