Lookaway CMS Production Server - Ubuntu 20

Documented by Kyle Bruder on Oct 09, 2020
Last updated on Feb 21, 2021

Ubuntu Server 20 logo


There's not much to downloading Lookaway CMS and running it locally on your own network or own server. Getting it up on the Internet however, is a bit more involved. If standing up a website were easy, everyone would have one! If you have at least a little experience using the Linux command line, I encourage you to give this a shot.

  1. Requirements

    You will need sudo access to a server running Ubuntu Server 20 that is connected to the public Internet. You will also need a domain name which can easily be obtained to less than $15 in most cases.

  2. Server Software

    Installing Lookaway CMS Services - Ubuntu 20

    Learn how to install the services needed to run a production server using Ubuntu Server 20

  3. Database Configuration

    Lookaway CMS Database Configuration - Postgresql 10

    Learn how to configure a Postgresql database and role for use with Lookaway CMS

  4. Virtual Environment

    While logged in as the Lookaway service user, install virtualenv and create an environment for Lookaway CMS. Then activate the environment and change directory into the environment directory.

    Create and Activate a Virtual Environment - Python Development

    Learn how to create and activate a virtual software development environment in Ubuntu Server 20

  5. Lookaway CMS Code

    Tip: Before downloading make sure you are logged in as the service user and you have activated the virtual environment.

    (lookaway-env) git clone https://github.com/kylebruder/lookaway.git
    (lookaway-env) cd lookaway
    (lookaway-env) pip install -r requirements.txt

  6. Configure Services

    For the next step, we will tie up some loose ends and create some links.

    Tip: Make sure you are logged in on an account with sudo permissions.

    Lookaway CMS Services Configuration - Ubuntu 20

    Configure system level services such as Nginx and Gunicorn needed to serve Lookaway CMS

  7. Initialize Lookaway Data

    Initialize Lookaway CMS and services for your specific host by creating secret keys and passwords and linking the appropriate configurations and files.

    Tip: Make sure you are logged in as the Lookaway service user and have activated the Lookaway virtual environment.

    Lookaway CMS Initialization - Ubuntu 20

    Learn how to initialize all of the modules, files, and configurations for a fresh production Lookaway CMS installation on a server running Ubuntu Server 20

  8. Server Firewall

    Use the following commands to allow web traffic to and from the server.

    Tip: Make sure you are logged in on an account with sudo permissions.

    $ sudo ufw allow http && sudo ufw allow https

  9. Ensure Server Persistence

    If you made it this far, great job! A fresh and empty Lookaway server should be ready for use. The last thing we need to do is enable the services in System V and restart the server to make sure everything starts at boot in the event that the server is restarted. Use the following commands to enable services and restart the server. Wait a few minutes, then log back into to check that your services are running.

    Tip: Make sure you are logged in on an account with sudo permissions.

    $ sudo systemctl enable gunicorn & sudo systemctl enable nginx & sudo systemctl enable postgresql & sudo systemctl enable postfix
    $ sudo shutdown -r now

Referenced by

Calculate a Baseline for Unique Website Hits Using Bash | Lookaway Information

Learn how to nail down a baseline for "unique" hits to a website by using bash commands to filter and count lines in a Nginx access log file.

Lookaway CMS - Open Source Content Management System

Lookaway CMS is an open source content management system for independent publishing. Built with Python and Django.