title
stringlengths 4
57
| url
stringlengths 44
128
| main_content_html
stringlengths 2.91k
176k
| main_content_str
stringlengths 108
36.4k
| main_content_md
stringlengths 409
85.2k
|
---|---|---|---|---|
Prerequisites
| https://frappeframework.com/docs/user/en/prerequisites | <div class="from-markdown ">
<div class="d-flex justify-content-between align-items-center">
<h1 class="wiki-title">Prerequisites
</h1>
<div class="dropdown wiki-options">
<div class="dropdown-toggle" type="button" role="button" id="wikiOptionsButton" data-toggle="dropdown" aria-label="Wiki Option Button" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical">
<circle cx="12" cy="12" r="1"></circle>
<circle cx="12" cy="5" r="1"></circle>
<circle cx="12" cy="19" r="1"></circle>
</svg>
</div>
<div class="dropdown-menu d-print-none" aria-labelledby="wikiOptionsButton">
<a class="dropdown-item edit-wiki-btn" href="#">Edit Page</a>
<a class="dropdown-item add-wiki-btn" href="#">New Page</a>
<a class="dropdown-item show-revisions" href="#" data-toggle="modal" data-target="#revisionsModal">
Revisions
</a>
<a class="dropdown-item show-page-settings" href="#" data-toggle="modal" data-target="#pageSettingsModal">
Page Settings
</a>
</div>
</div>
</div>
<div class="wiki-content">
<p>A list of resources to help you get started with building apps using Frappe.</p>
<h2 id="1-python">1. Python</h2>
<p>Frappe uses Python 3 for server-side programming. It is highly recommended to
learn Python before you start building apps with Frappe Framework.</p>
<p>Resources:</p>
<ol>
<li><a href="https://www.codecademy.com/learn/learn-python-3">Codecademy Tutorial for Python</a></li>
<li><a href="https://docs.python.org/3/tutorial/index.html">Official Python Tutorial</a></li>
</ol>
<h2 id="2-mariadb-postgres">2. MariaDB / Postgres</h2>
<p>To create database-driven apps with Frappe, you must understand the basics of
database management and common SQL queries.</p>
<p>Resources:</p>
<ol>
<li><a href="https://www.codecademy.com/learn/learn-sql">Codecademy Tutorial for SQL</a></li>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-perform-basic-queries-in-mysql-and-mariadb-on-a-cloud-server">A basic MySQL tutorial by DigitalOcean</a></li>
<li><a href="https://mariadb.com/kb/en/mariadb/documentation/getting-started/">Getting started with MariaDB</a></li>
</ol>
<h2 id="3-html-css">3. HTML / CSS</h2>
<p>If you want to build user interfaces using Frappe Framework, you will need to
learn basic HTML / CSS and the Bootstrap CSS Framework.</p>
<p>Resources:</p>
<ol>
<li><a href="https://www.codecademy.com/learn/learn-html-css">Codecademy Tutorial for HTML/CSS</a></li>
<li><a href="https://getbootstrap.com/getting-started/">Getting started with Bootstrap</a></li>
</ol>
<h2 id="4-javascript-jquery">4. JavaScript / jQuery</h2>
<p>To customize forms and create interactive user interfaces, you will have to
learn JavaScript and the library jQuery.</p>
<p>Resources:</p>
<ol>
<li><a href="https://javascript.info/">The Modern JavaScript Tutorial</a></li>
<li><a href="https://www.codecademy.com/learn/learn-javascript">Codecademy Tutorial for JavaScript</a></li>
<li><a href="https://www.codecademy.com/learn/jquery">Codecademy Tutorial for jQuery</a></li>
</ol>
<h2 id="5-jinja-templating">5. Jinja Templating</h2>
<p>For building Web Views and Print Templates, you will have to learn the Jinja
Templating language.</p>
<p>Resources:</p>
<ol>
<li><a href="https://jinja.palletsprojects.com/en/2.11.x/">Jinja Documentation</a></li>
</ol>
<h2 id="6-git-github">6. Git / GitHub</h2>
<p>Learn how to contribute to an open source project using Git and GitHub, two
great tools to help you manage your code and share it with others.</p>
<p>Resources:</p>
<ol>
<li><a href="https://try.github.io/">Basic Git Tutorial</a></li>
<li><a href="https://opensource.guide/how-to-contribute/">How to contribute to Open Source</a></li>
</ol>
<p>If you are comfortable with the basics of these tools, you are ready to build an
app with Frappe Framework.</p>
<p>Next: <a href="/docs/v14/user/en/tutorial/install-and-setup-bench">Create a Bench</a></p>
</div>
<input value="ac9f5e7579" class="d-none" name="wiki-page-name">
<div class="modal revisions-modal fade" id="revisionsModal" tabindex="-1" role="dialog" aria-labelledby="revisionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="d-flex flex-column">
<h5 class="modal-title revision-title" id="revisionsModalTitle">Prerequisites
</h5>
<span class="small text-muted revision-time">palkan edited 2 years ago</span>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="revision-content wiki-content">
<p>A list of resources to help you get started with building apps using Frappe.</p>
<h2 id="1-python">1. Python</h2>
<p>Frappe uses Python 3 for server-side programming. It is highly recommended to
learn Python before you start building apps with Frappe Framework.</p>
<p>Resources:</p>
<ol>
<li><a href="https://www.codecademy.com/learn/learn-python-3">Codecademy Tutorial for Python</a></li>
<li><a href="https://docs.python.org/3/tutorial/index.html">Official Python Tutorial</a></li>
</ol>
<h2 id="2-mariadb-postgres">2. MariaDB / Postgres</h2>
<p>To create database-driven apps with Frappe, you must understand the basics of
database management and common SQL queries.</p>
<p>Resources:</p>
<ol>
<li><a href="https://www.codecademy.com/learn/learn-sql">Codecademy Tutorial for SQL</a></li>
<li><a href="https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial">A basic MySQL tutorial by DigitalOcean</a></li>
<li><a href="https://mariadb.com/kb/en/mariadb/documentation/getting-started/">Getting started with MariaDB</a></li>
</ol>
<h2 id="3-html-css">3. HTML / CSS</h2>
<p>If you want to build user interfaces using Frappe Framework, you will need to
learn basic HTML / CSS and the Bootstrap CSS Framework.</p>
<p>Resources:</p>
<ol>
<li><a href="https://www.codecademy.com/learn/learn-html-css">Codecademy Tutorial for HTML/CSS</a></li>
<li><a href="https://getbootstrap.com/getting-started/">Getting started with Bootstrap</a></li>
</ol>
<h2 id="4-javascript-jquery">4. JavaScript / jQuery</h2>
<p>To customize forms and create interactive user interfaces, you will have to
learn JavaScript and the library jQuery.</p>
<p>Resources:</p>
<ol>
<li><a href="https://javascript.info/">The Modern JavaScript Tutorial</a></li>
<li><a href="https://www.codecademy.com/learn/learn-javascript">Codecademy Tutorial for JavaScript</a></li>
<li><a href="https://www.codecademy.com/learn/jquery">Codecademy Tutorial for jQuery</a></li>
</ol>
<h2 id="5-jinja-templating">5. Jinja Templating</h2>
<p>For building Web Views and Print Templates, you will have to learn the Jinja
Templating language.</p>
<p>Resources:</p>
<ol>
<li><a href="https://jinja.palletsprojects.com/en/2.11.x/">Jinja Documentation</a></li>
</ol>
<h2 id="6-git-github">6. Git / GitHub</h2>
<p>Learn how to contribute to an open source project using Git and GitHub, two
great tools to help you manage your code and share it with others.</p>
<p>Resources:</p>
<ol>
<li><a href="https://try.github.io/">Basic Git Tutorial</a></li>
<li><a href="https://opensource.guide/how-to-contribute/">How to contribute to Open Source</a></li>
</ol>
<p>If you are comfortable with the basics of these tools, you are ready to build an
app with Frappe Framework.</p>
<p>Next: <a href="/docs/v13/user/en/tutorial/install-and-setup-bench">Create a Bench</a></p>
</div>
</div>
<div class="modal-footer d-flex justify-content-between">
<button type="button" data-modal-button="previous" class="previous-revision btn btn-secondary btn-sm hide">Previous</button>
<button type="button" data-modal-button="next" class="next-revision btn btn-secondary btn-sm hide">Next</button>
</div>
</div>
</div>
</div>
<div class="modal page-settings-modal fade" id="pageSettingsModal" tabindex="-1" role="dialog" aria-labelledby="pageSettingsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title page-settings-title">Page Settings</h5>
<button type="button" class="d-block d-sm-none close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<div>
<label class="text-muted text-xs" for="pageRoute">Route</label>
<div class="flex align-items-center">
<div class="text-sm wiki-space-route-block" title="Wiki Space route (can't be modified)">
docs/
</div>
<input value="user/en/prerequisites" type="text" id="pageRoute" name="pageRoute" class="form-control" style="border-top-left-radius: 0; border-bottom-left-radius: 0;">
</div>
</div>
<div class="mt-4 flex align-content-center">
<input type="checkbox" id="pageHideOnSidebar" name="pageHideOnSidebar">
<label class="text-muted text-xs" for="pageHideOnSidebar">
Hide on Sidebar
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-modal-button="update" class="btn btn-primary btn-sm update-page-settings-button">
Update
</button>
</div>
</div>
</div>
</div>
</div> | Prerequisites
A list of resources to help you get started with building apps using Frappe.
1. Python
Frappe uses Python 3 for server-side programming. It is highly recommended to learn Python before you start building apps with Frappe Framework.
Resources:
Codecademy Tutorial for Python
Official Python Tutorial
2. MariaDB / Postgres
To create database-driven apps with Frappe, you must understand the basics of database management and common SQL queries.
Resources:
Codecademy Tutorial for SQL
A basic MySQL tutorial by DigitalOcean
Getting started with MariaDB
3. HTML / CSS
If you want to build user interfaces using Frappe Framework, you will need to learn basic HTML / CSS and the Bootstrap CSS Framework.
Resources:
Codecademy Tutorial for HTML/CSS
Getting started with Bootstrap
4. JavaScript / jQuery
To customize forms and create interactive user interfaces, you will have to learn JavaScript and the library jQuery.
Resources:
The Modern JavaScript Tutorial
Codecademy Tutorial for JavaScript
Codecademy Tutorial for jQuery
5. Jinja Templating
For building Web Views and Print Templates, you will have to learn the Jinja Templating language.
Resources:
Jinja Documentation
6. Git / GitHub
Learn how to contribute to an open source project using Git and GitHub, two great tools to help you manage your code and share it with others.
Resources:
Basic Git Tutorial
How to contribute to Open Source
If you are comfortable with the basics of these tools, you are ready to build an app with Frappe Framework.
Next: Create a Bench | # Prerequisites
Edit Page New Page Revisions Page Settings
A list of resources to help you get started with building apps using Frappe.
## 1\. Python
Frappe uses Python 3 for server-side programming. It is highly recommended to
learn Python before you start building apps with Frappe Framework.
Resources:
1. [Codecademy Tutorial for Python](https://www.codecademy.com/learn/learn-python-3)
2. [Official Python Tutorial](https://docs.python.org/3/tutorial/index.html)
## 2\. MariaDB / Postgres
To create database-driven apps with Frappe, you must understand the basics of
database management and common SQL queries.
Resources:
1. [Codecademy Tutorial for SQL](https://www.codecademy.com/learn/learn-sql)
2. [A basic MySQL tutorial by DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-perform-basic-queries-in-mysql-and-mariadb-on-a-cloud-server)
3. [Getting started with MariaDB](https://mariadb.com/kb/en/mariadb/documentation/getting-started/)
## 3\. HTML / CSS
If you want to build user interfaces using Frappe Framework, you will need to
learn basic HTML / CSS and the Bootstrap CSS Framework.
Resources:
1. [Codecademy Tutorial for HTML/CSS](https://www.codecademy.com/learn/learn-html-css)
2. [Getting started with Bootstrap](https://getbootstrap.com/getting-started/)
## 4\. JavaScript / jQuery
To customize forms and create interactive user interfaces, you will have to
learn JavaScript and the library jQuery.
Resources:
1. [The Modern JavaScript Tutorial](https://javascript.info/)
2. [Codecademy Tutorial for JavaScript](https://www.codecademy.com/learn/learn-javascript)
3. [Codecademy Tutorial for jQuery](https://www.codecademy.com/learn/jquery)
## 5\. Jinja Templating
For building Web Views and Print Templates, you will have to learn the Jinja
Templating language.
Resources:
1. [Jinja Documentation](https://jinja.palletsprojects.com/en/2.11.x/)
## 6\. Git / GitHub
Learn how to contribute to an open source project using Git and GitHub, two
great tools to help you manage your code and share it with others.
Resources:
1. [Basic Git Tutorial](https://try.github.io/)
2. [How to contribute to Open Source](https://opensource.guide/how-to-contribute/)
If you are comfortable with the basics of these tools, you are ready to build
an app with Frappe Framework.
Next: [Create a Bench](/docs/v14/user/en/tutorial/install-and-setup-bench)
##### Prerequisites
palkan edited 2 years ago
Γ
A list of resources to help you get started with building apps using Frappe.
## 1\. Python
Frappe uses Python 3 for server-side programming. It is highly recommended to
learn Python before you start building apps with Frappe Framework.
Resources:
1. [Codecademy Tutorial for Python](https://www.codecademy.com/learn/learn-python-3)
2. [Official Python Tutorial](https://docs.python.org/3/tutorial/index.html)
## 2\. MariaDB / Postgres
To create database-driven apps with Frappe, you must understand the basics of
database management and common SQL queries.
Resources:
1. [Codecademy Tutorial for SQL](https://www.codecademy.com/learn/learn-sql)
2. [A basic MySQL tutorial by DigitalOcean](https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial)
3. [Getting started with MariaDB](https://mariadb.com/kb/en/mariadb/documentation/getting-started/)
## 3\. HTML / CSS
If you want to build user interfaces using Frappe Framework, you will need to
learn basic HTML / CSS and the Bootstrap CSS Framework.
Resources:
1. [Codecademy Tutorial for HTML/CSS](https://www.codecademy.com/learn/learn-html-css)
2. [Getting started with Bootstrap](https://getbootstrap.com/getting-started/)
## 4\. JavaScript / jQuery
To customize forms and create interactive user interfaces, you will have to
learn JavaScript and the library jQuery.
Resources:
1. [The Modern JavaScript Tutorial](https://javascript.info/)
2. [Codecademy Tutorial for JavaScript](https://www.codecademy.com/learn/learn-javascript)
3. [Codecademy Tutorial for jQuery](https://www.codecademy.com/learn/jquery)
## 5\. Jinja Templating
For building Web Views and Print Templates, you will have to learn the Jinja
Templating language.
Resources:
1. [Jinja Documentation](https://jinja.palletsprojects.com/en/2.11.x/)
## 6\. Git / GitHub
Learn how to contribute to an open source project using Git and GitHub, two
great tools to help you manage your code and share it with others.
Resources:
1. [Basic Git Tutorial](https://try.github.io/)
2. [How to contribute to Open Source](https://opensource.guide/how-to-contribute/)
If you are comfortable with the basics of these tools, you are ready to build
an app with Frappe Framework.
Next: [Create a Bench](/docs/v13/user/en/tutorial/install-and-setup-bench)
Previous Next
##### Page Settings
Γ
Route
docs/
Hide on Sidebar
Update
|
Installation | https://frappeframework.com/docs/user/en/installation | <div class="from-markdown ">
<div class="d-flex justify-content-between align-items-center">
<h1 class="wiki-title">Installation</h1>
<div class="dropdown wiki-options">
<div class="dropdown-toggle" type="button" role="button" id="wikiOptionsButton" data-toggle="dropdown" aria-label="Wiki Option Button" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical">
<circle cx="12" cy="12" r="1"></circle>
<circle cx="12" cy="5" r="1"></circle>
<circle cx="12" cy="19" r="1"></circle>
</svg>
</div>
<div class="dropdown-menu d-print-none" aria-labelledby="wikiOptionsButton">
<a class="dropdown-item edit-wiki-btn" href="#">Edit Page</a>
<a class="dropdown-item add-wiki-btn" href="#">New Page</a>
<a class="dropdown-item show-revisions" href="#" data-toggle="modal" data-target="#revisionsModal">
Revisions
</a>
<a class="dropdown-item show-page-settings" href="#" data-toggle="modal" data-target="#pageSettingsModal">
Page Settings
</a>
</div>
</div>
</div>
<div class="wiki-content">
<div><blockquote><p>These steps assume you want to install Bench in developer mode. If you want install in production mode, follow the <a href="https://github.com/frappe/bench#installation" rel="noopener noreferrer nofollow" target="_blank">latest recommended installation methods</a>.</p></blockquote><h2>System Requirements</h2><p>This guide assumes you are using a personal computer, VPS or a bare-metal server. You also need to be on a *nix system, so any Linux Distribution and MacOS is supported. However, we officially support only the following distributions.</p><ol><li><p><a class="active" href="#macos" rel="noopener noreferrer nofollow" target="_blank">MacOS</a></p></li><li><p><a class="active" href="#debian-ubuntu" rel="noopener noreferrer nofollow" target="_blank">Debian / Ubuntu</a></p></li></ol><blockquote><p>Learn more about the architecture <a href="/docs/v14/user/en/basics/architecture" rel="noopener noreferrer nofollow" target="_blank">here</a>.</p></blockquote><h2>Pre-requisites</h2><pre><code><span class="hljs-attr">Version 13:</span>
<span class="hljs-string">Python</span> <span class="hljs-number">3.7</span> <span class="hljs-string">or</span> <span class="hljs-string">Python</span> <span class="hljs-number">3.8</span>
<span class="hljs-string">Node.js</span> <span class="hljs-number">14</span>
<span class="hljs-string">MariaDB</span> <span class="hljs-number">10.3</span><span class="hljs-string">+</span>
<span class="hljs-attr">Version 14:</span>
<span class="hljs-string">Python</span> <span class="hljs-number">3.10</span> <span class="hljs-string">or</span> <span class="hljs-string">Python</span> <span class="hljs-number">3.11</span>
<span class="hljs-string">Node.js</span> <span class="hljs-number">14</span> <span class="hljs-string">or</span> <span class="hljs-number">16</span>
<span class="hljs-string">MariaDB</span> <span class="hljs-number">10.6</span><span class="hljs-number">.6</span><span class="hljs-string">+</span>
<span class="hljs-attr">Version 15/Nightly:</span>
<span class="hljs-string">Python</span> <span class="hljs-number">3.10</span> <span class="hljs-string">or</span> <span class="hljs-string">Python</span> <span class="hljs-number">3.11</span>
<span class="hljs-string">Node.js</span> <span class="hljs-number">18</span>
<span class="hljs-string">MariaDB</span> <span class="hljs-number">10.6</span><span class="hljs-number">.6</span><span class="hljs-string">+</span>
<span class="hljs-attr">Common for all Frappe versions:</span>
<span class="hljs-string">Redis</span> <span class="hljs-number">6</span> <span class="hljs-string">(caching</span> <span class="hljs-string">and</span> <span class="hljs-string">realtime</span> <span class="hljs-string">updates)</span>
<span class="hljs-string">yarn</span> <span class="hljs-number">1.12</span><span class="hljs-string">+</span> <span class="hljs-string">(js</span> <span class="hljs-string">dependency</span> <span class="hljs-string">manager)</span>
<span class="hljs-string">pip</span> <span class="hljs-number">20</span><span class="hljs-string">+</span> <span class="hljs-string">(py</span> <span class="hljs-string">dependency</span> <span class="hljs-string">manager)</span>
<span class="hljs-string">wkhtmltopdf</span> <span class="hljs-string">(version</span> <span class="hljs-number">0.12</span><span class="hljs-number">.5</span> <span class="hljs-string">with</span> <span class="hljs-string">patched</span> <span class="hljs-string">qt)</span> <span class="hljs-string">(for</span> <span class="hljs-string">pdf</span> <span class="hljs-string">generation)</span>
<span class="hljs-string">cron</span> <span class="hljs-string">(bench's</span> <span class="hljs-attr">scheduled jobs:</span> <span class="hljs-string">automated</span> <span class="hljs-string">certificate</span> <span class="hljs-string">renewal,</span> <span class="hljs-string">scheduled</span> <span class="hljs-string">backups)</span>
<span class="hljs-string">NGINX</span> <span class="hljs-string">(proxying</span> <span class="hljs-string">multitenant</span> <span class="hljs-string">sites</span> <span class="hljs-string">in</span> <span class="hljs-string">production)</span>
<br class="ProseMirror-trailingBreak"></code></pre><h3>MacOS</h3><p>Install command line version of Xcode tools.</p><pre><code>xcode-<span class="hljs-built_in">select</span> <span class="hljs-comment">--install</span></code></pre><p>Install <a href="https://brew.sh/" rel="noopener noreferrer nofollow" target="_blank">Homebrew</a>. It makes it easy to install packages on macOS.</p><pre><code>/bin/bash -c <span class="hljs-string">"</span><span class="hljs-string hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span><span class="hljs-string">"</span></code></pre><p>Now, you can easily install the required packages by running the following command</p><pre><code>brew install python<span class="hljs-variable">@3</span><span class="hljs-number">.10</span> git redis mariadb<span class="hljs-variable">@10</span><span class="hljs-number">.6</span> node<span class="hljs-variable">@14</span>
brew install <span class="hljs-comment">--cask wkhtmltopdf</span></code></pre><p>Now, edit the MariaDB configuration file (this step is not required for Frappe v15.21.0 or above).</p><pre><code>nano /usr/local/etc/my.cnf</code></pre><p>For Apple silicon, the path for the MariaDB config is</p><pre><code>nano /opt/homebrew/etc/my.cnf</code></pre><p>And add this configuration</p><pre><code><span class="hljs-section">[mysqld]</span>
<span class="hljs-attr">character-set-client-handshake</span> = <span class="hljs-literal">FALSE</span>
<span class="hljs-attr">character-set-server</span> = utf8mb4
<span class="hljs-attr">collation-server</span> = utf8mb4_unicode_ci
<span class="hljs-attr">bind-address</span> = <span class="hljs-number">127.0</span>.<span class="hljs-number">0.1</span>
<span class="hljs-section">[mysql]</span>
<span class="hljs-attr">default-character-set</span> = utf8mb4</code></pre><p>Now, just restart the mysql service and you are good to go.</p><pre><code>brew services restart mariadb<span class="hljs-keyword">@10</span>.6</code></pre><p><strong>Install Yarn</strong></p><p>Install yarn using npm</p><pre><code>npm install -g yarn</code></pre><h3>Debian / Ubuntu</h3><p>Install <code>git</code>, <code>python</code>, and <code>redis</code></p><pre><code>sudo apt install git python-dev python-pip redis-server</code></pre><p><strong>Install MariaDB</strong></p><pre><code>sudo apt install software-properties-common</code></pre><p>If you are on Ubuntu version older than 20.04, run this before installing MariaDB:</p><pre><code>sudo apt-key adv --<span class="hljs-keyword">recv</span>-<span class="hljs-keyword">keys</span> --keyserver hkp:<span class="hljs-regexp">//</span>keyserver.ubuntu.com:<span class="hljs-number">80</span> <span class="hljs-number">0xF1656F24C74CD1D8</span>
sudo add-apt-repository <span class="hljs-string">'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'</span></code></pre><p>If you are on version Ubuntu 20.04, then MariaDB is available in default repo and you can directly run the below commands to install it:</p><pre><code>sudo apt<span class="hljs-operator">-</span><span class="hljs-keyword">get</span> <span class="hljs-keyword">update</span>
sudo apt<span class="hljs-operator">-</span><span class="hljs-keyword">get</span> install mariadb<span class="hljs-operator">-</span>server</code></pre><p>During this installation you'll be prompted to set the MySQL root password. If you are not prompted, you'll have to initialize the MySQL server setup yourself. You can do that by running the command:</p><pre><code>mysql_secure_installation</code></pre><blockquote><p>Remember: only run it if you're not prompted the password during setup.</p></blockquote><p>It is really important that you remember this password, since it'll be useful later on. You'll also need the MySQL database development files.</p><pre><code>apt-get install mariadb-client<span class="hljs-number">-10.3</span></code></pre><p>Now, edit the MariaDB configuration file (this step is not required for Frappe v15.21.0 or above).</p><pre><code>nano /etc/mysql/my.cnf</code></pre><p>And add this configuration</p><pre><code><span class="hljs-section">[mysqld]</span>
<span class="hljs-attr">character-set-client-handshake</span> = <span class="hljs-literal">FALSE</span>
<span class="hljs-attr">character-set-server</span> = utf8mb4
<span class="hljs-attr">collation-server</span> = utf8mb4_unicode_ci
<span class="hljs-section">[mysql]</span>
<span class="hljs-attr">default-character-set</span> = utf8mb4</code></pre><p>Now, just restart the mysql service and you are good to go.</p><pre><code>service mysql restart</code></pre><p><strong>Install Node</strong></p><p>We recommend installing node using <a href="https://github.com/creationix/nvm" rel="noopener noreferrer nofollow" target="_blank">nvm</a></p><pre><code>curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash</code></pre><p>After nvm is installed, you may have to close your terminal and open another one. Now run the following command to install node.</p><pre><code>nvm install 14</code></pre><p>Verify the installation, by running:</p><pre><code>node -v
<span class="hljs-meta"># output</span>
v14<span class="hljs-number">.17</span><span class="hljs-number">.2</span></code></pre><p>Finally, install <code>yarn</code> using <code>npm</code></p><pre><code>npm install -g yarn</code></pre><p><strong>Install wkhtmltopdf</strong></p><pre><code>apt-get install xvfb libfontconfig</code></pre><p>Download and install wkhtmltopdf package from <a href="https://wkhtmltopdf.org/downloads.html" rel="noopener noreferrer nofollow" target="_blank">https://wkhtmltopdf.org/downloads.html</a></p><pre><code>dpkg -<span class="hljs-selector-tag">i</span> wkhtmltox_file<span class="hljs-selector-class">.deb</span></code></pre><h2>Install Bench CLI</h2><p>Install bench via pip3</p><pre><code>pip3 install frappe-bench</code></pre><p>Confirm the bench installation by checking version</p><pre><code>bench <span class="hljs-comment">--version</span>
# <span class="hljs-built_in">output</span>
<span class="hljs-number">5.2</span><span class="hljs-number">.1</span></code></pre><p>Create your first bench folder.</p><pre><code><span class="hljs-built_in">cd</span> ~
bench init frappe-bench</code></pre><p>After the frappe-bench folder is created, change your directory to it and run this command</p><pre><code>bench <span class="hljs-keyword">start</span></code></pre><p>Congratulations, you have installed bench on to your system.</p></div>
</div>
<input value="27269c239b" class="d-none" name="wiki-page-name">
<div class="modal revisions-modal fade" id="revisionsModal" tabindex="-1" role="dialog" aria-labelledby="revisionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="d-flex flex-column">
<h5 class="modal-title revision-title" id="revisionsModalTitle">Installation</h5>
<span class="small text-muted revision-time">akhil edited 1 month ago</span>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="revision-content wiki-content">
<div markdown="1"><blockquote><p>These steps assume you want to install Bench in developer mode. If you want install in production mode, follow the <a target="_blank" rel="noopener noreferrer nofollow" href="https://github.com/frappe/bench#installation">latest recommended installation methods</a>.</p></blockquote><h2>System Requirements</h2><p>This guide assumes you are using a personal computer, VPS or a bare-metal server. You also need to be on a *nix system, so any Linux Distribution and MacOS is supported. However, we officially support only the following distributions.</p><ol><li><p><a target="_blank" rel="noopener noreferrer nofollow" class="active" href="#macos">MacOS</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow" class="active" href="#debian-ubuntu">Debian / Ubuntu</a></p></li></ol><blockquote><p>Learn more about the architecture <a target="_blank" rel="noopener noreferrer nofollow" href="/docs/v14/user/en/basics/architecture">here</a>.</p></blockquote><h2>Pre-requisites</h2><pre><code><span class="hljs-attr">Version 13:</span>
<span class="hljs-string">Python</span> <span class="hljs-number">3.7</span> <span class="hljs-string">or</span> <span class="hljs-string">Python</span> <span class="hljs-number">3.8</span>
<span class="hljs-string">Node.js</span> <span class="hljs-number">14</span>
<span class="hljs-string">MariaDB</span> <span class="hljs-number">10.3</span><span class="hljs-string">+</span>
<span class="hljs-attr">Version 14:</span>
<span class="hljs-string">Python</span> <span class="hljs-number">3.10</span> <span class="hljs-string">or</span> <span class="hljs-string">Python</span> <span class="hljs-number">3.11</span>
<span class="hljs-string">Node.js</span> <span class="hljs-number">14</span> <span class="hljs-string">or</span> <span class="hljs-number">16</span>
<span class="hljs-string">MariaDB</span> <span class="hljs-number">10.6</span><span class="hljs-number">.6</span><span class="hljs-string">+</span>
<span class="hljs-attr">Version 15/Nightly:</span>
<span class="hljs-string">Python</span> <span class="hljs-number">3.10</span> <span class="hljs-string">or</span> <span class="hljs-string">Python</span> <span class="hljs-number">3.11</span>
<span class="hljs-string">Node.js</span> <span class="hljs-number">18</span>
<span class="hljs-string">MariaDB</span> <span class="hljs-number">10.6</span><span class="hljs-number">.6</span><span class="hljs-string">+</span>
<span class="hljs-attr">Common for all Frappe versions:</span>
<span class="hljs-string">Redis</span> <span class="hljs-number">6</span> <span class="hljs-string">(caching</span> <span class="hljs-string">and</span> <span class="hljs-string">realtime</span> <span class="hljs-string">updates)</span>
<span class="hljs-string">yarn</span> <span class="hljs-number">1.12</span><span class="hljs-string">+</span> <span class="hljs-string">(js</span> <span class="hljs-string">dependency</span> <span class="hljs-string">manager)</span>
<span class="hljs-string">pip</span> <span class="hljs-number">20</span><span class="hljs-string">+</span> <span class="hljs-string">(py</span> <span class="hljs-string">dependency</span> <span class="hljs-string">manager)</span>
<span class="hljs-string">wkhtmltopdf</span> <span class="hljs-string">(version</span> <span class="hljs-number">0.12</span><span class="hljs-number">.5</span> <span class="hljs-string">with</span> <span class="hljs-string">patched</span> <span class="hljs-string">qt)</span> <span class="hljs-string">(for</span> <span class="hljs-string">pdf</span> <span class="hljs-string">generation)</span>
<span class="hljs-string">cron</span> <span class="hljs-string">(bench's</span> <span class="hljs-attr">scheduled jobs:</span> <span class="hljs-string">automated</span> <span class="hljs-string">certificate</span> <span class="hljs-string">renewal,</span> <span class="hljs-string">scheduled</span> <span class="hljs-string">backups)</span>
<span class="hljs-string">NGINX</span> <span class="hljs-string">(proxying</span> <span class="hljs-string">multitenant</span> <span class="hljs-string">sites</span> <span class="hljs-string">in</span> <span class="hljs-string">production)</span>
<br class="ProseMirror-trailingBreak"></code></pre><h3>MacOS</h3><p>Install command line version of Xcode tools.</p><pre><code>xcode-<span class="hljs-built_in">select</span> <span class="hljs-comment">--install</span></code></pre><p>Install <a target="_blank" rel="noopener noreferrer nofollow" href="https://brew.sh/">Homebrew</a>. It makes it easy to install packages on macOS.</p><pre><code>/bin/bash -c <span class="hljs-string">"</span><span class="hljs-string hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span><span class="hljs-string">"</span></code></pre><p>Now, you can easily install the required packages by running the following command</p><pre><code>brew install python<span class="hljs-variable">@3</span><span class="hljs-number">.10</span> git redis mariadb<span class="hljs-variable">@10</span><span class="hljs-number">.6</span> node<span class="hljs-variable">@14</span>
brew install <span class="hljs-comment">--cask wkhtmltopdf</span></code></pre><p>Now, edit the MariaDB configuration file (this step is not required for Frappe v15.21.0 or above).</p><pre><code>nano /usr/local/etc/my.cnf</code></pre><p>For Apple silicon, the path for the MariaDB config is</p><pre><code>nano /opt/homebrew/etc/my.cnf
<br class="ProseMirror-trailingBreak"></code></pre><p>And add this configuration</p><pre><code><span class="hljs-section">[mysqld]</span>
<span class="hljs-attr">character-set-client-handshake</span> = <span class="hljs-literal">FALSE</span>
<span class="hljs-attr">character-set-server</span> = utf8mb4
<span class="hljs-attr">collation-server</span> = utf8mb4_unicode_ci
<span class="hljs-attr">bind-address</span> = <span class="hljs-number">127.0</span>.<span class="hljs-number">0.1</span>
<span class="hljs-section">[mysql]</span>
<span class="hljs-attr">default-character-set</span> = utf8mb4</code></pre><p>Now, just restart the mysql service and you are good to go.</p><pre><code>brew services restart mariadb<span class="hljs-keyword">@10</span>.6</code></pre><p><strong>Install Yarn</strong></p><p>Install yarn using npm</p><pre><code>npm install -g yarn</code></pre><h3>Debian / Ubuntu</h3><p>Install <code>git</code>, <code>python</code>, and <code>redis</code></p><pre><code>sudo apt install git python-dev python-pip redis-server</code></pre><p><strong>Install MariaDB</strong></p><pre><code>sudo apt install software-properties-common</code></pre><p>If you are on Ubuntu version older than 20.04, run this before installing MariaDB:</p><pre><code>sudo apt-key adv --<span class="hljs-keyword">recv</span>-<span class="hljs-keyword">keys</span> --keyserver hkp:<span class="hljs-regexp">//</span>keyserver.ubuntu.com:<span class="hljs-number">80</span> <span class="hljs-number">0xF1656F24C74CD1D8</span>
sudo add-apt-repository <span class="hljs-string">'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'</span></code></pre><p>If you are on version Ubuntu 20.04, then MariaDB is available in default repo and you can directly run the below commands to install it:</p><pre><code>sudo apt<span class="hljs-operator">-</span><span class="hljs-keyword">get</span> <span class="hljs-keyword">update</span>
sudo apt<span class="hljs-operator">-</span><span class="hljs-keyword">get</span> install mariadb<span class="hljs-operator">-</span>server</code></pre><p>During this installation you'll be prompted to set the MySQL root password. If you are not prompted, you'll have to initialize the MySQL server setup yourself. You can do that by running the command:</p><pre><code>mysql_secure_installation</code></pre><blockquote><p>Remember: only run it if you're not prompted the password during setup.</p></blockquote><p>It is really important that you remember this password, since it'll be useful later on. You'll also need the MySQL database development files.</p><pre><code>apt-get install mariadb-client<span class="hljs-number">-10.3</span></code></pre><p>Now, edit the MariaDB configuration file.</p><pre><code>nano /etc/mysql/my.cnf</code></pre><p>And add this configuration</p><pre><code><span class="hljs-section">[mysqld]</span>
<span class="hljs-attr">character-set-client-handshake</span> = <span class="hljs-literal">FALSE</span>
<span class="hljs-attr">character-set-server</span> = utf8mb4
<span class="hljs-attr">collation-server</span> = utf8mb4_unicode_ci
<span class="hljs-section">[mysql]</span>
<span class="hljs-attr">default-character-set</span> = utf8mb4</code></pre><p>Now, just restart the mysql service and you are good to go.</p><pre><code>service mysql restart</code></pre><p><strong>Install Node</strong></p><p>We recommend installing node using <a target="_blank" rel="noopener noreferrer nofollow" href="https://github.com/creationix/nvm">nvm</a></p><pre><code>curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash</code></pre><p>After nvm is installed, you may have to close your terminal and open another one. Now run the following command to install node.</p><pre><code>nvm install 14</code></pre><p>Verify the installation, by running:</p><pre><code>node -v
<span class="hljs-meta"># output</span>
v14<span class="hljs-number">.17</span><span class="hljs-number">.2</span></code></pre><p>Finally, install <code>yarn</code> using <code>npm</code></p><pre><code>npm install -g yarn</code></pre><p><strong>Install wkhtmltopdf</strong></p><pre><code>apt-get install xvfb libfontconfig</code></pre><p>Download and install wkhtmltopdf package from <a target="_blank" rel="noopener noreferrer nofollow" href="https://wkhtmltopdf.org/downloads.html">https://wkhtmltopdf.org/downloads.html</a></p><pre><code>dpkg -<span class="hljs-selector-tag">i</span> wkhtmltox_file<span class="hljs-selector-class">.deb</span></code></pre><h2>Install Bench CLI</h2><p>Install bench via pip3</p><pre><code>pip3 install frappe-bench</code></pre><p>Confirm the bench installation by checking version</p><pre><code>bench <span class="hljs-comment">--version</span>
# <span class="hljs-built_in">output</span>
<span class="hljs-number">5.2</span><span class="hljs-number">.1</span></code></pre><p>Create your first bench folder.</p><pre><code><span class="hljs-built_in">cd</span> ~
bench init frappe-bench</code></pre><p>After the frappe-bench folder is created, change your directory to it and run this command</p><pre><code>bench <span class="hljs-keyword">start</span></code></pre><p>Congratulations, you have installed bench on to your system.</p></div>
</div>
</div>
<div class="modal-footer d-flex justify-content-between">
<button type="button" data-modal-button="previous" class="previous-revision btn btn-secondary btn-sm hide">Previous</button>
<button type="button" data-modal-button="next" class="next-revision btn btn-secondary btn-sm hide">Next</button>
</div>
</div>
</div>
</div>
<div class="modal page-settings-modal fade" id="pageSettingsModal" tabindex="-1" role="dialog" aria-labelledby="pageSettingsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title page-settings-title">Page Settings</h5>
<button type="button" class="d-block d-sm-none close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<div>
<label class="text-muted text-xs" for="pageRoute">Route</label>
<div class="flex align-items-center">
<div class="text-sm wiki-space-route-block" title="Wiki Space route (can't be modified)">
docs/
</div>
<input value="user/en/installation" type="text" id="pageRoute" name="pageRoute" class="form-control" style="border-top-left-radius: 0; border-bottom-left-radius: 0;">
</div>
</div>
<div class="mt-4 flex align-content-center">
<input type="checkbox" id="pageHideOnSidebar" name="pageHideOnSidebar">
<label class="text-muted text-xs" for="pageHideOnSidebar">
Hide on Sidebar
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-modal-button="update" class="btn btn-primary btn-sm update-page-settings-button">
Update
</button>
</div>
</div>
</div>
</div>
</div> | Installation
These steps assume you want to install Bench in developer mode. If you want install in production mode, follow the latest recommended installation methods.
System Requirements
This guide assumes you are using a personal computer, VPS or a bare-metal server. You also need to be on a *nix system, so any Linux Distribution and MacOS is supported. However, we officially support only the following distributions.
MacOS
Debian / Ubuntu
Learn more about the architecture here.
Pre-requisites
Version 13:
Python 3.7 or Python 3.8
Node.js 14
MariaDB 10.3+
Version 14:
Python 3.10 or Python 3.11
Node.js 14 or 16
MariaDB 10.6.6+
Version 15/Nightly:
Python 3.10 or Python 3.11
Node.js 18
MariaDB 10.6.6+
Common for all Frappe versions:
Redis 6 (caching and realtime updates)
yarn 1.12+ (js dependency manager)
pip 20+ (py dependency manager)
wkhtmltopdf (version 0.12.5 with patched qt) (for pdf generation)
cron (bench's scheduled jobs: automated certificate renewal, scheduled backups)
NGINX (proxying multitenant sites in production)
MacOS
Install command line version of Xcode tools.
xcode-select --install
Install Homebrew. It makes it easy to install packages on macOS.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Now, you can easily install the required packages by running the following command
brew install python@3.10 git redis mariadb@10.6 node@14
brew install --cask wkhtmltopdf
Now, edit the MariaDB configuration file (this step is not required for Frappe v15.21.0 or above).
nano /usr/local/etc/my.cnf
For Apple silicon, the path for the MariaDB config is
nano /opt/homebrew/etc/my.cnf
And add this configuration
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
bind-address = 127.0.0.1
[mysql]
default-character-set = utf8mb4
Now, just restart the mysql service and you are good to go.
brew services restart mariadb@10.6
Install Yarn
Install yarn using npm
npm install -g yarn
Debian / Ubuntu
Install git, python, and redis
sudo apt install git python-dev python-pip redis-server
Install MariaDB
sudo apt install software-properties-common
If you are on Ubuntu version older than 20.04, run this before installing MariaDB:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'
If you are on version Ubuntu 20.04, then MariaDB is available in default repo and you can directly run the below commands to install it:
sudo apt-get update
sudo apt-get install mariadb-server
During this installation you'll be prompted to set the MySQL root password. If you are not prompted, you'll have to initialize the MySQL server setup yourself. You can do that by running the command:
mysql_secure_installation
Remember: only run it if you're not prompted the password during setup.
It is really important that you remember this password, since it'll be useful later on. You'll also need the MySQL database development files.
apt-get install mariadb-client-10.3
Now, edit the MariaDB configuration file (this step is not required for Frappe v15.21.0 or above).
nano /etc/mysql/my.cnf
And add this configuration
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Now, just restart the mysql service and you are good to go.
service mysql restart
Install Node
We recommend installing node using nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
After nvm is installed, you may have to close your terminal and open another one. Now run the following command to install node.
nvm install 14
Verify the installation, by running:
node -v
# output
v14.17.2
Finally, install yarn using npm
npm install -g yarn
Install wkhtmltopdf
apt-get install xvfb libfontconfig
Download and install wkhtmltopdf package from https://wkhtmltopdf.org/downloads.html
dpkg -i wkhtmltox_file.deb
Install Bench CLI
Install bench via pip3
pip3 install frappe-bench
Confirm the bench installation by checking version
bench --version
# output
5.2.1
Create your first bench folder.
cd ~
bench init frappe-bench
After the frappe-bench folder is created, change your directory to it and run this command
bench start
Congratulations, you have installed bench on to your system. | # Installation
Edit Page New Page Revisions Page Settings
> These steps assume you want to install Bench in developer mode. If you want
> install in production mode, follow the [latest recommended installation
> methods](https://github.com/frappe/bench#installation).
## System Requirements
This guide assumes you are using a personal computer, VPS or a bare-metal
server. You also need to be on a *nix system, so any Linux Distribution and
MacOS is supported. However, we officially support only the following
distributions.
1. MacOS
2. Debian / Ubuntu
> Learn more about the architecture
> [here](/docs/v14/user/en/basics/architecture).
## Pre-requisites
Version 13:
Python 3.7 or Python 3.8
Node.js 14
MariaDB 10.3+
Version 14:
Python 3.10 or Python 3.11
Node.js 14 or 16
MariaDB 10.6.6+
Version 15/Nightly:
Python 3.10 or Python 3.11
Node.js 18
MariaDB 10.6.6+
Common for all Frappe versions:
Redis 6 (caching and realtime updates)
yarn 1.12+ (js dependency manager)
pip 20+ (py dependency manager)
wkhtmltopdf (version 0.12.5 with patched qt) (for pdf generation)
cron (bench's scheduled jobs: automated certificate renewal, scheduled backups)
NGINX (proxying multitenant sites in production)
### MacOS
Install command line version of Xcode tools.
xcode-select --install
Install [Homebrew](https://brew.sh/). It makes it easy to install packages on
macOS.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Now, you can easily install the required packages by running the following
command
brew install python@3.10 git redis mariadb@10.6 node@14
brew install --cask wkhtmltopdf
Now, edit the MariaDB configuration file (this step is not required for Frappe
v15.21.0 or above).
nano /usr/local/etc/my.cnf
For Apple silicon, the path for the MariaDB config is
nano /opt/homebrew/etc/my.cnf
And add this configuration
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
bind-address = 127.0.0.1
[mysql]
default-character-set = utf8mb4
Now, just restart the mysql service and you are good to go.
brew services restart mariadb@10.6
**Install Yarn**
Install yarn using npm
npm install -g yarn
### Debian / Ubuntu
Install `git`, `python`, and `redis`
sudo apt install git python-dev python-pip redis-server
**Install MariaDB**
sudo apt install software-properties-common
If you are on Ubuntu version older than 20.04, run this before installing
MariaDB:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'
If you are on version Ubuntu 20.04, then MariaDB is available in default repo
and you can directly run the below commands to install it:
sudo apt-get update
sudo apt-get install mariadb-server
During this installation you'll be prompted to set the MySQL root password. If
you are not prompted, you'll have to initialize the MySQL server setup
yourself. You can do that by running the command:
mysql_secure_installation
> Remember: only run it if you're not prompted the password during setup.
It is really important that you remember this password, since it'll be useful
later on. You'll also need the MySQL database development files.
apt-get install mariadb-client-10.3
Now, edit the MariaDB configuration file (this step is not required for Frappe
v15.21.0 or above).
nano /etc/mysql/my.cnf
And add this configuration
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Now, just restart the mysql service and you are good to go.
service mysql restart
**Install Node**
We recommend installing node using [nvm](https://github.com/creationix/nvm)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
After nvm is installed, you may have to close your terminal and open another
one. Now run the following command to install node.
nvm install 14
Verify the installation, by running:
node -v
# output
v14.17.2
Finally, install `yarn` using `npm`
npm install -g yarn
**Install wkhtmltopdf**
apt-get install xvfb libfontconfig
Download and install wkhtmltopdf package from
<https://wkhtmltopdf.org/downloads.html>
dpkg -i wkhtmltox_file.deb
## Install Bench CLI
Install bench via pip3
pip3 install frappe-bench
Confirm the bench installation by checking version
bench --version
# output
5.2.1
Create your first bench folder.
cd ~
bench init frappe-bench
After the frappe-bench folder is created, change your directory to it and run
this command
bench start
Congratulations, you have installed bench on to your system.
##### Installation
akhil edited 1 month ago
Γ
> These steps assume you want to install Bench in developer mode. If you want
> install in production mode, follow the [latest recommended installation
> methods](https://github.com/frappe/bench#installation).
## System Requirements
This guide assumes you are using a personal computer, VPS or a bare-metal
server. You also need to be on a *nix system, so any Linux Distribution and
MacOS is supported. However, we officially support only the following
distributions.
1. MacOS
2. Debian / Ubuntu
> Learn more about the architecture
> [here](/docs/v14/user/en/basics/architecture).
## Pre-requisites
Version 13:
Python 3.7 or Python 3.8
Node.js 14
MariaDB 10.3+
Version 14:
Python 3.10 or Python 3.11
Node.js 14 or 16
MariaDB 10.6.6+
Version 15/Nightly:
Python 3.10 or Python 3.11
Node.js 18
MariaDB 10.6.6+
Common for all Frappe versions:
Redis 6 (caching and realtime updates)
yarn 1.12+ (js dependency manager)
pip 20+ (py dependency manager)
wkhtmltopdf (version 0.12.5 with patched qt) (for pdf generation)
cron (bench's scheduled jobs: automated certificate renewal, scheduled backups)
NGINX (proxying multitenant sites in production)
### MacOS
Install command line version of Xcode tools.
xcode-select --install
Install [Homebrew](https://brew.sh/). It makes it easy to install packages on
macOS.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Now, you can easily install the required packages by running the following
command
brew install python@3.10 git redis mariadb@10.6 node@14
brew install --cask wkhtmltopdf
Now, edit the MariaDB configuration file (this step is not required for Frappe
v15.21.0 or above).
nano /usr/local/etc/my.cnf
For Apple silicon, the path for the MariaDB config is
nano /opt/homebrew/etc/my.cnf
And add this configuration
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
bind-address = 127.0.0.1
[mysql]
default-character-set = utf8mb4
Now, just restart the mysql service and you are good to go.
brew services restart mariadb@10.6
**Install Yarn**
Install yarn using npm
npm install -g yarn
### Debian / Ubuntu
Install `git`, `python`, and `redis`
sudo apt install git python-dev python-pip redis-server
**Install MariaDB**
sudo apt install software-properties-common
If you are on Ubuntu version older than 20.04, run this before installing
MariaDB:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'
If you are on version Ubuntu 20.04, then MariaDB is available in default repo
and you can directly run the below commands to install it:
sudo apt-get update
sudo apt-get install mariadb-server
During this installation you'll be prompted to set the MySQL root password. If
you are not prompted, you'll have to initialize the MySQL server setup
yourself. You can do that by running the command:
mysql_secure_installation
> Remember: only run it if you're not prompted the password during setup.
It is really important that you remember this password, since it'll be useful
later on. You'll also need the MySQL database development files.
apt-get install mariadb-client-10.3
Now, edit the MariaDB configuration file.
nano /etc/mysql/my.cnf
And add this configuration
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Now, just restart the mysql service and you are good to go.
service mysql restart
**Install Node**
We recommend installing node using [nvm](https://github.com/creationix/nvm)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
After nvm is installed, you may have to close your terminal and open another
one. Now run the following command to install node.
nvm install 14
Verify the installation, by running:
node -v
# output
v14.17.2
Finally, install `yarn` using `npm`
npm install -g yarn
**Install wkhtmltopdf**
apt-get install xvfb libfontconfig
Download and install wkhtmltopdf package from
<https://wkhtmltopdf.org/downloads.html>
dpkg -i wkhtmltox_file.deb
## Install Bench CLI
Install bench via pip3
pip3 install frappe-bench
Confirm the bench installation by checking version
bench --version
# output
5.2.1
Create your first bench folder.
cd ~
bench init frappe-bench
After the frappe-bench folder is created, change your directory to it and run
this command
bench start
Congratulations, you have installed bench on to your system.
Previous Next
##### Page Settings
Γ
Route
docs/
Hide on Sidebar
Update
|
Frappe Framework Tutorial
| https://frappeframework.com/docs/user/en/tutorial | <div class="from-markdown ">
<div class="d-flex justify-content-between align-items-center">
<h1 class="wiki-title">Frappe Framework Tutorial
</h1>
<div class="dropdown wiki-options">
<div class="dropdown-toggle" type="button" role="button" id="wikiOptionsButton" data-toggle="dropdown" aria-label="Wiki Option Button" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical">
<circle cx="12" cy="12" r="1"></circle>
<circle cx="12" cy="5" r="1"></circle>
<circle cx="12" cy="19" r="1"></circle>
</svg>
</div>
<div class="dropdown-menu d-print-none" aria-labelledby="wikiOptionsButton">
<a class="dropdown-item edit-wiki-btn" href="#">Edit Page</a>
<a class="dropdown-item add-wiki-btn" href="#">New Page</a>
<a class="dropdown-item show-revisions" href="#" data-toggle="modal" data-target="#revisionsModal">
Revisions
</a>
<a class="dropdown-item show-page-settings" href="#" data-toggle="modal" data-target="#pageSettingsModal">
Page Settings
</a>
</div>
</div>
</div>
<div class="wiki-content">
<p>In this guide, you will learn how to create a web application from scratch using
the Frappe Framework.</p>
<h2 id="who-is-this-for">Who is this for?</h2>
<p>This guide is intended for software developers who are familiar with how web
applications are built. The Frappe Framework is powered by Python, JavaScript
and Redis, to name a few technologies and supports MariaDB and PostgreSQL
databases. Jinja is used as the templating engine for Web Views and Print
formats. Redis is used for caching, maintaing job queues and realtime updates.
However, you may not need to be proficient in all these tools to get started
with it.</p>
<p>Frappe Framework and the apps you build on it require <code>git</code> for version control
and update management via Bench. It is also expected that you are familiar with
basic git commands.</p>
<h2 id="what-are-we-building">What are we building?</h2>
<p>We will build a simple <strong>Library Management System</strong> in which the <strong>Librarian</strong>
can log in and manage Articles and Memberships. We will build the following
models:</p>
<ol>
<li><strong>Article:</strong> A Book or similar item that can be rented.</li>
<li><strong>Library Member:</strong> A user who is subscribed to a membership.</li>
<li><strong>Library Transaction:</strong> An Issue or Return of an article.</li>
<li><strong>Library Membership:</strong> A document that represents an active membership of a
Library Member.</li>
<li><strong>Library Settings:</strong> Settings that define values like Loan Period and
the maximum number of articles that can be issued at a time.</li>
</ol>
<p>The Librarian will log in to an interface known asΒ <strong>Desk</strong>, a rich admin
interface that ships with the framework. The Desk provides many standard views like
List view, Form view, Report view, etc, and many features like Role-based
Permissions.</p>
<p>We will also create public Web Views which can be accessed by the Library
Members where they can browse available Articles.</p>
<h2 id="table-of-contents">Table of Contents</h2>
<ol>
<li><a href="/docs/v14/user/en/tutorial/install-and-setup-bench">Create a Bench</a></li>
<li><a href="/docs/v14/user/en/tutorial/create-an-app">Create an App</a></li>
<li><a href="/docs/v14/user/en/tutorial/create-a-site">Create a Site</a></li>
<li><a href="/docs/v14/user/en/tutorial/create-a-doctype">Create a DocType</a></li>
<li><a href="/docs/v14/user/en/tutorial/doctype-features">DocType Features</a></li>
<li><a href="/docs/v14/user/en/tutorial/controller-methods">Controller Methods</a></li>
<li><a href="/docs/v14/user/en/tutorial/types-of-doctype">Types of DocType</a></li>
<li><a href="/docs/v14/user/en/tutorial/form-scripts">Form Scripts</a></li>
<li><a href="/docs/v14/user/en/tutorial/portal-pages">Portal Pages</a></li>
<li><a href="/docs/v14/user/en/tutorial/whats-next">What's Next</a></li>
</ol>
</div>
<input value="c4d296c039" class="d-none" name="wiki-page-name">
<div class="modal revisions-modal fade" id="revisionsModal" tabindex="-1" role="dialog" aria-labelledby="revisionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="d-flex flex-column">
<h5 class="modal-title revision-title" id="revisionsModalTitle">Frappe Framework Tutorial
</h5>
<span class="small text-muted revision-time">ankush edited 1 year ago</span>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="revision-content wiki-content">
<p>In this guide, you will learn how to create a web application from scratch using
the Frappe Framework.</p>
<h2 id="who-is-this-for">Who is this for?</h2>
<p>This guide is intended for software developers who are familiar with how web
applications are built. The Frappe Framework is powered by Python, JavaScript
and Redis, to name a few technologies and supports MariaDB and PostgreSQL
databases. Jinja is used as the templating engine for Web Views and Print
formats. Redis is used for caching, maintaing job queues and realtime updates.
However, you may not need to be proficient in all these tools to get started
with it.</p>
<p>Frappe Framework and the apps you build on it require <code>git</code> for version control
and update management via Bench. It is also expected that you are familiar with
basic git commands.</p>
<h2 id="what-are-we-building">What are we building?</h2>
<p>We will build a simple <strong>Library Management System</strong> in which the <strong>Librarian</strong>
can log in and manage Articles and Memberships. We will build the following
models:</p>
<ol>
<li><strong>Article:</strong> A Book or similar item that can be rented.</li>
<li><strong>Library Member:</strong> A user who is subscribed to a membership.</li>
<li><strong>Library Transaction:</strong> An Issue or Return of an article.</li>
<li><strong>Library Membership:</strong> A document that represents an active membership of a
Library Member.</li>
<li><strong>Library Settings:</strong> Settings that define values like Loan Period and
the maximum number of articles that can be issued at a time.</li>
</ol>
<p>The Librarian will log in to an interface known asΒ <strong>Desk</strong>, a rich admin
interface that ships with the framework. The Desk provides many standard views like
List view, Form view, Report view, etc, and many features like Role-based
Permissions.</p>
<p>We will also create public Web Views which can be accessed by the Library
Members where they can browse available Articles.</p>
<h2 id="table-of-contents">Table of Contents</h2>
<ol>
<li><a href="/docs/v13/user/en/tutorial/install-and-setup-bench">Create a Bench</a></li>
<li><a href="/docs/v13/user/en/tutorial/create-an-app">Create an App</a></li>
<li><a href="/docs/v13/user/en/tutorial/create-a-site">Create a Site</a></li>
<li><a href="/docs/v13/user/en/tutorial/create-a-doctype">Create a DocType</a></li>
<li><a href="/docs/v13/user/en/tutorial/doctype-features">DocType Features</a></li>
<li><a href="/docs/v13/user/en/tutorial/controller-methods">Controller Methods</a></li>
<li><a href="/docs/v13/user/en/tutorial/types-of-doctype">Types of DocType</a></li>
<li><a href="/docs/v13/user/en/tutorial/form-scripts">Form Scripts</a></li>
<li><a href="/docs/v13/user/en/tutorial/portal-pages">Portal Pages</a></li>
<li><a href="/docs/v13/user/en/tutorial/whats-next">What's Next</a></li>
</ol>
</div>
</div>
<div class="modal-footer d-flex justify-content-between">
<button type="button" data-modal-button="previous" class="previous-revision btn btn-secondary btn-sm hide">Previous</button>
<button type="button" data-modal-button="next" class="next-revision btn btn-secondary btn-sm hide">Next</button>
</div>
</div>
</div>
</div>
<div class="modal page-settings-modal fade" id="pageSettingsModal" tabindex="-1" role="dialog" aria-labelledby="pageSettingsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title page-settings-title">Page Settings</h5>
<button type="button" class="d-block d-sm-none close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<div>
<label class="text-muted text-xs" for="pageRoute">Route</label>
<div class="flex align-items-center">
<div class="text-sm wiki-space-route-block" title="Wiki Space route (can't be modified)">
docs/
</div>
<input value="user/en/tutorial" type="text" id="pageRoute" name="pageRoute" class="form-control" style="border-top-left-radius: 0; border-bottom-left-radius: 0;">
</div>
</div>
<div class="mt-4 flex align-content-center">
<input type="checkbox" id="pageHideOnSidebar" name="pageHideOnSidebar">
<label class="text-muted text-xs" for="pageHideOnSidebar">
Hide on Sidebar
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-modal-button="update" class="btn btn-primary btn-sm update-page-settings-button">
Update
</button>
</div>
</div>
</div>
</div>
</div> | Frappe Framework Tutorial
In this guide, you will learn how to create a web application from scratch using the Frappe Framework.
Who is this for?
This guide is intended for software developers who are familiar with how web applications are built. The Frappe Framework is powered by Python, JavaScript and Redis, to name a few technologies and supports MariaDB and PostgreSQL databases. Jinja is used as the templating engine for Web Views and Print formats. Redis is used for caching, maintaing job queues and realtime updates. However, you may not need to be proficient in all these tools to get started with it.
Frappe Framework and the apps you build on it require git for version control and update management via Bench. It is also expected that you are familiar with basic git commands.
What are we building?
We will build a simple Library Management System in which the Librarian can log in and manage Articles and Memberships. We will build the following models:
Article: A Book or similar item that can be rented.
Library Member: A user who is subscribed to a membership.
Library Transaction: An Issue or Return of an article.
Library Membership: A document that represents an active membership of a Library Member.
Library Settings: Settings that define values like Loan Period and the maximum number of articles that can be issued at a time.
The Librarian will log in to an interface known as Desk, a rich admin interface that ships with the framework. The Desk provides many standard views like List view, Form view, Report view, etc, and many features like Role-based Permissions.
We will also create public Web Views which can be accessed by the Library Members where they can browse available Articles.
Table of Contents
Create a Bench
Create an App
Create a Site
Create a DocType
DocType Features
Controller Methods
Types of DocType
Form Scripts
Portal Pages
What's Next | # Frappe Framework Tutorial
Edit Page New Page Revisions Page Settings
In this guide, you will learn how to create a web application from scratch
using the Frappe Framework.
## Who is this for?
This guide is intended for software developers who are familiar with how web
applications are built. The Frappe Framework is powered by Python, JavaScript
and Redis, to name a few technologies and supports MariaDB and PostgreSQL
databases. Jinja is used as the templating engine for Web Views and Print
formats. Redis is used for caching, maintaing job queues and realtime updates.
However, you may not need to be proficient in all these tools to get started
with it.
Frappe Framework and the apps you build on it require `git` for version
control and update management via Bench. It is also expected that you are
familiar with basic git commands.
## What are we building?
We will build a simple **Library Management System** in which the
**Librarian** can log in and manage Articles and Memberships. We will build
the following models:
1. **Article:** A Book or similar item that can be rented.
2. **Library Member:** A user who is subscribed to a membership.
3. **Library Transaction:** An Issue or Return of an article.
4. **Library Membership:** A document that represents an active membership of a Library Member.
5. **Library Settings:** Settings that define values like Loan Period and the maximum number of articles that can be issued at a time.
The Librarian will log in to an interface known as **Desk** , a rich admin
interface that ships with the framework. The Desk provides many standard views
like List view, Form view, Report view, etc, and many features like Role-based
Permissions.
We will also create public Web Views which can be accessed by the Library
Members where they can browse available Articles.
## Table of Contents
1. [Create a Bench](/docs/v14/user/en/tutorial/install-and-setup-bench)
2. [Create an App](/docs/v14/user/en/tutorial/create-an-app)
3. [Create a Site](/docs/v14/user/en/tutorial/create-a-site)
4. [Create a DocType](/docs/v14/user/en/tutorial/create-a-doctype)
5. [DocType Features](/docs/v14/user/en/tutorial/doctype-features)
6. [Controller Methods](/docs/v14/user/en/tutorial/controller-methods)
7. [Types of DocType](/docs/v14/user/en/tutorial/types-of-doctype)
8. [Form Scripts](/docs/v14/user/en/tutorial/form-scripts)
9. [Portal Pages](/docs/v14/user/en/tutorial/portal-pages)
10. [What's Next](/docs/v14/user/en/tutorial/whats-next)
##### Frappe Framework Tutorial
ankush edited 1 year ago
Γ
In this guide, you will learn how to create a web application from scratch
using the Frappe Framework.
## Who is this for?
This guide is intended for software developers who are familiar with how web
applications are built. The Frappe Framework is powered by Python, JavaScript
and Redis, to name a few technologies and supports MariaDB and PostgreSQL
databases. Jinja is used as the templating engine for Web Views and Print
formats. Redis is used for caching, maintaing job queues and realtime updates.
However, you may not need to be proficient in all these tools to get started
with it.
Frappe Framework and the apps you build on it require `git` for version
control and update management via Bench. It is also expected that you are
familiar with basic git commands.
## What are we building?
We will build a simple **Library Management System** in which the
**Librarian** can log in and manage Articles and Memberships. We will build
the following models:
1. **Article:** A Book or similar item that can be rented.
2. **Library Member:** A user who is subscribed to a membership.
3. **Library Transaction:** An Issue or Return of an article.
4. **Library Membership:** A document that represents an active membership of a Library Member.
5. **Library Settings:** Settings that define values like Loan Period and the maximum number of articles that can be issued at a time.
The Librarian will log in to an interface known as **Desk** , a rich admin
interface that ships with the framework. The Desk provides many standard views
like List view, Form view, Report view, etc, and many features like Role-based
Permissions.
We will also create public Web Views which can be accessed by the Library
Members where they can browse available Articles.
## Table of Contents
1. [Create a Bench](/docs/v13/user/en/tutorial/install-and-setup-bench)
2. [Create an App](/docs/v13/user/en/tutorial/create-an-app)
3. [Create a Site](/docs/v13/user/en/tutorial/create-a-site)
4. [Create a DocType](/docs/v13/user/en/tutorial/create-a-doctype)
5. [DocType Features](/docs/v13/user/en/tutorial/doctype-features)
6. [Controller Methods](/docs/v13/user/en/tutorial/controller-methods)
7. [Types of DocType](/docs/v13/user/en/tutorial/types-of-doctype)
8. [Form Scripts](/docs/v13/user/en/tutorial/form-scripts)
9. [Portal Pages](/docs/v13/user/en/tutorial/portal-pages)
10. [What's Next](/docs/v13/user/en/tutorial/whats-next)
Previous Next
##### Page Settings
Γ
Route
docs/
Hide on Sidebar
Update
|
Install and Setup Bench | https://frappeframework.com/docs/user/en/tutorial/install-and-setup-bench | <div class="from-markdown ">
<div class="d-flex justify-content-between align-items-center">
<h1 class="wiki-title">Install and Setup Bench</h1>
<div class="dropdown wiki-options">
<div class="dropdown-toggle" type="button" role="button" id="wikiOptionsButton" data-toggle="dropdown" aria-label="Wiki Option Button" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical">
<circle cx="12" cy="12" r="1"></circle>
<circle cx="12" cy="5" r="1"></circle>
<circle cx="12" cy="19" r="1"></circle>
</svg>
</div>
<div class="dropdown-menu d-print-none" aria-labelledby="wikiOptionsButton">
<a class="dropdown-item edit-wiki-btn" href="#">Edit Page</a>
<a class="dropdown-item add-wiki-btn" href="#">New Page</a>
<a class="dropdown-item show-revisions" href="#" data-toggle="modal" data-target="#revisionsModal">
Revisions
</a>
<a class="dropdown-item show-page-settings" href="#" data-toggle="modal" data-target="#pageSettingsModal">
Page Settings
</a>
</div>
</div>
</div>
<div class="wiki-content">
<div><p>Bench is the command line tool to manage Frappe apps and sites.</p><h2>Installation</h2><p>If you haven't installed Bench, follow the <a href="/docs/v14/user/en/installation" rel="noopener noreferrer nofollow" target="_blank">Installation</a> guide. After installation, you should be able to run commands that start with <code>bench</code>.</p><p>Run the following command to test your installation:</p><pre><code>$ bench <span class="hljs-attr">--version</span>
<span class="hljs-number">5.1</span>.<span class="hljs-number">0</span></code></pre><h2>Create the frappe-bench directory</h2><p>Let's create our project folder which will contain our apps and sites. Run the following command:</p><pre><code>$ bench <span class="hljs-keyword">init</span> frappe-bench</code></pre><p>This will create a directory named <code>frappe-bench</code> in your current working directory. It will do the following:</p><ol><li><p>Create a python virtual environment under <code>env</code> directory.</p></li><li><p>Fetch and install the <code>frappe</code> app as a python package.</p></li><li><p>Install node modules of <code>frappe</code>.</p></li><li><p>Build static assets.</p></li></ol><h2>Directory Structure</h2><pre><code>.
βββ Procfile
βββ apps
β βββ frappe
βββ <span class="hljs-built_in">config</span>
β βββ pids
β βββ redis_cache.conf
β βββ redis_queue.conf
β βββ redis_socketio.conf
βββ env
β βββ bin
β βββ include
β βββ lib
β βββ share
βββ logs
β βββ backup.<span class="hljs-built_in">log</span>
β βββ bench.<span class="hljs-built_in">log</span>
βββ sites
βββ apps.txt
βββ assets
βββ common_site_config.json</code></pre><ul><li><p><strong>env</strong>: Python virtual environment</p></li><li><p><strong>config</strong>: Config files for Redis and Nginx</p></li><li><p><strong>logs</strong>: Log files for every process (web, worker)</p></li><li><p><strong>sites:</strong> Sites directory</p><ul><li><p><strong>assets:</strong> Static assets that served via Nginx in production</p></li><li><p><strong>apps.txt:</strong> List of installed frappe apps</p></li><li><p><strong>common_site_config.json:</strong> Site config that is available in all sites</p></li></ul></li><li><p><strong>apps:</strong> Apps directory</p><ul><li><p><strong>frappe:</strong> The Frappe app directory</p></li></ul></li><li><p><strong>Procfile:</strong> List of processes that run in development</p></li></ul><h2>Start the Bench Server</h2><p>Now that we have created our <code>frappe-bench</code> directory, we can start the Frappe web server by running the following command:</p><pre><code>$ cd frappe-bench
$ bench start
<span class="hljs-section">18:16:36 system | redis_cache.1 started (pid=11231)</span>
<span class="hljs-section">18:16:36 system | redis_socketio.1 started (pid=11233)</span>
<span class="hljs-section">18:16:36 system | redis_queue.1 started (pid=11234)</span>
<span class="hljs-section">18:16:36 system | socketio.1 started (pid=11236)</span>
<span class="hljs-section">18:16:36 system | web.1 started (pid=11237)</span>
<span class="hljs-section">18:16:36 system | watch.1 started (pid=11240)</span>
<span class="hljs-section">18:16:36 system | schedule.1 started (pid=11241)</span>
<span class="hljs-section">18:16:36 system | worker_short.1 started (pid=11242)</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11234, just started</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Configuration loaded</span>
<span class="hljs-section">18:16:36 system | worker_long.1 started (pid=11244)</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11231, just started</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Configuration loaded</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.320 * Increased maximum number of open files to 10032 (it was originally set to 256).</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.325 * Increased maximum number of open files to 10032 (it was originally set to 256).</span>
<span class="hljs-section">18:16:36 system | worker_default.1 started (pid=11245)</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Running mode=standalone, port=13000.</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 # Server initialized</span>
<span class="hljs-section">18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Ready to accept connections</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Running mode=standalone, port=11000.</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 # Server initialized</span>
<span class="hljs-section">18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Ready to accept connections</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11233, just started</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Configuration loaded</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.374 * Increased maximum number of open files to 10032 (it was originally set to 256).</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.417 * Running mode=standalone, port=12000.</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 # Server initialized</span>
<span class="hljs-section">18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 * Ready to accept connections</span>
<span class="hljs-section">18:16:37 socketio.1 | listening on *: 9000</span>
<span class="hljs-section">18:16:41 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)</span>
<span class="hljs-section">18:16:41 web.1 | * Restarting with fsevents reloader</span>
<span class="hljs-section">18:16:41 watch.1 | yarn run v1.22.4</span>
<span class="hljs-section">18:16:41 watch.1 | $ node rollup/watch.js</span>
<span class="hljs-section">18:16:42 watch.1 |</span>
<span class="hljs-section">18:16:42 watch.1 | Rollup Watcher Started</span>
<span class="hljs-section">18:16:42 watch.1 |</span>
<span class="hljs-section">18:16:42 watch.1 | Watching...</span>
<span class="hljs-section">18:16:42 web.1 | * Debugger is active!</span>
<span class="hljs-section">18:16:42 web.1 | * Debugger PIN: 100-672-925</span>
<span class="hljs-section">18:16:43 watch.1 | Rebuilding frappe-web-b4.css</span>
<span class="hljs-section">18:16:44 watch.1 | Rebuilding frappe-chat-web.css</span>
<span class="hljs-section">18:16:44 watch.1 | Rebuilding chat.js</span>
<span class="hljs-section">18:16:45 watch.1 | Rebuilding frappe-recorder.min.js</span>
<span class="hljs-section">18:16:48 watch.1 | Rebuilding checkout.min.js</span>
<span class="hljs-section">18:16:48 watch.1 | Rebuilding frappe-web.min.js</span>
<span class="hljs-section">18:16:51 watch.1 | Rebuilding bootstrap-4-web.min.js</span>
<span class="hljs-section">18:16:52 watch.1 | Rebuilding control.min.js</span>
<span class="hljs-section">18:16:54 watch.1 | Rebuilding dialog.min.js</span>
<span class="hljs-section">18:16:57 watch.1 | Rebuilding desk.min.css</span>
<span class="hljs-section">18:16:57 watch.1 | Rebuilding frappe-rtl.css</span>
<span class="hljs-section">18:16:58 watch.1 | Rebuilding printview.css</span>
<span class="hljs-section">18:16:58 watch.1 | Rebuilding desk.min.js</span>
<span class="hljs-section">18:17:04 watch.1 | Rebuilding form.min.css</span>
<span class="hljs-section">18:17:04 watch.1 | Rebuilding form.min.js</span>
<span class="hljs-section">18:17:07 watch.1 | Rebuilding list.min.css</span>
<span class="hljs-section">18:17:07 watch.1 | Rebuilding list.min.js</span>
<span class="hljs-section">18:17:09 watch.1 | Rebuilding report.min.css</span>
<span class="hljs-section">18:17:09 watch.1 | Rebuilding report.min.js</span>
<span class="hljs-section">18:17:12 watch.1 | Rebuilding web_form.min.js</span>
<span class="hljs-section">18:17:12 watch.1 | Rebuilding web_form.css</span>
<span class="hljs-section">18:17:13 watch.1 | Rebuilding email.css</span>
<span class="hljs-section">18:17:13 watch.1 | Rebuilding social.min.js</span>
<span class="hljs-section">18:17:13 watch.1 | Rebuilding barcode_scanner.min.js</span>
<span class="hljs-section">18:17:15 watch.1 | Rebuilding data_import_tools.min.js</span>
<br class="ProseMirror-trailingBreak"></code></pre><p>This will start several processes including a Python web server based on Gunicorn, redis servers for caching, job queuing and socketio pub-sub, background workers, node server for socketio and a node server for compiling JS/CSS files.</p><p>The web server will start listening on the port <code>8000</code> but we don't have any sites yet to serve. Our next step is to create our app and create a site that will have this app installed.</p><p>Make sure not to close the terminal where <code>bench start</code> is running. To run bench commands, create another terminal and cd into the <code>frappe-bench</code> directory.</p><p>Good job on following the tutorial so far!</p><p>Next: <a href="/docs/v14/user/en/tutorial/create-an-app" rel="noopener noreferrer nofollow" target="_blank">Create an App</a></p></div>
</div>
<input value="76995010b5" class="d-none" name="wiki-page-name">
<div class="modal revisions-modal fade" id="revisionsModal" tabindex="-1" role="dialog" aria-labelledby="revisionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="d-flex flex-column">
<h5 class="modal-title revision-title" id="revisionsModalTitle">Install and Setup Bench</h5>
<span class="small text-muted revision-time">akhil edited 1 month ago</span>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="revision-content wiki-content">
<p>Bench is the command line tool to manage Frappe apps and sites.</p>
<h2 id="installation">Installation</h2>
<p>If you haven't installed Bench, follow the <a href="/docs/v13/user/en/installation">Installation</a> guide. After installation, you should be able to run commands that start with <code>bench</code>.</p>
<p>Run the following command to test your installation:</p>
<pre><code class="bash language-bash">$ bench --version
5.1.0
</code></pre>
<h2 id="create-the-frappe-bench-directory">Create the frappe-bench directory</h2>
<p>Let's create our project folder which will contain our apps and sites. Run the following command:</p>
<pre><code class="bash language-bash">$ bench init frappe-bench
</code></pre>
<p>This will create a directory named <code>frappe-bench</code> in your current working directory. It will do the following:</p>
<ol>
<li>Create a python virtual environment under <code>env</code> directory.</li>
<li>Fetch and install the <code>frappe</code> app as a python package.</li>
<li>Install node modules of <code>frappe</code>.</li>
<li>Build static assets.</li>
</ol>
<h2 id="directory-structure">Directory Structure</h2>
<pre><code class="bash language-bash">.
βββ Procfile
βββ apps
β βββ frappe
βββ config
β βββ pids
β βββ redis_cache.conf
β βββ redis\_queue.conf
β βββ redis\_socketio.conf
βββ env
β βββ bin
β βββ include
β βββ lib
β βββ share
βββ logs
β βββ backup.log
β βββ bench.log
βββ sites
βββ apps.txt
βββ assets
βββ common\_site\_config.json
</code></pre>
<ul>
<li><strong>env</strong>: Python virtual environment</li>
<li><strong>config</strong>: Config files for Redis and Nginx</li>
<li><strong>logs</strong>: Log files for every process (web, worker)</li>
<li><strong>sites:</strong> Sites directory
<ul>
<li><strong>assets:</strong> Static assets that served via Nginx in production</li>
<li><strong>apps.txt:</strong> List of installed frappe apps</li>
<li><strong>common_site_config.json:</strong> Site config that is available in all sites</li>
</ul></li>
<li><strong>apps:</strong> Apps directory
<ul>
<li><strong>frappe:</strong> The Frappe app directory</li>
</ul></li>
<li><strong>Procfile:</strong> List of processes that run in development</li>
</ul>
<h2 id="start-the-bench-server">Start the Bench Server</h2>
<p>Now that we have created our <code>frappe-bench</code> directory, we can start the Frappe web server by running the following command:</p>
<pre><code class="bash language-bash">$ cd frappe-bench
$ bench start
18:16:36 system | redis_cache.1 started (pid=11231)
18:16:36 system | redis_socketio.1 started (pid=11233)
18:16:36 system | redis_queue.1 started (pid=11234)
18:16:36 system | socketio.1 started (pid=11236)
18:16:36 system | web.1 started (pid=11237)
18:16:36 system | watch.1 started (pid=11240)
18:16:36 system | schedule.1 started (pid=11241)
18:16:36 system | worker_short.1 started (pid=11242)
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11234, just started
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Configuration loaded
18:16:36 system | worker_long.1 started (pid=11244)
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11231, just started
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Configuration loaded
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.320 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.325 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 system | worker_default.1 started (pid=11245)
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Running mode=standalone, port=13000.
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 # Server initialized
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Ready to accept connections
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Running mode=standalone, port=11000.
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 # Server initialized
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Ready to accept connections
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11233, just started
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Configuration loaded
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.374 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.417 * Running mode=standalone, port=12000.
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 # Server initialized
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 * Ready to accept connections
18:16:37 socketio.1 | listening on *: 9000
18:16:41 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
18:16:41 web.1 | * Restarting with fsevents reloader
18:16:41 watch.1 | yarn run v1.22.4
18:16:41 watch.1 | $ node rollup/watch.js
18:16:42 watch.1 |
18:16:42 watch.1 | Rollup Watcher Started
18:16:42 watch.1 |
18:16:42 watch.1 | Watching...
18:16:42 web.1 | * Debugger is active!
18:16:42 web.1 | * Debugger PIN: 100-672-925
18:16:43 watch.1 | Rebuilding frappe-web-b4.css
18:16:44 watch.1 | Rebuilding frappe-chat-web.css
18:16:44 watch.1 | Rebuilding chat.js
18:16:45 watch.1 | Rebuilding frappe-recorder.min.js
18:16:48 watch.1 | Rebuilding checkout.min.js
18:16:48 watch.1 | Rebuilding frappe-web.min.js
18:16:51 watch.1 | Rebuilding bootstrap-4-web.min.js
18:16:52 watch.1 | Rebuilding control.min.js
18:16:54 watch.1 | Rebuilding dialog.min.js
18:16:57 watch.1 | Rebuilding desk.min.css
18:16:57 watch.1 | Rebuilding frappe-rtl.css
18:16:58 watch.1 | Rebuilding printview.css
18:16:58 watch.1 | Rebuilding desk.min.js
18:17:04 watch.1 | Rebuilding form.min.css
18:17:04 watch.1 | Rebuilding form.min.js
18:17:07 watch.1 | Rebuilding list.min.css
18:17:07 watch.1 | Rebuilding list.min.js
18:17:09 watch.1 | Rebuilding report.min.css
18:17:09 watch.1 | Rebuilding report.min.js
18:17:12 watch.1 | Rebuilding web_form.min.js
18:17:12 watch.1 | Rebuilding web_form.css
18:17:13 watch.1 | Rebuilding email.css
18:17:13 watch.1 | Rebuilding social.min.js
18:17:13 watch.1 | Rebuilding barcode_scanner.min.js
18:17:15 watch.1 | Rebuilding data_import_tools.min.js
</code></pre>
<p>This will start several processes including a Python web server based on Gunicorn, redis servers for caching, job queuing and socketio pub-sub, background workers, node server for socketio and a node server for compiling JS/CSS files.</p>
<p>The web server will start listening on the port <code>8000</code> but we don't have any sites yet to serve. Our next step is to create our app and create a site that will have this app installed.</p>
<p>Make sure not to close the terminal where <code>bench start</code> is running. To run bench commands, create another terminal and cd into the <code>frappe-bench</code> directory.</p>
<p>Good job on following the tutorial so far!</p>
<p>Next: <a href="/docs/v13/user/en/tutorial/create-an-app">Create an App</a></p>
</div>
</div>
<div class="modal-footer d-flex justify-content-between">
<button type="button" data-modal-button="previous" class="previous-revision btn btn-secondary btn-sm hide">Previous</button>
<button type="button" data-modal-button="next" class="next-revision btn btn-secondary btn-sm hide">Next</button>
</div>
</div>
</div>
</div>
<div class="modal page-settings-modal fade" id="pageSettingsModal" tabindex="-1" role="dialog" aria-labelledby="pageSettingsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title page-settings-title">Page Settings</h5>
<button type="button" class="d-block d-sm-none close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<div>
<label class="text-muted text-xs" for="pageRoute">Route</label>
<div class="flex align-items-center">
<div class="text-sm wiki-space-route-block" title="Wiki Space route (can't be modified)">
docs/
</div>
<input value="user/en/tutorial/install-and-setup-bench" type="text" id="pageRoute" name="pageRoute" class="form-control" style="border-top-left-radius: 0; border-bottom-left-radius: 0;">
</div>
</div>
<div class="mt-4 flex align-content-center">
<input type="checkbox" id="pageHideOnSidebar" name="pageHideOnSidebar">
<label class="text-muted text-xs" for="pageHideOnSidebar">
Hide on Sidebar
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-modal-button="update" class="btn btn-primary btn-sm update-page-settings-button">
Update
</button>
</div>
</div>
</div>
</div>
</div> | Install and Setup Bench
Bench is the command line tool to manage Frappe apps and sites.
Installation
If you haven't installed Bench, follow the Installation guide. After installation, you should be able to run commands that start with bench.
Run the following command to test your installation:
$ bench --version
5.1.0
Create the frappe-bench directory
Let's create our project folder which will contain our apps and sites. Run the following command:
$ bench init frappe-bench
This will create a directory named frappe-bench in your current working directory. It will do the following:
Create a python virtual environment under env directory.
Fetch and install the frappe app as a python package.
Install node modules of frappe.
Build static assets.
Directory Structure
.
βββ Procfile
βββ apps
β βββ frappe
βββ config
β βββ pids
β βββ redis_cache.conf
β βββ redis_queue.conf
β βββ redis_socketio.conf
βββ env
β βββ bin
β βββ include
β βββ lib
β βββ share
βββ logs
β βββ backup.log
β βββ bench.log
βββ sites
βββ apps.txt
βββ assets
βββ common_site_config.json
env: Python virtual environment
config: Config files for Redis and Nginx
logs: Log files for every process (web, worker)
sites: Sites directory
assets: Static assets that served via Nginx in production
apps.txt: List of installed frappe apps
common_site_config.json: Site config that is available in all sites
apps: Apps directory
frappe: The Frappe app directory
Procfile: List of processes that run in development
Start the Bench Server
Now that we have created our frappe-bench directory, we can start the Frappe web server by running the following command:
$ cd frappe-bench
$ bench start
18:16:36 system | redis_cache.1 started (pid=11231)
18:16:36 system | redis_socketio.1 started (pid=11233)
18:16:36 system | redis_queue.1 started (pid=11234)
18:16:36 system | socketio.1 started (pid=11236)
18:16:36 system | web.1 started (pid=11237)
18:16:36 system | watch.1 started (pid=11240)
18:16:36 system | schedule.1 started (pid=11241)
18:16:36 system | worker_short.1 started (pid=11242)
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11234, just started
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Configuration loaded
18:16:36 system | worker_long.1 started (pid=11244)
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11231, just started
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Configuration loaded
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.320 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.325 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 system | worker_default.1 started (pid=11245)
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Running mode=standalone, port=13000.
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 # Server initialized
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Ready to accept connections
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Running mode=standalone, port=11000.
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 # Server initialized
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Ready to accept connections
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11233, just started
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Configuration loaded
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.374 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.417 * Running mode=standalone, port=12000.
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 # Server initialized
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 * Ready to accept connections
18:16:37 socketio.1 | listening on *: 9000
18:16:41 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
18:16:41 web.1 | * Restarting with fsevents reloader
18:16:41 watch.1 | yarn run v1.22.4
18:16:41 watch.1 | $ node rollup/watch.js
18:16:42 watch.1 |
18:16:42 watch.1 | Rollup Watcher Started
18:16:42 watch.1 |
18:16:42 watch.1 | Watching...
18:16:42 web.1 | * Debugger is active!
18:16:42 web.1 | * Debugger PIN: 100-672-925
18:16:43 watch.1 | Rebuilding frappe-web-b4.css
18:16:44 watch.1 | Rebuilding frappe-chat-web.css
18:16:44 watch.1 | Rebuilding chat.js
18:16:45 watch.1 | Rebuilding frappe-recorder.min.js
18:16:48 watch.1 | Rebuilding checkout.min.js
18:16:48 watch.1 | Rebuilding frappe-web.min.js
18:16:51 watch.1 | Rebuilding bootstrap-4-web.min.js
18:16:52 watch.1 | Rebuilding control.min.js
18:16:54 watch.1 | Rebuilding dialog.min.js
18:16:57 watch.1 | Rebuilding desk.min.css
18:16:57 watch.1 | Rebuilding frappe-rtl.css
18:16:58 watch.1 | Rebuilding printview.css
18:16:58 watch.1 | Rebuilding desk.min.js
18:17:04 watch.1 | Rebuilding form.min.css
18:17:04 watch.1 | Rebuilding form.min.js
18:17:07 watch.1 | Rebuilding list.min.css
18:17:07 watch.1 | Rebuilding list.min.js
18:17:09 watch.1 | Rebuilding report.min.css
18:17:09 watch.1 | Rebuilding report.min.js
18:17:12 watch.1 | Rebuilding web_form.min.js
18:17:12 watch.1 | Rebuilding web_form.css
18:17:13 watch.1 | Rebuilding email.css
18:17:13 watch.1 | Rebuilding social.min.js
18:17:13 watch.1 | Rebuilding barcode_scanner.min.js
18:17:15 watch.1 | Rebuilding data_import_tools.min.js
This will start several processes including a Python web server based on Gunicorn, redis servers for caching, job queuing and socketio pub-sub, background workers, node server for socketio and a node server for compiling JS/CSS files.
The web server will start listening on the port 8000 but we don't have any sites yet to serve. Our next step is to create our app and create a site that will have this app installed.
Make sure not to close the terminal where bench start is running. To run bench commands, create another terminal and cd into the frappe-bench directory.
Good job on following the tutorial so far!
Next: Create an App | # Install and Setup Bench
Edit Page New Page Revisions Page Settings
Bench is the command line tool to manage Frappe apps and sites.
## Installation
If you haven't installed Bench, follow the
[Installation](/docs/v14/user/en/installation) guide. After installation, you
should be able to run commands that start with `bench`.
Run the following command to test your installation:
$ bench --version
5.1.0
## Create the frappe-bench directory
Let's create our project folder which will contain our apps and sites. Run the
following command:
$ bench init frappe-bench
This will create a directory named `frappe-bench` in your current working
directory. It will do the following:
1. Create a python virtual environment under `env` directory.
2. Fetch and install the `frappe` app as a python package.
3. Install node modules of `frappe`.
4. Build static assets.
## Directory Structure
.
βββ Procfile
βββ apps
β βββ frappe
βββ config
β βββ pids
β βββ redis_cache.conf
β βββ redis_queue.conf
β βββ redis_socketio.conf
βββ env
β βββ bin
β βββ include
β βββ lib
β βββ share
βββ logs
β βββ backup.log
β βββ bench.log
βββ sites
βββ apps.txt
βββ assets
βββ common_site_config.json
* **env** : Python virtual environment
* **config** : Config files for Redis and Nginx
* **logs** : Log files for every process (web, worker)
* **sites:** Sites directory
* **assets:** Static assets that served via Nginx in production
* **apps.txt:** List of installed frappe apps
* **common_site_config.json:** Site config that is available in all sites
* **apps:** Apps directory
* **frappe:** The Frappe app directory
* **Procfile:** List of processes that run in development
## Start the Bench Server
Now that we have created our `frappe-bench` directory, we can start the Frappe
web server by running the following command:
$ cd frappe-bench
$ bench start
18:16:36 system | redis_cache.1 started (pid=11231)
18:16:36 system | redis_socketio.1 started (pid=11233)
18:16:36 system | redis_queue.1 started (pid=11234)
18:16:36 system | socketio.1 started (pid=11236)
18:16:36 system | web.1 started (pid=11237)
18:16:36 system | watch.1 started (pid=11240)
18:16:36 system | schedule.1 started (pid=11241)
18:16:36 system | worker_short.1 started (pid=11242)
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11234, just started
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Configuration loaded
18:16:36 system | worker_long.1 started (pid=11244)
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11231, just started
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Configuration loaded
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.320 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.325 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 system | worker_default.1 started (pid=11245)
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Running mode=standalone, port=13000.
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 # Server initialized
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Ready to accept connections
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Running mode=standalone, port=11000.
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 # Server initialized
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Ready to accept connections
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11233, just started
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Configuration loaded
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.374 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.417 * Running mode=standalone, port=12000.
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 # Server initialized
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 * Ready to accept connections
18:16:37 socketio.1 | listening on *: 9000
18:16:41 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
18:16:41 web.1 | * Restarting with fsevents reloader
18:16:41 watch.1 | yarn run v1.22.4
18:16:41 watch.1 | $ node rollup/watch.js
18:16:42 watch.1 |
18:16:42 watch.1 | Rollup Watcher Started
18:16:42 watch.1 |
18:16:42 watch.1 | Watching...
18:16:42 web.1 | * Debugger is active!
18:16:42 web.1 | * Debugger PIN: 100-672-925
18:16:43 watch.1 | Rebuilding frappe-web-b4.css
18:16:44 watch.1 | Rebuilding frappe-chat-web.css
18:16:44 watch.1 | Rebuilding chat.js
18:16:45 watch.1 | Rebuilding frappe-recorder.min.js
18:16:48 watch.1 | Rebuilding checkout.min.js
18:16:48 watch.1 | Rebuilding frappe-web.min.js
18:16:51 watch.1 | Rebuilding bootstrap-4-web.min.js
18:16:52 watch.1 | Rebuilding control.min.js
18:16:54 watch.1 | Rebuilding dialog.min.js
18:16:57 watch.1 | Rebuilding desk.min.css
18:16:57 watch.1 | Rebuilding frappe-rtl.css
18:16:58 watch.1 | Rebuilding printview.css
18:16:58 watch.1 | Rebuilding desk.min.js
18:17:04 watch.1 | Rebuilding form.min.css
18:17:04 watch.1 | Rebuilding form.min.js
18:17:07 watch.1 | Rebuilding list.min.css
18:17:07 watch.1 | Rebuilding list.min.js
18:17:09 watch.1 | Rebuilding report.min.css
18:17:09 watch.1 | Rebuilding report.min.js
18:17:12 watch.1 | Rebuilding web_form.min.js
18:17:12 watch.1 | Rebuilding web_form.css
18:17:13 watch.1 | Rebuilding email.css
18:17:13 watch.1 | Rebuilding social.min.js
18:17:13 watch.1 | Rebuilding barcode_scanner.min.js
18:17:15 watch.1 | Rebuilding data_import_tools.min.js
This will start several processes including a Python web server based on
Gunicorn, redis servers for caching, job queuing and socketio pub-sub,
background workers, node server for socketio and a node server for compiling
JS/CSS files.
The web server will start listening on the port `8000` but we don't have any
sites yet to serve. Our next step is to create our app and create a site that
will have this app installed.
Make sure not to close the terminal where `bench start` is running. To run
bench commands, create another terminal and cd into the `frappe-bench`
directory.
Good job on following the tutorial so far!
Next: [Create an App](/docs/v14/user/en/tutorial/create-an-app)
##### Install and Setup Bench
akhil edited 1 month ago
Γ
Bench is the command line tool to manage Frappe apps and sites.
## Installation
If you haven't installed Bench, follow the
[Installation](/docs/v13/user/en/installation) guide. After installation, you
should be able to run commands that start with `bench`.
Run the following command to test your installation:
$ bench --version
5.1.0
## Create the frappe-bench directory
Let's create our project folder which will contain our apps and sites. Run the
following command:
$ bench init frappe-bench
This will create a directory named `frappe-bench` in your current working
directory. It will do the following:
1. Create a python virtual environment under `env` directory.
2. Fetch and install the `frappe` app as a python package.
3. Install node modules of `frappe`.
4. Build static assets.
## Directory Structure
.
βββ Procfile
βββ apps
β βββ frappe
βββ config
β βββ pids
β βββ redis_cache.conf
β βββ redis\_queue.conf
β βββ redis\_socketio.conf
βββ env
β βββ bin
β βββ include
β βββ lib
β βββ share
βββ logs
β βββ backup.log
β βββ bench.log
βββ sites
βββ apps.txt
βββ assets
βββ common\_site\_config.json
* **env** : Python virtual environment
* **config** : Config files for Redis and Nginx
* **logs** : Log files for every process (web, worker)
* **sites:** Sites directory
* **assets:** Static assets that served via Nginx in production
* **apps.txt:** List of installed frappe apps
* **common_site_config.json:** Site config that is available in all sites
* **apps:** Apps directory
* **frappe:** The Frappe app directory
* **Procfile:** List of processes that run in development
## Start the Bench Server
Now that we have created our `frappe-bench` directory, we can start the Frappe
web server by running the following command:
$ cd frappe-bench
$ bench start
18:16:36 system | redis_cache.1 started (pid=11231)
18:16:36 system | redis_socketio.1 started (pid=11233)
18:16:36 system | redis_queue.1 started (pid=11234)
18:16:36 system | socketio.1 started (pid=11236)
18:16:36 system | web.1 started (pid=11237)
18:16:36 system | watch.1 started (pid=11240)
18:16:36 system | schedule.1 started (pid=11241)
18:16:36 system | worker_short.1 started (pid=11242)
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11234, just started
18:16:36 redis_queue.1 | 11234:C 10 Jul 2020 18:16:36.320 # Configuration loaded
18:16:36 system | worker_long.1 started (pid=11244)
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11231, just started
18:16:36 redis_cache.1 | 11231:C 10 Jul 2020 18:16:36.318 # Configuration loaded
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.320 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.325 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 system | worker_default.1 started (pid=11245)
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Running mode=standalone, port=13000.
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 # Server initialized
18:16:36 redis_cache.1 | 11231:M 10 Jul 2020 18:16:36.337 * Ready to accept connections
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Running mode=standalone, port=11000.
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 # Server initialized
18:16:36 redis_queue.1 | 11234:M 10 Jul 2020 18:16:36.367 * Ready to accept connections
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Redis version=6.0.5, bits=64, commit=00000000, modified=0, pid=11233, just started
18:16:36 redis_socketio.1 | 11233:C 10 Jul 2020 18:16:36.359 # Configuration loaded
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.374 * Increased maximum number of open files to 10032 (it was originally set to 256).
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.417 * Running mode=standalone, port=12000.
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 # Server initialized
18:16:36 redis_socketio.1 | 11233:M 10 Jul 2020 18:16:36.418 * Ready to accept connections
18:16:37 socketio.1 | listening on *: 9000
18:16:41 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
18:16:41 web.1 | * Restarting with fsevents reloader
18:16:41 watch.1 | yarn run v1.22.4
18:16:41 watch.1 | $ node rollup/watch.js
18:16:42 watch.1 |
18:16:42 watch.1 | Rollup Watcher Started
18:16:42 watch.1 |
18:16:42 watch.1 | Watching...
18:16:42 web.1 | * Debugger is active!
18:16:42 web.1 | * Debugger PIN: 100-672-925
18:16:43 watch.1 | Rebuilding frappe-web-b4.css
18:16:44 watch.1 | Rebuilding frappe-chat-web.css
18:16:44 watch.1 | Rebuilding chat.js
18:16:45 watch.1 | Rebuilding frappe-recorder.min.js
18:16:48 watch.1 | Rebuilding checkout.min.js
18:16:48 watch.1 | Rebuilding frappe-web.min.js
18:16:51 watch.1 | Rebuilding bootstrap-4-web.min.js
18:16:52 watch.1 | Rebuilding control.min.js
18:16:54 watch.1 | Rebuilding dialog.min.js
18:16:57 watch.1 | Rebuilding desk.min.css
18:16:57 watch.1 | Rebuilding frappe-rtl.css
18:16:58 watch.1 | Rebuilding printview.css
18:16:58 watch.1 | Rebuilding desk.min.js
18:17:04 watch.1 | Rebuilding form.min.css
18:17:04 watch.1 | Rebuilding form.min.js
18:17:07 watch.1 | Rebuilding list.min.css
18:17:07 watch.1 | Rebuilding list.min.js
18:17:09 watch.1 | Rebuilding report.min.css
18:17:09 watch.1 | Rebuilding report.min.js
18:17:12 watch.1 | Rebuilding web_form.min.js
18:17:12 watch.1 | Rebuilding web_form.css
18:17:13 watch.1 | Rebuilding email.css
18:17:13 watch.1 | Rebuilding social.min.js
18:17:13 watch.1 | Rebuilding barcode_scanner.min.js
18:17:15 watch.1 | Rebuilding data_import_tools.min.js
This will start several processes including a Python web server based on
Gunicorn, redis servers for caching, job queuing and socketio pub-sub,
background workers, node server for socketio and a node server for compiling
JS/CSS files.
The web server will start listening on the port `8000` but we don't have any
sites yet to serve. Our next step is to create our app and create a site that
will have this app installed.
Make sure not to close the terminal where `bench start` is running. To run
bench commands, create another terminal and cd into the `frappe-bench`
directory.
Good job on following the tutorial so far!
Next: [Create an App](/docs/v13/user/en/tutorial/create-an-app)
Previous Next
##### Page Settings
Γ
Route
docs/
Hide on Sidebar
Update
|
Create an App | https://frappeframework.com/docs/user/en/tutorial/create-an-app | <div class="from-markdown ">
<div class="d-flex justify-content-between align-items-center">
<h1 class="wiki-title">Create an App</h1>
<div class="dropdown wiki-options">
<div class="dropdown-toggle" type="button" role="button" id="wikiOptionsButton" data-toggle="dropdown" aria-label="Wiki Option Button" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical">
<circle cx="12" cy="12" r="1"></circle>
<circle cx="12" cy="5" r="1"></circle>
<circle cx="12" cy="19" r="1"></circle>
</svg>
</div>
<div class="dropdown-menu d-print-none" aria-labelledby="wikiOptionsButton">
<a class="dropdown-item edit-wiki-btn" href="#">Edit Page</a>
<a class="dropdown-item add-wiki-btn" href="#">New Page</a>
<a class="dropdown-item show-revisions" href="#" data-toggle="modal" data-target="#revisionsModal">
Revisions
</a>
<a class="dropdown-item show-page-settings" href="#" data-toggle="modal" data-target="#pageSettingsModal">
Page Settings
</a>
</div>
</div>
</div>
<div class="wiki-content">
<div><p>Create a Frappe app scaffold using the bench CLI.</p><h2>Create app</h2><p>Before we start, make sure you're in a bench directory. To confirm, run <code>bench find .</code>:</p><pre><code>$ bench find .
/home/frappe/frappe-bench is a bench directory!
<br class="ProseMirror-trailingBreak"></code></pre><p>To create our Library Management app, run the <code>new-app</code> command:</p><pre><code>$ bench <span class="hljs-keyword">new</span>-app library_management
App <span class="hljs-title function_">Title</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params">: Library Management)</span>:
App Description: Library Management System
App Publisher: Faris Ansari
App Email: faris<span class="hljs-meta">@example</span>.com
App <span class="hljs-title function_">Icon</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params"> </span><span class="hljs-params hljs-string">'octicon octicon-file-directory'</span><span class="hljs-params">)</span>:
App <span class="hljs-title function_">Color</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params"> </span><span class="hljs-params hljs-string">'grey'</span><span class="hljs-params">)</span>:
App <span class="hljs-title function_">License</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params"> </span><span class="hljs-params hljs-string">'MIT'</span><span class="hljs-params">)</span>:
<span class="hljs-string">'library_management'</span> created at /home/frappe/frappe-bench/apps/library_management
Installing library_management
$ ./env/bin/pip install -q -U -e ./apps/library_management
$ bench build --app library_management
yarn run v1<span class="hljs-number">.22</span><span class="hljs-number">.4</span>
$ FRAPPE_ENV=production node rollup/build.js --app library_management
Production mode
β Built js/moment-bundle.min.js
β Built js/libs.min.js
β¨ Done in <span class="hljs-number">1.</span>95s.
<br class="ProseMirror-trailingBreak"></code></pre><p>You will be prompted with details of your app, fill them up and an app named <code>library_management</code> will be created in the <code>apps</code> folder.</p><p>To see a complete list of all icons supported in the octicons library, check out <a href="https://primer.style/octicons/" rel="noopener noreferrer nofollow" target="_blank">https://primer.style/octicons/</a></p><h2>App directory structure</h2><p>Your app directory structure should look something like this:</p><pre><code>apps/library<span class="hljs-emphasis">_management
βββ README.md
βββ library_</span>management
β βββ hooks.py
β βββ library<span class="hljs-emphasis">_management
β β βββ </span><span class="hljs-emphasis hljs-strong">__init__</span><span class="hljs-emphasis">.py
β βββ modules.txt
β βββ patches.txt
β βββ public
β β βββ css
β β βββ js
β βββ templates
β β βββ </span><span class="hljs-emphasis hljs-strong">__init__</span><span class="hljs-emphasis">.py
β β βββ includes
β β βββ pages
β β βββ </span><span class="hljs-emphasis hljs-strong">__init__</span><span class="hljs-emphasis">.py
β βββ www
βββ pyproject.toml
</span><br class="ProseMirror-trailingBreak"></code></pre><ul><li><p><strong>library_management:</strong> This directory will contain all the source code for your app</p><ul><li><p><strong>public</strong>: Store static files that will be served from Nginx in production</p></li><li><p><strong>templates</strong>: Jinja templates used to render web views</p></li><li><p><strong>www</strong>: Web pages that are served based on their directory path</p></li><li><p><strong>library_management:</strong> Default Module bootstrapped with app</p></li><li><p><strong>modules.txt:</strong> List of modules defined in the app</p></li><li><p><strong>patches.txt</strong>: Patch entries for database migrations</p></li><li><p><strong>hooks.py</strong>: Hooks used to extend or intercept standard functionality provided by the framework</p></li><li><p><strong>pyproject.toml:</strong> Specifies how your app is built, you can optionally add 3rd party Python dependencies here which will get installed when your app is installed.</p></li></ul></li></ul><p>Next: <a href="/docs/v14/user/en/tutorial/create-a-site" rel="noopener noreferrer nofollow" target="_blank">Create a Site</a></p></div>
</div>
<input value="67c694787c" class="d-none" name="wiki-page-name">
<div class="modal revisions-modal fade" id="revisionsModal" tabindex="-1" role="dialog" aria-labelledby="revisionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="d-flex flex-column">
<h5 class="modal-title revision-title" id="revisionsModalTitle">Create an App</h5>
<span class="small text-muted revision-time">nishant_ edited 5 days ago</span>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="revision-content wiki-content">
<div markdown="1"><p>Create a frappe app scaffold using the bench CLI.</p><h2>Create app</h2><p>Before we start, make sure you're in a bench directory. To confirm, run <code>bench find .</code>:</p><pre><code>$ bench find .
/home/frappe/frappe-bench is a bench directory!
<br class="ProseMirror-trailingBreak"></code></pre><p>To create our Library Management app, run the <code>new-app</code> command:</p><pre><code>$ bench <span class="hljs-keyword">new</span>-app library_management
App <span class="hljs-title function_">Title</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params">: Library Management)</span>:
App Description: Library Management System
App Publisher: Faris Ansari
App Email: faris<span class="hljs-meta">@example</span>.com
App <span class="hljs-title function_">Icon</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params"> </span><span class="hljs-params hljs-string">'octicon octicon-file-directory'</span><span class="hljs-params">)</span>:
App <span class="hljs-title function_">Color</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params"> </span><span class="hljs-params hljs-string">'grey'</span><span class="hljs-params">)</span>:
App <span class="hljs-title function_">License</span> <span class="hljs-params">(</span><span class="hljs-params hljs-keyword">default</span><span class="hljs-params"> </span><span class="hljs-params hljs-string">'MIT'</span><span class="hljs-params">)</span>:
<span class="hljs-string">'library_management'</span> created at /home/frappe/frappe-bench/apps/library_management
Installing library_management
$ ./env/bin/pip install -q -U -e ./apps/library_management
$ bench build --app library_management
yarn run v1<span class="hljs-number">.22</span><span class="hljs-number">.4</span>
$ FRAPPE_ENV=production node rollup/build.js --app library_management
Production mode
β Built js/moment-bundle.min.js
β Built js/libs.min.js
β¨ Done in <span class="hljs-number">1.</span>95s.
<br class="ProseMirror-trailingBreak"></code></pre><p>You will be prompted with details of your app, fill them up and an app named <code>library_management</code> will be created in the <code>apps</code> folder.</p><p>To see a complete list of all icons supported in the octicons library, check out <a target="_blank" rel="noopener noreferrer nofollow" href="https://primer.style/octicons/">https://primer.style/octicons/</a></p><h2>App directory structure</h2><p>Your app directory structure should look something like this:</p><pre><code>apps/library<span class="hljs-emphasis">_management
βββ README.md
βββ library_</span>management
β βββ hooks.py
β βββ library<span class="hljs-emphasis">_management
β β βββ </span><span class="hljs-emphasis hljs-strong">__init__</span><span class="hljs-emphasis">.py
β βββ modules.txt
β βββ patches.txt
β βββ public
β β βββ css
β β βββ js
β βββ templates
β β βββ </span><span class="hljs-emphasis hljs-strong">__init__</span><span class="hljs-emphasis">.py
β β βββ includes
β β βββ pages
β β βββ </span><span class="hljs-emphasis hljs-strong">__init__</span><span class="hljs-emphasis">.py
β βββ www
βββ pyproject.toml
</span><br class="ProseMirror-trailingBreak"></code></pre><ul><li><p><strong>library_management:</strong> This directory will contain all the source code for your app</p><ul><li><p><strong>public</strong>: Store static files that will be served from Nginx in production</p></li><li><p><strong>templates</strong>: Jinja templates used to render web views</p></li><li><p><strong>www</strong>: Web pages that are served based on their directory path</p></li><li><p><strong>library_management:</strong> Default Module bootstrapped with app</p></li><li><p><strong>modules.txt:</strong> List of modules defined in the app</p></li><li><p><strong>patches.txt</strong>: Patch entries for database migrations</p></li><li><p><strong>hooks.py</strong>: Hooks used to extend or intercept standard functionality provided by the framework</p></li><li><p><strong>pyproject.toml:</strong> Specifies how your app is built, you can optionally add 3rd party Python dependencies here which will get installed when your app is installed. </p></li></ul></li></ul><p>Next: <a target="_blank" rel="noopener noreferrer nofollow" href="/docs/v14/user/en/tutorial/create-a-site">Create a Site</a></p></div>
</div>
</div>
<div class="modal-footer d-flex justify-content-between">
<button type="button" data-modal-button="previous" class="previous-revision btn btn-secondary btn-sm hide">Previous</button>
<button type="button" data-modal-button="next" class="next-revision btn btn-secondary btn-sm hide">Next</button>
</div>
</div>
</div>
</div>
<div class="modal page-settings-modal fade" id="pageSettingsModal" tabindex="-1" role="dialog" aria-labelledby="pageSettingsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title page-settings-title">Page Settings</h5>
<button type="button" class="d-block d-sm-none close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Γ</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<div>
<label class="text-muted text-xs" for="pageRoute">Route</label>
<div class="flex align-items-center">
<div class="text-sm wiki-space-route-block" title="Wiki Space route (can't be modified)">
docs/
</div>
<input value="user/en/tutorial/create-an-app" type="text" id="pageRoute" name="pageRoute" class="form-control" style="border-top-left-radius: 0; border-bottom-left-radius: 0;">
</div>
</div>
<div class="mt-4 flex align-content-center">
<input type="checkbox" id="pageHideOnSidebar" name="pageHideOnSidebar">
<label class="text-muted text-xs" for="pageHideOnSidebar">
Hide on Sidebar
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-modal-button="update" class="btn btn-primary btn-sm update-page-settings-button">
Update
</button>
</div>
</div>
</div>
</div>
</div> | Create an App
Create a Frappe app scaffold using the bench CLI.
Create app
Before we start, make sure you're in a bench directory. To confirm, run bench find .:
$ bench find .
/home/frappe/frappe-bench is a bench directory!
To create our Library Management app, run the new-app command:
$ bench new-app library_management
App Title (default: Library Management):
App Description: Library Management System
App Publisher: Faris Ansari
App Email: faris@example.com
App Icon (default 'octicon octicon-file-directory'):
App Color (default 'grey'):
App License (default 'MIT'):
'library_management' created at /home/frappe/frappe-bench/apps/library_management
Installing library_management
$ ./env/bin/pip install -q -U -e ./apps/library_management
$ bench build --app library_management
yarn run v1.22.4
$ FRAPPE_ENV=production node rollup/build.js --app library_management
Production mode
β Built js/moment-bundle.min.js
β Built js/libs.min.js
β¨ Done in 1.95s.
You will be prompted with details of your app, fill them up and an app named library_management will be created in the apps folder.
To see a complete list of all icons supported in the octicons library, check out https://primer.style/octicons/
App directory structure
Your app directory structure should look something like this:
apps/library_management
βββ README.md
βββ library_management
β βββ hooks.py
β βββ library_management
β β βββ __init__.py
β βββ modules.txt
β βββ patches.txt
β βββ public
β β βββ css
β β βββ js
β βββ templates
β β βββ __init__.py
β β βββ includes
β β βββ pages
β β βββ __init__.py
β βββ www
βββ pyproject.toml
library_management: This directory will contain all the source code for your app
public: Store static files that will be served from Nginx in production
templates: Jinja templates used to render web views
www: Web pages that are served based on their directory path
library_management: Default Module bootstrapped with app
modules.txt: List of modules defined in the app
patches.txt: Patch entries for database migrations
hooks.py: Hooks used to extend or intercept standard functionality provided by the framework
pyproject.toml: Specifies how your app is built, you can optionally add 3rd party Python dependencies here which will get installed when your app is installed.
Next: Create a Site | # Create an App
Edit Page New Page Revisions Page Settings
Create a Frappe app scaffold using the bench CLI.
## Create app
Before we start, make sure you're in a bench directory. To confirm, run `bench
find .`:
$ bench find .
/home/frappe/frappe-bench is a bench directory!
To create our Library Management app, run the `new-app` command:
$ bench new-app library_management
App Title (default: Library Management):
App Description: Library Management System
App Publisher: Faris Ansari
App Email: faris@example.com
App Icon (default 'octicon octicon-file-directory'):
App Color (default 'grey'):
App License (default 'MIT'):
'library_management' created at /home/frappe/frappe-bench/apps/library_management
Installing library_management
$ ./env/bin/pip install -q -U -e ./apps/library_management
$ bench build --app library_management
yarn run v1.22.4
$ FRAPPE_ENV=production node rollup/build.js --app library_management
Production mode
β Built js/moment-bundle.min.js
β Built js/libs.min.js
β¨ Done in 1.95s.
You will be prompted with details of your app, fill them up and an app named
`library_management` will be created in the `apps` folder.
To see a complete list of all icons supported in the octicons library, check
out <https://primer.style/octicons/>
## App directory structure
Your app directory structure should look something like this:
apps/library_management
βββ README.md
βββ library_management
β βββ hooks.py
β βββ library_management
β β βββ __init__.py
β βββ modules.txt
β βββ patches.txt
β βββ public
β β βββ css
β β βββ js
β βββ templates
β β βββ __init__.py
β β βββ includes
β β βββ pages
β β βββ __init__.py
β βββ www
βββ pyproject.toml
* **library_management:** This directory will contain all the source code for your app
* **public** : Store static files that will be served from Nginx in production
* **templates** : Jinja templates used to render web views
* **www** : Web pages that are served based on their directory path
* **library_management:** Default Module bootstrapped with app
* **modules.txt:** List of modules defined in the app
* **patches.txt** : Patch entries for database migrations
* **hooks.py** : Hooks used to extend or intercept standard functionality provided by the framework
* **pyproject.toml:** Specifies how your app is built, you can optionally add 3rd party Python dependencies here which will get installed when your app is installed.
Next: [Create a Site](/docs/v14/user/en/tutorial/create-a-site)
##### Create an App
nishant_ edited 5 days ago
Γ
Create a frappe app scaffold using the bench CLI.
## Create app
Before we start, make sure you're in a bench directory. To confirm, run `bench
find .`:
$ bench find .
/home/frappe/frappe-bench is a bench directory!
To create our Library Management app, run the `new-app` command:
$ bench new-app library_management
App Title (default: Library Management):
App Description: Library Management System
App Publisher: Faris Ansari
App Email: faris@example.com
App Icon (default 'octicon octicon-file-directory'):
App Color (default 'grey'):
App License (default 'MIT'):
'library_management' created at /home/frappe/frappe-bench/apps/library_management
Installing library_management
$ ./env/bin/pip install -q -U -e ./apps/library_management
$ bench build --app library_management
yarn run v1.22.4
$ FRAPPE_ENV=production node rollup/build.js --app library_management
Production mode
β Built js/moment-bundle.min.js
β Built js/libs.min.js
β¨ Done in 1.95s.
You will be prompted with details of your app, fill them up and an app named
`library_management` will be created in the `apps` folder.
To see a complete list of all icons supported in the octicons library, check
out <https://primer.style/octicons/>
## App directory structure
Your app directory structure should look something like this:
apps/library_management
βββ README.md
βββ library_management
β βββ hooks.py
β βββ library_management
β β βββ __init__.py
β βββ modules.txt
β βββ patches.txt
β βββ public
β β βββ css
β β βββ js
β βββ templates
β β βββ __init__.py
β β βββ includes
β β βββ pages
β β βββ __init__.py
β βββ www
βββ pyproject.toml
* **library_management:** This directory will contain all the source code for your app
* **public** : Store static files that will be served from Nginx in production
* **templates** : Jinja templates used to render web views
* **www** : Web pages that are served based on their directory path
* **library_management:** Default Module bootstrapped with app
* **modules.txt:** List of modules defined in the app
* **patches.txt** : Patch entries for database migrations
* **hooks.py** : Hooks used to extend or intercept standard functionality provided by the framework
* **pyproject.toml:** Specifies how your app is built, you can optionally add 3rd party Python dependencies here which will get installed when your app is installed.
Next: [Create a Site](/docs/v14/user/en/tutorial/create-a-site)
Previous Next
##### Page Settings
Γ
Route
docs/
Hide on Sidebar
Update
|
Create a Site | https://frappeframework.com/docs/user/en/tutorial/create-a-site | "<div class=\"from-markdown \">\n\t<div class=\"d-flex justify-content-between align-items-center\">(...TRUNCATED) | "Create a Site\nEach site comes with a database. They may be customized throughsite specific scripti(...TRUNCATED) | "# Create a Site\n\nEdit Page New Page Revisions Page Settings\n\nEach site comes with a database. (...TRUNCATED) |
Create a DocType | https://frappeframework.com/docs/user/en/tutorial/create-a-doctype | "<div class=\"from-markdown \">\n\t<div class=\"d-flex justify-content-between align-items-center\">(...TRUNCATED) | "Create a DocType\nDocType is analogous to a Model in other frameworks. Apart from defining properti(...TRUNCATED) | "# Create a DocType\n\nEdit Page New Page Revisions Page Settings\n\nDocType is analogous to a Mode(...TRUNCATED) |
DocType Features
| https://frappeframework.com/docs/user/en/tutorial/doctype-features | "<div class=\"from-markdown \">\n\t<div class=\"d-flex justify-content-between align-items-center\">(...TRUNCATED) | "DocType Features\nIn the previous chapter, we created the Article doctype. Let's see what other fea(...TRUNCATED) | "# DocType Features\n\nEdit Page New Page Revisions Page Settings\n\nIn the previous chapter, we cr(...TRUNCATED) |
Controller Methods
| https://frappeframework.com/docs/user/en/tutorial/controller-methods | "<div class=\"from-markdown \">\n\t<div class=\"d-flex justify-content-between align-items-center\">(...TRUNCATED) | "Controller Methods\nController methods allow you to write business logic during the lifecycle of a (...TRUNCATED) | "# Controller Methods\n\nEdit Page New Page Revisions Page Settings\n\nController methods allow you(...TRUNCATED) |
Types of DocType
| https://frappeframework.com/docs/user/en/tutorial/types-of-doctype | "<div class=\"from-markdown \">\n\t<div class=\"d-flex justify-content-between align-items-center\">(...TRUNCATED) | "Types of DocType\nLet's learn about the different types of doctype in the framework by creating mor(...TRUNCATED) | "# Types of DocType\n\nEdit Page New Page Revisions Page Settings\n\nLet's learn about the differen(...TRUNCATED) |
End of preview. Expand
in Dataset Viewer.
Details About the Dataset
This dataset is prepared from this document.
The entire site details is there.
you can see the Five
column
title
- Its a title of the main content.url
- Its a url of that respective pagemain_content_html
- The main content its inhtml
format.main_content_str
- The main content in theString
format.main_content_md
- The main contetn in theMark Down
format.
This document is generate from the the frappeframework.com
This datasets helps what is Frappe?
and How to use Frappe?
.
- Downloads last month
- 17