Mosaico Backend

by goodenough




Mosaico backend

Ready to go backend for Mosaico editor.

Main features are:

  • upload templates and images for Mosaico editor
  • persist mailings into DB
  • manage users/groups
  • download ZIP archives of mailings
  • sending mailings by email for testing purpose



  • Node.js >=8.5.0
  • PostgreSQL >=9.6 (postgresapp on a mac)
  • Redis (brew install redis on mac redis-server to start)
  • SMTP server (like mailcatcher: brew install ruby – restart terminal – gem install mailcatcher then mailcatcher)

NB: A compiled version of sharp — which is used to resize images and declared as a dependency — should be fetched automatically by npm for your system environment. In case of troubles see sharp installation instructions.

npm run deps
npm run dev

Then go to: http://localhost:3000

Quick start

See the screencast


Mosaico backend has a decent localhost-first default configuration.

You can override any of these values, in sereval ways, in order of precedence:

  1. command line arguments:
    node server/worker.js --admin__password=shhhhht
  2. environment backend_* variables:
    export backend_admin__password="shhhhht"
    node server/worker.js
  3. creating a .backendrc JSON file placed at project's root folder:
    cat <<EOF > .backendrc
      "admin": {
        "password": "shhhhht"
    or you could also make a copy of .backendrc-example

NB: Internally, we use rc.


Heroku uses 2. environment config vars that will take precedence over our defaults: heroku-config-vars