Benotes: A Note taking alternative to Joplin Notes

Documentation is extremely important if you self-host. I have covered Joplin notes on the channel before in the tutorial “Self Hosting Documentation”. Joplin notes uses a centralized replication server and clients replicate to and from it. Benotes is different because it is entirely web-based with no client software.

Benotes is a Docker application and I nested it inside of a LXD container.

I created the following LXD container:

lxc launch ubuntu:22.04 Benotes --profile default --profile bridgeprofile -c boot.autostart=true -c security.nesting=true

You will need to have a “bridgeprofile” profile to execute the command above which points to a bridge0 device on your LXD host as covered on my other videos.

I connected to the container console:

lxc exec Benotes bash

Next, perform the updates on the new container.

apt update && apt upgrade -y

Install docker and docker-compose.

curl -sSL | sh
sudo apt install docker-compose

Add a user account and add the user to the sudo and docker groups.

adduser scott
usermod -aG sudo scott
usermod -aG docker scott

Move over to the new account.

su - scott

Download the required files from Github:

git clone benotes

Copy the environment variable template:

cp .env.example .env

Edit the environment variable file.

nano .env

I changed the default port from 8000 to 80 since the dedicated LXD container will have port 80 unused. Save the file. It is very important that you change the owner of the ,env file or you will have an error during the installation that follows:

sudo chown 1000:1000 .env

Launch the docker file:

docker-compose up -d

Enter the “app” container to complete the installation.

docker-compose exec --user application app sh

Execute the following command and answer the installation prompts.

php artisan install

At this point you will be able to access the server at http://a.b.c.d/ where a.b.c.d is the IP address of your LXD container as explained in the video.

In order to upgrade to future versions:

docker-compose pull && docker-compose up -d
docker-compose exec app sh
sh docker/