Deploying Joplin using ArgoCD

In one of my previous posts we deployed the Joplin server using docker-compose. Now we will deploy it on the Kubernetes cluster using ArgoCD.

· 3 min read
Deploying Joplin using ArgoCD
Photo by Aaron Burden / Unsplash

In one of my previous posts we deployed the Joplin server using docker-compose. Now we will deploy it on the Kubernetes cluster using ArgoCD.

Helm Repo

Because I couldn't find an easy helm chart for Joplin, I created my own. You can find it in my helmcharts repository. If you want to add this repo to ArgoCD, go to settings, repositories. There you can choose Connect Repo using SSH or Connect Repo using HTTPS. If you have a GitHub account with a ssh key connected, you could use the SSH option and fill in your SSH private key. If you don't you'll have to use HTTPS. Copy the link from the GitHub repo in the correct field and choose a project to attach the repo to.

Screen Shot 2022-05-09 at 14.51.27.png

Later you could scope that repository to multiple projects.

Deploy App

Now you can go back to the home page of ArgoCD and click New App. Choose a name for your deployment. Choose the default project as we've added the repo to that project. Sync Policy can be set to Automatic if you want changes to be deployed automatically, but as I like more control I chose the Manual option. Check Auto-Create Namespace if you want ArgoCD to create the namespace for you.

In the source pane, select the just created repository and pick the joplin chart. I pick the latest version, which is 5.0.0 at the time of writing this. At Destination you can pick your cluster and choose a namespace to deploy to.

Now we have to fill in the correct values for our environment. We can overwrite specific values in the overview below, but for the ease of copy-pasting we'll write it in Values field. The values and explenation can be found here and here.

global:
  storageClass: "nfs-client"
  app_url: "joplin.example.com"
  postgresql:
    auth:
      password: "ChangeMe!"
      postgresPassword: "ChangeMe!"

postgresql:
  enabled: true

ingress:
  enabled: true
  tls: true
  annotations:
    "kubernetes.io/ingress.class": "public"
    "cert-manager.io/cluster-issuer": "letsencrypt-prd"
    "nginx.ingress.kubernetes.io/proxy-body-size": 16m

mail:
  enabled: true
  host: "smtp.example.com"
  port: "587"
  encryption: "starttls"
  username: "username"
  password: "password"
  from: "joplin@example.local"
  from_name: "Joplin"

Filled in, it will look something like this:

Screen Shot 2022-05-09 at 14.58.19.png

Once you've clicked Create, you'll get an overview of what will be created.

Screen Shot 2022-05-09 at 15.00.10.png

Now you can click on Sync to bring the application to its desired configuration

Screen Shot 2022-05-09 at 15.01.13.png

Setup

Joplin should now be reachable using the url you used in the values file. Now you can log in using the default credentials (user:admin@localhost, password: admin). Change those credentials!. Now you can start adding users and syncing data to it.

Syncing notes & Migrating Old Data

I don't want to lose the data I already had on my existing Joplin server. But as everything is also stored locally, I just had to make sure everything was synced. Next I changed my sync target in Joplin to the new server. It uploaded everything to the new server.

Related Articles

Deploying ArgoCD on Kubernetes
· 2 min read
Deploying a MicroK8s Kubernetes Cluster
· 4 min read
Pushing Notifications Using Gotify
· 1 min read
I Switched from NPM to Traefik
· 4 min read
Taking And Syncing Notes With Joplin
· 2 min read
Website Monitoring Using Uptime Kuma
· 2 min read