I think I remember reading somewhere in the docs (I’ll try to find it) that for the multitenants to work, the currentsite.txt must be emptied.
And I think this is also not required in the sitename = URL scenario. I never see or set the site name in the site_config.json.
Is this also required for the add-domain scenario?
The bench add-domain command places the URL into the site_config.json and if you use it multiple times, then you will have multiple valid URLs available to the outside world (provided of course that you have setup up the DNS pointers).
Side Note…
I figured all of this out by building many different servers and experimenting with the configurations. While there was some documentation around back then, it was not always easy to find. So quite honestly, I encourage you to just try it out for yourself. Spin up a few servers and run the installs. Reconfigure them with your different ideas. It is easy to buy a URL for a few dollars and then make as many sub domains from it as you want to experiment on. The servers make a great sandbox for trying out the stuff you find on the forum. You may even still be able to get a bunch of free trial server time on Google Cloud Platform. If not, you can go to lowendbox.com and look for deals on cheap VPS. I have several of them right now that give me 4gb memory with 2 or 4 cpu KVM servers for less than $39US per year. I consider that my investment in learning more about how this all works.
You can read stuff on the forums or in old documentation for days on end, but actually trying it out is where the real learning happens.
I would certainly try it becasue this scenario will probably solve a problem for me in setting up a new client site. A too-eager client can open the site before it’s ready. So by assigning non-domain name to the site, it can’t be accessed until it’s ready and a bench add-domain is done to it.
Yep, works like a charm… thank you for the steps… however, i run into hurdles if I want to upgrade the version of ERPNext from say 13.4 to the latest 13.5… Bench update runs with the Pip warning, but when I login to the application, it is still on 13.4… Any tips? Pointers?
Did you use the “Reload” function to refresh the frappe-erpnext cache in the browser?
Click on your icon in the upper right corner of the screen and select “Reload” from the drop down list. After it resets, check the version number again.
Seems like I was doing it wrong. I had to cd to the frappe-bench folder before updating bench. Once I did it properly, it worked well… Thank you for responding
Edit the site_config.json for the site1.local site to delete the reference to the URL you wish to drop and save the file. (Be careful to keep the correct syntax for the file intact)
Then:
bench setup nginx
sudo service nginx reload
That will drop the URL assignment from the site. However, if your DNS pointers are still pointed to the site it may not stop the site login screen from being displayed. You will still be responsible for going to your DNS provider and changing the pointers manually.
Then using the previous instructions for adding a doman (URL) will let you finish the process of changing the URL assigned to the site.
Please do not let this be the only reason for joining the forum. Communities like this thrive only when we all contribute. So while you may not have anything to add to the community knowledge today, there may come a time when you learn something we had not considered. Please be sure to come back and tell us about your discoveries when they have the potential to help others.
That is what makes this community special.
Welcome aboard!! It is great to have you as part of our forum community.
I’m trying to install on a debian 11 vm. I am getting this error:
The full traceback is:
File “/tmp/ansible_apt_payload_0fn05pkt/main.py”, line 718, in install_deb
pkg = apt.debfile.DebPackage(deb_file)
File “/usr/lib/python3/dist-packages/apt/debfile.py”, line 65, in init
self.open(filename)
File “/usr/lib/python3/dist-packages/apt/debfile.py”, line 75, in open
self._debfile = apt_inst.DebFile(self.filename)
The full traceback is:
File “/tmp/ansible_apt_payload_0fn05pkt/main.py”, line 718, in install_deb
pkg = apt.debfile.DebPackage(deb_file)
File “/usr/lib/python3/dist-packages/apt/debfile.py”, line 65, in init
self.open(filename)
File “/usr/lib/python3/dist-packages/apt/debfile.py”, line 75, in open
self._debfile = apt_inst.DebFile(self.filename)
fatal: [localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“allow_unauthenticated”: false,
“autoclean”: false,
“autoremove”: false,
“cache_valid_time”: 0,
“deb”: “/tmp/wkhtmltox.deb”,
“default_release”: null,
“dpkg_options”: “force-confdef,force-confold”,
“force”: false,
“force_apt_get”: false,
“install_recommends”: null,
“only_upgrade”: false,
“package”: null,
“policy_rc_d”: null,
“purge”: false,
“state”: “present”,
“update_cache”: null,
“upgrade”: null
}
},
“msg”: “Unable to install package: E:Could not open file /tmp/wkhtmltox.deb - open (2: No such file or directory)”
}