This article explains how to install AlchemyCMS on Ubuntu Linux
AlchemyCMS is an open-source, headless content management system (CMS) based on Rails that adapts to your needs. It makes it easy to develop and design static websites and is one of the leading open-source CMS frameworks based on Rails.
You can use AlchemyCMS to create your personal or business websites in minutes by creating markup pages and content. It splits pages into logical parts like headlines, paragraphs, images, etc.
The only things it stores in the database are text, IDs of images, and rich text content. Nothing else.
For more about AlchemyCMS, check its homepage.
These are the packages we’re going to set up.
- Ruby version 2.5.3
- Rails version 5.2.1
- MySQL Server
Install 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 https://deb.nodesource.com/setup_8.x | sudo -E bash - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ 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 libpq-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev 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 https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc exec $SHELL git clone https://github.com/rbenv/ruby-build.git ~/.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 MySQL Server
MySQL server can be installed on Ubuntu by running the commands below:
sudo apt-get install mysql-client mysql-server libmysqlclient-dev
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 https://deb.nodesource.com/setup_8.x | 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 and 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
The installation of AlchemyCMS is straightforward. First, you need to run Ruby’s gem command. To do that, run the commands below.
gem install alchemy_cms npm install gm
Configure AlchemyCMS
Now that your environment is ready run the commands below to install Alchemy CMS and build your first site. Alchemy is a Rails 4 engine, so you can generate a new Rails 4 application by running this command.
rails new alchemycms
Next, change it into the Alchemy CMS folder and install it there.
cd ~/alchemycms
Then, run the commands to open the Gemfile there.
nano Gemfile
Please copy and paste the lines below into the file and save them when it opens.
gem 'alchemy_cms' gem 'alchemy-devise'
Then the file should look like this:
ruby '2.5.3'
#alchemy
gem 'alchemy_cms'
gem 'alchemy-devise'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
Save and exit.
After that, run the commands below:
bundle install
After that, you should see the message below:
Using web-console 3.7.0 Bundle complete! 19 Gemfile dependencies, 103 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from alchemy_cms: ------------------------------------------------------------- Thank you for installing Alchemy CMS ------------------------------------------------------------- - Complete the installation in an existing Rails application: $ bin/rake alchemy:install - Complete the upgrade of an existing Alchemy installation: $ bin/rake alchemy:upgrade and follow the onscreen instructions. Need help? Try: * http://stackoverflow.com/questions/tagged/alchemy-cms * http://groups.google.com/group/alchemy-cms * irc://irc.freenode.net#alchemy_cms
After a while, the necessary packages should be installed. When you’re done, run the commands below to finish installing the CMS.
bin/rails g alchemy:devise:install bin/rake alchemy:install bin/rake alchemy:upgrade
Now that you have installed AlchemyCMS, let’s move on by creating your first user with administrative privileges.
Run the commands below to start the server.
bin/rails s
Open your browser and browse to the localhost, followed by port # 3000. Next, you should see the AlchemyCMS home page.
Log on to the backend using the admin address and password.
http://localhost:3000/admin
You will be greeted with a screen prompting you to create the first user.
Congratulations, you can now access the backend.

Log on to the backend and start building your content.

Congratulation! You have successfully installed the AlchemyCMS platform on Ubuntu 16.04 | 18.04 | 18.10
You may also like the post below:
Leave a Reply