Lumen Docs
Docs / Introduction / Getting started

Getting started

This guide takes you from nothing installed to a running project in about five minutes.

Before you begin

You will need:

Install the command line tool

The CLI is distributed through npm. Install it globally:

npm install -g lumen-cli

Confirm the installation worked:

lumen --version

Steps

  1. Log in

    Authenticate the CLI with your account. This opens a browser window to approve the request.

    lumen login
  2. Create a project

    Run this from the root of your application directory. It creates a lumen.json file that links the folder to a project in your account.

    lumen init my-first-project
  3. Deploy

    Push your code. You will get back a preview URL once the build finishes.

    lumen deploy
  4. Promote to production

    When the preview looks right, promote it to your production domain.

    lumen promote --latest

Configuration file

After lumen init, your project contains a lumen.json similar to this:

{
  "name": "my-first-project",
  "build": "npm run build",
  "output": "dist",
  "regions": ["iad1"]
}
Tip Commit lumen.json to version control. Secrets belong in environment variables, not in this file. See Environment variables.

Troubleshooting

"command not found: lumen"

Your global npm bin directory is probably not on your PATH. Run npm config get prefix and add the bin folder inside that path to your shell profile.

Build fails during deploy

Run npm run build locally first. The deploy uses the same command, so any error you see there will also stop the deploy.

Still stuck?

Check the support page or run lumen doctor to print diagnostic information you can paste into a ticket.