Now, that we have created our first site, we can access it on http://localhost:8000 in our browser.
bench allows you to create multiple sites and access them separately in
the browser on the same port. This is what we call multi-tenancy support in
To achieve that, we must disable the serving of the default site. Go back to
your terminal and delete the file
sites/currentsite.txt from the
$ rm sites/currentsite.txt
Now, you won't be able to access your site on http://localhost:8000.
Frappe will identify which site to serve by matching the hostname of the request
with the site name, so you should be able to access your site on
http://library.test:8000 but this won't work because
we have to tell our operating system that library.test should point to
localhost. To do that, you can add the following entry to your
This will map
localhost. Bench has a convenient command to do
$ bench --site library.test add-to-hosts
This will ask for your root password and will add an entry to your
Great, now you can access your site at http://library.test:8000. Congratulations for making it this far.