Memos - Amazing Open Source, Self-hosted Notes App

Memos - Amazing Open Source, Self-hosted Notes App
In: General

I've tried many note-taking apps like Evernote, OneNote, and Apple Notes, but none really satisfied me, if I'm being honest. I've always wanted something simple, without any over-complication, and either free or cost-effective. Although, I have to admit, at the moment, I'm using an app called 'Bear Notes,' which costs around £2 per month, and I love the app. It's so minimalist and very user-friendly, but it doesn't have a web GUI or an app for Windows. I'm an Apple user, so it's not a big issue.

That being said, I recently stumbled upon another great self-hosted note-taking app called 'Memos' I just couldn't believe that I didn't know about this until very recently. It's so minimalist and has a Twitter-like feed where you can just chuck on any note, links, or even attachments.

https://www.usememos.com/

Memos Installation

If you already have Docker installed, the installation will take just a few seconds. You can use either docker run or docker-compose.

docker run -d \
  --init \
  --name memos \
  --publish 5230:5230 \
  --volume ~/.memos/:/var/opt/memos \
  neosmemo/memos:stable
services:
  memos:
    image: neosmemo/memos:stable
    container_name: memos
    volumes:
      - ~/.memos/:/var/opt/memos
    ports:
      - 5230:5230

In the Docker configuration for Memos, the volumes parameter is important as it manages the storage of data outside the container, ensuring data persistence. Here, ~/.memos/:/var/opt/memos specifies a bind mount volume, which links a directory on the host machine (~/.memos/) to a directory inside the Docker container (/var/opt/memos).

This means that any data saved to /var/opt/memos within the container is actually stored on the host at ~/.memos/. This approach is useful for backing up your data and maintaining it across container updates or restarts.

Memos Impressions

Once the installation is completed, navigate to http://YOUR_IP:5230 and create a local account. Everything you save in the notes app stays on your host and never leaves or goes to someone else.

0:00
/0:30

The UI is very simple, and you just need to start typing. It supports markdown, allowing you to add links and images easily. There is also a calendar, so you can go back in time to look for any specific note. Additionally, it supports tags, making it easier to search for a specific note.

iPhone/Android App

Though there are some third-party apps that you can use with Memos, I discovered that you can open the link in your browser, Firefox in my case, and add this as a bookmark to your iPhone's homepage. It actually adds the favicon as the app icon, and when you open it, it launches like an app. I believe the process should be the same for Android as well but I didn't try it.

However, remember that you need to be on your home network to access it since it still resides within your home network. I use a VPN when I'm away from home, so this wasn't a big concern for me.

HTTPS with Caddy Reverse Proxy

If you install Memos on a publicly accessible server, it is important to ensure that the connection is secure. Otherwise, your password and notes will be transmitted in clear text that can be intercepted by anyone. Using a secure connection will also get rid of the browser warnings that may appear when accessing Memos over plain HTTP.

Although I installed Memos locally and it's not accessible from the Internet, I still set up HTTPS using Caddy. Caddy is a modern web server that automatically handles HTTPS, including certificate issuance and renewal. If you use a public DNS, Caddy can automatically request certificates from Let's Encrypt.

However, since I'm using internal DNS (meaning the domain only resolves internally), Caddy will use its own root CA to sign the certificate. As a result, you will still get HTTPS warnings. You can either ignore these or install Caddy's Root CA in your client's certificate store to establish trust.

Docker Compose File for Memos and Caddy

I've amended the compose file to include Caddy. To be honest, I'm not an expert on Caddy, so I'm just following the official documentation. I created a Caddyfile in the same directory as the compose file and, as always, ran docker-compose up -d to bring up the services. On the Caddyfile I specified the FQDN I want to use to access Memos.

.
├── Caddyfile
└── compose.yaml

0 directories, 2 files
services:
  memos:
    image: neosmemo/memos:stable
    container_name: memos
    restart: unless-stopped
    expose: [5230/tcp]
    volumes:
      - ~/.memos:/var/opt/memos

  caddy:
    image: caddy:2.8
    container_name: caddy
    restart: unless-stopped
    ports:
      - 0.0.0.0:80:80/tcp
      - 0.0.0.0:443:443
    volumes:
      - ~/.caddy/data:/data
      - ~/.caddy/config:/config
      - ~/.caddy/logs:/logs
      - ./Caddyfile:/etc/caddy/Caddyfile
memos.packet.lan {
    tls internal
    reverse_proxy memos:5230
    log {
        format console
        output file /logs/memos.log {
            roll_size 10mb
            roll_keep 20
            roll_keep_for 7d
        }
    }
    encode {
        zstd
        gzip
        minimum_length 1024
    }
}
💡
You can set a specific 'Memo' as public and share the link with anyone. However, this assumes that your Memos server is publicly accessible.
Table of Contents
Written by
Suresh Vina
Tech enthusiast sharing Networking, Cloud & Automation insights. Join me in a welcoming space to learn & grow with simplicity and practicality.
Comments
More from Packetswitch
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Packetswitch.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.