<NME> installation.rst
<BEF> ############
Installation
############

Requirements
===============
You will need a Server to perform well with at least:

* CPU: 2
* RAM: 2GB
* Disk: 10GB
* Python 3

.. note:: **👀 Heads up for modoboa versions 1.15 and later**
   
   Python 2 support has been dropped with modoboa version 1.15. 
   If you still have Python 2 installed on your system either uninstall it 
   or force modoboa user to run with Python 3.

Recommended way
===============

If you start from scratch and want to deploy a complete mail server,
you will love the `modoboa installer
  > git clone https://github.com/modoboa/modoboa-installer
  > cd modoboa-installer
  > sudo ./run.py <your domain>

Wait a few minutes and you're done \o/


  > git clone https://github.com/modoboa/modoboa-installer
  > cd modoboa-installer
  > sudo ./run.py <your domain>
  
  
if you get this warning - '/usr/bin/env: ‘python’: No such file or directory', do make sure sure python is installed on your server. Sometimes python is installed but the installer can't detect it or which python version to run, especially on a debian based system. Then run this command first.

.. sourcecode:: bash

   > sudo apt-get install python-virtualenv python-pip


Wait a few minutes and you're done \o/

.. _by_hand:

Manual installation
===================

For those who need a manual installation or who just want to setup a
specific part, here are the steps you must follow:

.. toctree::
   :maxdepth: 1

   manual_installation/modoboa
   manual_installation/webserver
   manual_installation/dovecot
   manual_installation/postfix
   manual_installation/opendkim

Extensions
----------

Only few commands are needed to add a new extension to your setup.

In case you use a dedicated user and/or a virtualenv, do not forget to
use them:

.. sourcecode:: bash

   > sudo -u <modoboa_user> -i
   > source <virtuenv_path>/bin/activate

Then, run the following commands:

.. sourcecode:: bash

   > pip install <EXTENSION>==<VERSION>
   > cd <modoboa_instance_dir>
   > python manage.py migrate
   > python manage.py collectstatic
   > python manage.py check --deploy

Then, restart your web server.

<MSG> Update Installation Doc (#1242)

* Update Installation Doc

Update Installation Doc to fix missing python path error

* Update installation.rst

* Update installation.rst

<DFF> @@ -25,6 +25,14 @@ To use it, just run the following commands in your terminal:
   > git clone https://github.com/modoboa/modoboa-installer
   > cd modoboa-installer
   > sudo ./run.py <your domain>
+  
+  
+if you get this warning - '/usr/bin/env: ‘python’: No such file or directory', do make sure sure python is installed on your server. Sometimes python is installed but the installer can't detect it or which python version to run, especially on a debian based system. Then run this command first.
+
+.. sourcecode:: bash
+
+   > sudo apt-get install python-virtualenv python-pip
+
 
 Wait a few minutes and you're done \o/
 

Update Installation Doc (#1242)