Support AdonisJs development by becoming a patron
Support AdonisJs


Installing AdonisJs is a relatively straightforward process and will only take a few minutes. Feel free to file an issue if you ever face any problems during the installation process.

Installing Node.js & Npm

Being a Node.js framework, AdonisJs has a core dependency on Node.js. Make sure the installed version of Node.js is 4.0 or greater.

Npm is a package manager for Node.js. During the development process, you will find yourself using npm install a lot. Hence all dependencies are pulled from npm only.

In October 2016 v6.x.x of Node.js will be under LTS and also the newer versions of AdonisJs will be targeted towards Node.js v6.0 or greater. So it is recommended to use one of the latest releases of Node.js. The existing version of the framework will be compatible with Node.js 4.0 or greater.


You can download the installer for your OS from Node.js downloads page, or should make use of Nvm. Nvm is a command line tool to install and use multiple versions of Node.js on a single machine.

Verifying Installation

Once you are done with the download process, make sure to verify the installed version of Node.js and npm.

node -v
# >= v4.0.0

and for npm

npm -v
# >= 3.0.0

Installing Adonis-CLI

Adonis-CLI is a command line tool to install stable and dev releases of AdonisJs with all required dependencies. It is an npm package and needs to be installed globally.

npm i -g adonis-cli

Run the following command to verify the installation of adonis-cli. Sometimes you may have to open a new terminal tab to get it working.

adonis --help
adonis new
adonis fix

Creating New Project

Once the adonis-cli has been installed, you can make use of the adonis global from your command line. Let’s use it to create a new project.

adonis new yardstick

Using Yarn

If you are thrilled with yarn and do not want to install your dependencies using npm. Run the following command.

adonis new yardstick --skip-npm
Cloning into 'yardstick'...
cleaning project
setting up app key
Fixing ace file
installing dependencies may take a while
installing dependencies...

new command will create a project called yardstick with pre-defined directory structure and will also install all the required dependencies from npm.

If new command fails in the middle, make sure to cd into the newly created project and manually run npm install.

Getting Proxies Error

Older versions of Node.js requires --harmony_proxies flag to add support for ES2015 Proxies. If you are using Node.js < 6.0, make sure to make following changes.

Replace the scripts inside package.json file with following

"scripts": {
  "dev": "nodemon --watch app --watch bootstrap --watch config --watch .env -x \"node --harmony_proxies\" server.js",
  "start": "node --harmony_proxies server.js"

Replace the first line of the ace file with following .ace

#!/usr/bin/env node --harmony_proxies

Serving The App

You are all set to see your brand new project. Run the below commands to start a development server.

cd yardstick
npm run dev
[nodemon] starting `node server.js`
info adonis:framework serving app on http://localhost:3333

By default, AdonisJs will use port 3333 to start the server, which is configurable via .env file. Now open http://localhost:3333 to see the welcome page.

Welcome page

Manual Installation

If for any reasons you are not using Adonis CLI ( which you should ), you have to perform following steps to clone the repo from GitHub and manually install dependencies.

git clone --dissociate yardstick
cd yardstick
Installing dependencies
npm install