How to Install ApostropheCMS on Ubuntu 18.04
in omd with 0 comment

How to Install ApostropheCMS on Ubuntu 18.04

in omd with 0 comment

[ApostropheCMS] is a modern content management system built on NodeJS with a focus on extensible in-context editing tools. In this tutorial, you will learn how to deploy ApostropheCMS for production on a clean Ubuntu 18.04 server.


Check the Ubuntu version.

lsb_release -ds

# Ubuntu 18.04 LTS

Create a new non-root user account with sudo access and switch to it.

adduser johndoe --gecos "John Doe"
usermod -aG sudo johndoe
su - johndoe

NOTE: _Replace johndoe with your username_.

Set up the timezone.

sudo dpkg-reconfigure tzdata

Ensure that your system is up to date.

sudo apt update && sudo apt upgrade -y

Step 1: Install NodeJS and NPM

Run the following commands to install NodeJS.

curl -sL | sudo -E bash -
sudo apt install -y nodejs

Check the Node and NPM versions.

node -v && npm -v
# v10.x.x
# 6.x.x

In order for some NPM packages to work, you will need to install the build-essential package.

sudo apt-get install -y build-essential

Step 2: Install MongoDB

Import the MongoDB GPG key to your system.

sudo apt-key adv --keyserver hkp:// --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

Once the key is imported, create a list file run.

echo "deb [ arch=amd64 ] bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

Reload the packages list.

sudo apt-get update

Install MongoDB packages.

sudo apt install -y mongodb-org

Start the MongoDB daemon.

sudo service mongod start

Step 3: Install ImageMagick

Install ImageMagick.

sudo apt install -y imagemagick

Check the ImageMagick version.

convert --version
# Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114
# Copyright: © 1999-2017 ImageMagick Studio LLC
# License:
# Features: Cipher DPC Modules OpenMP
# Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib

Step 4: Create a project

Install the apostrophe-cli module.

sudo npm install apostrophe-cli -g

Create a project.

sudo mkdir /var/www
cd /var/www
sudo apostrophe create-project my-project

Change ownership of /var/www/my-project folder to user johndoe.

sudo chown -R johndoe:johndoe /var/www/my-project

Install the dependencies, and start the server.

cd my-project
sudo npm install
sudo node app.js apostrophe-users:add admin admin
sudo node app.js

Next, open your browser and navigate to the IP address or domain at port 3000: http://your_server_ip:3000 or

Your ApostropheCMS setup is now complete.