The flatnotes is a web application designed for taking notes. It operates without the need for a database, instead storing notes as markdown files within a single directory.
This tutorial explains how to install flatnotes inside a Docker container on Linux. Commands have been tested on Ubuntu.
Prepare environment
Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.
Install flatnotes
- Host network
Run the following command to create a container for flatnotes that uses host network:
docker run -d --name=flatnotes --restart=always --network=host \
    -v /opt/flatnotes/data:/data \
    -e FLATNOTES_AUTH_TYPE=password \
    -e FLATNOTES_USERNAME=admin \
    -e FLATNOTES_PASSWORD=pwd123 \
    -e FLATNOTES_SECRET_KEY=aLongRandomSeriesOfCharacters \
    dullage/flatnotes- User-defined bridge network
User-defined bridge network can be used for listening on different port. By default, flatnotes service is listening on port 8080. It can be changed with -p option.
docker network create app-netdocker run -d --name=flatnotes --restart=always --network=app-net \
    -p 8081:8080 \
    -v /opt/flatnotes/data:/data \
    -e FLATNOTES_AUTH_TYPE=password \
    -e FLATNOTES_USERNAME=admin \
    -e FLATNOTES_PASSWORD=pwd123 \
    -e FLATNOTES_SECRET_KEY=aLongRandomSeriesOfCharacters \
    dullage/flatnotesNotes:
- Don't forget to update the password for adminwithFLATNOTES_PASSWORD.
- The secret key is used for generating access tokens. Change it with FLATNOTES_SECRET_KEY.
Testing flatnotes
Open a web browser and go to http://<IP_ADDRESS>:8080, where <IP_ADDRESS> is the IP address of the system. Log in to the UI with the admin username and password.
 
Uninstall flatnotes
To completely remove flatnotes, remove its container:
docker rm --force flatnotesRemove flatnotes image:
docker rmi dullage/flatnotesYou can also remove flatnotes data:
sudo rm -rf /opt/flatnotesIf a user-defined bridge network was created, you can delete it as follows:
docker network rm app-net 
             
                         
                         
                        
Leave a Comment
Cancel reply