How to Install LocomotiveCMS on Ubuntu Linux

laptop 4662049 640
laptop 4662049 640

LocomotiveCMS is a simple Open-Source content management system (CMS) that makes it super easy to develop and design static websites.

Creating markup pages and content helps you create your personal or business websites in minutes. In addition, LocomotiveCMS offers features that may not be available to other PHP-based CMS, like WordPress, Joomla, or Drupal.

For one, it doesn’t require a database, and you don’t have to worry about comments management and frequent updates. All you do is write your content, and it’s instantly published. Other features like permalinks, categories, pages, posts, and custom layouts are all top content and SEO-friendly.

  • Ruby version 2.5.3
  • Rails version 5.2.1
  • MariaDB

Installing Ruby

You’ll need to install some dependencies to install Ruby and Rails on Ubuntu. To make that happen, install Node.js and Yarn repositories. This will make installing the dependencies easier.

First, install these curl and git packages.

sudo apt update
sudo apt install curl git

Then run the commands below to add Node.js and Yarn repositories and keys to your system. Then install some core packages to get your environment going.

curl -sL | sudo -E bash -
curl -sS | sudo apt-key add -
echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update
sudo apt-get install nodejs yarn zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

When you’re done, Continue below:

After adding the repositories and installing the necessary packages above, install Ruby with your local profile settings using rbenv. You’ll then use rbenv to install ruby-build.

cd ~/
git clone ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

After setting up your local profile, run the commands below to install Ruby version 2.5.3. If a newer version is available, replace the version number with that. Then, visit this site to find out about Ruby’s latest versions.

rbenv install 2.5.3
rbenv global 2.5.3

To verify that Ruby is installed, run the commands below:

ruby -v

You should see similar lines below:

ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]

Another package management you’ll want to install is bundler. to do that, run the commands below

gem install bundler

Now run the command below after installing the bundler.

rbenv rehash

Install Rails

Now that the Ruby environment is set up run the commands below to install Rails. Rails can be installed from Node.Js. First, run the commands below to install the Node.js repository, then install the Node.js package.

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

Now that Node.js is installed run the commands below to install Rails.

gem install rails -v 5.2.1

Don’t forget to rehash your rbenv environment installing install new packages.

rbenv rehash

To verify if Rails is installed, run the commands below.

rails -v

You should see something similar to the lines below:

Rails 5.2.1

Install LocomotiveCMS

Now that your environment is ready run the commands below to install LocomotiveCMS and build your first site. Next, run the commands below.

gem install locomotivecms_wagon

To verify the version you’re running, type the commands below

wagon version

After that, run the commands below to create a new site called in your home directory.

mkdir -p ~/
cd ~/
wagon init -t bootstrap
# Use y or n when questions are promted
bundle install

Finally, run the commands below to start the server.

bundle exec wagon serve

It should start on the local IP followed by port 3333

Your site is served now.

That’s it!
Now open your browser and browse to the server hostname or IP followed by port 3333

You should see the page below:

LocomotiveCMS ubuntu install

That’s it!

Posted by
Richard W

I love computers; maybe way too much. What I learned I try to share at

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: