Deploy on a VPS

How to setup LumeCMS on a VPS with live preview and versioning.

The best experience using LumeCMS is when it's connected to Lume, so it can generate live-previews with the changes. It can also manage the git repository in order to pull and push changes to the remote repository and create different versions using branches.

Requirements

You need a server with Ubuntu 24.04. Other Linux versions can work but only Ubuntu 24.04 has been tested so far. Hetzner or Digital Ocean are good solutions if you need a cheap and fast VPS for less than 5$/month.

You also need a domain or subdomain to run the CMS. To do that, in the DNS settings of your domain, add a A record with the IPv4 address of the hosting server.

Tip

A good idea is to use a subdomain like cms or admin. For example, if the site you want to manage is example.com, the CMS would be at cms.example.com or admin.example.com.

Setup

In the repository cms-deploy there's a script to setup LumeCMS automatically. The script does not only install LumeCMS but also:

  • Install/update the required packages (Deno, Git, Caddy, etc).
  • Setup a HTTPS server with Caddy and configures a firewall with ufw.
  • Clone the Git repository of the website and configure LumeCMS to push/pull changes to it.
  • Create services with systemctl to ensure the CMS is always live, restarting it if something fails.
  • Configures a cron to restart the service if the CPU usage is above 95% (see this Deno issue).

To setup LumeCMS in your VPS, follow the instructions in the README.md file of the repo.

Demo

You can see a demo at cms-demo.lume.land.

  • User: admin
  • Password: demo

In the demo you can edit the content of a blog, create different versions (which are stored in local git branches) and even publish the changes of the main branch (to push the changes of main to your remote repository).

The remote repository for this demo is cms-demo-live.