Lichen CMS Tutorial
This is a tutorial on how to set up Lichen, a minimal CMS/static site server that uses Gemtext for the user to create pages, on Nearly Free Speech. To run it locally, follow the instructions on the Lichen site.
Make sure you have these things downloaded before getting started:
- NearlyFreeSpeech account (using all recommended defaults should be fine)
- Some kind of terminal (OSX's "Terminal" or iTerm2)
- Any web browser
- Create a new account and make a new site.
- Get your SSH login details from the site under the "Sites" tab (enable SSH if not yet enabled).
- Using your terminal, SSH into your site. Follow the recommendations from NFS on how to log in (correct username, domain, etc.).
- Clone the Lichen repo in your
git clone <repo.url>(you should automatically be in the
publicfolder, but to check, try
echo $PWD). If you type
ls -l, you should see a folder called
- Move all the files from the new
lichenfolder into the
mv ./lichen/* ./. If you type
ls -l, you should see a lot more files and folders.
- Go into the
- Verify that all
.cgifiles in the
cgi-binfolder have execute permissions enabled. If you type
ls -l *.cgi, all entries should have a series of letters and hyphens and the start of the line; these should all contain three
- Go back to the
- Ensure that the public files can be written and modified by your web server; this may require changing file or directory permissions:
chgrp -R web /home/public.
At this point, if you go to the URL for your site (make sure you turn off maintenance mode), you should see the stock Lichen homepage!
Now that we have the software installed, we are going to add edit functionality. We need to make a password file for Lichen to read so we can edit pages.
htpasswd is a way for Apache to create an encrypted password file on the server.
- Create a new "AuthUserFile" and user using
htpasswd. From the
htpasswd -c ../protected/.htpasswd newUserName. Enter in the password for your new user; this is what you will use for editing pages in Lichen.
- Find the "Apache Document Root" for your site on Nearly Free Speech under the "Sites" tab and the current site.
- Edit the
- Change the
AuthUserFileline, replacing the filepath with what you copied off of NFS followed by the path to the new
htpasswdfile. e.g. If your Apache Document Root is
/fabc/test_domain/, you would change the line to
Now we should be able to navigate to the URL for our site followed by
/cgi-bin/edit.cgi and enter in our username and password, resulting in access to the CMS backend!
Last modified: 202303070540