Updated: 28 September 2026 · Applies to: ApostropheCMS 4 on Ubuntu 24.04 (Node.js 24)

Ubuntu 18.04 is end of life. ApostropheCMS is a Node.js content management system with in-context editing, backed by MongoDB. The current major version is Apostrophe 4, which needs Node.js 22 or newer. This guide uses Ubuntu 24.04.

Install Node.js (current LTS)

Use the NodeSource packages for the current Long-Term-Support release (24.x at the time of writing; check nodejs.org):

curl -fsSL https://deb.nodesource.com/setup_24.x | bash -    # Ubuntu / Debian
apt install nodejs

curl -fsSL https://rpm.nodesource.com/setup_24.x | bash -    # AlmaLinux / Rocky
dnf install nodejs

Check with node -v and npm -v.

Tip: For development machines, or several Node versions side by side, use nvm instead: install it from its GitHub page, then nvm install --lts.

Install MongoDB

Follow the MongoDB steps in "How to install MEAN Stack (MongoDB, Express.JS, Angular.JS, Node.JS) on Ubuntu 16.04" (updated for Ubuntu 24.04).

Create a project

npm install -g @apostrophecms/cli
apos create mysite          # asks for an admin password
cd mysite
npm run dev                   # development server on port 3000

Run it in production

NODE_ENV=production npm run build
npm install -g pm2
NODE_ENV=production pm2 start app.js --name mysite
pm2 save && pm2 startup

Put Nginx in front of port 3000 with HTTPS. Log in at /login with the admin user.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket