How to Install Alexandrie on Your Synology NAS

How to Install Alexandrie on Your Synology NAS

Alexandrie is a fast, open-source, self-hostable Markdown note-taking app ideal for students and creators. It offers a clean interface with live preview, folder organization, search, and tagging, all while keeping your data private and under your control. Easily deployable via Docker, it’s a lightweight alternative to tools like Notion. In this step by step guide I will show you how to install Alexandrie on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Alexandrie v8.2.0 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 1

  • STEP 4

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 2

  • STEP 5

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 3

  • STEP 6

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Alexandrie. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: alexandrie.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 8482

Alexandrie Synology NAS Set up 5

  • STEP 7

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 8

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 6

  • STEP 9

Now click the “Create” button. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 7

 

  • STEP 10

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Alexandrie-API. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: alexandrieapi.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 8225

Alexandrie Synology NAS Set up 8

  • STEP 11

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 12

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 9

  • STEP 13

Now click the “Create” button. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 10

  • STEP 14

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Alexandrie-RUSTFS. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: alexandrierustfs.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 9015

Alexandrie Synology NAS Set up 11

  • STEP 15

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 16

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it alexandrie. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Alexandrie Synology NAS Set up 12

  • STEP 17

Now create two new folders inside the alexandrie folder that you created at STEP 16 and name them db and rustfs. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Alexandrie Synology NAS Set up 13

  • STEP 18

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Home then Live connect. Follow the instructions in the image below.

Portainer Add Stack NAS 1

On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

Portainer Add Stack NAS 2

  • STEP 19

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.

  • STEP 20

In the Name field type in alexandrie. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  mysql:
    image: mysql:8
    container_name: Alexandrie-DB
    healthcheck:
      test: mysqladmin -p$$MYSQL_ROOT_PASSWORD ping -h localhost
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: alexandrie
      MYSQL_USER: alexandrieuser
      MYSQL_PASSWORD: alexandriepass
    volumes:
      - /volume1/docker/alexandrie/db:/var/lib/mysql:rw
    restart: on-failure:5

  rustfs:
    image: rustfs/rustfs:latest
    container_name: Alexandrie-RUSTFS
    healthcheck:
      test: ["CMD-SHELL", "nc -z 127.0.0.1 9000 || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 90s
    user: 0:0
    environment:
      RUSTFS_ACCESS_KEY: marius
      RUSTFS_SECRET_KEY: mariushosting
      RUSTFS_CONSOLE_ENABLE: 'false' # Disable web console
      RUSTFS_LOG_LEVEL: info
    ports:
      - 9015:9000
    volumes:
      - /volume1/docker/alexandrie/rustfs:/data:rw
      - /volume1/docker/alexandrie/rustfs:/logs:rw
    restart: on-failure:5
      
  backend:
    image: ghcr.io/smaug6739/alexandrie-backend:latest
    container_name: Alexandrie-BACK
    environment:
      DATABASE_HOST: mysql
      DATABASE_PORT: 3306
      DATABASE_NAME: alexandrie
      DATABASE_USER: alexandrieuser
      DATABASE_PASSWORD: alexandriepass
      JWT_SECRET: dOxZYTTZgXKMHkqLBIQVImayQXAVWdzGBPuFJKggzcgvgPJPXpWzqzKaUOIOGGIr
      DOMAIN_CLIENT: alexandrie.yourname.synology.me #Your own synology.me DDNS STEP 6
      #COOKIE_DOMAIN: synology.me
      MINIO_ENDPOINT: rustfs:9000
      MINIO_ACCESSKEY: marius
      MINIO_SECRETKEY: mariushosting
      MINIO_BUCKET: alexandrie
      SMTP_HOST: smtp.gmail.com
      SMTP_PORT: 587
      SMTP_MAIL: Your-own-gmail-address
      SMTP_PASSWORD: Your-own-app-password
      BACKEND_PORT: 8225
      CPWD: /app/
      GIN_MODE: release
    ports:
      - 8225:8225
    depends_on:
      mysql:
        condition: service_healthy
      rustfs:
        condition: service_started
    restart: on-failure:5

  frontend:
    image: ghcr.io/smaug6739/alexandrie-frontend:latest
    container_name: Alexandrie-FRONT
    healthcheck:
      test: ["CMD-SHELL", "nc -z 127.0.0.1 8200 || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 90s
    environment:
      PORT: 8200
      NUXT_PUBLIC_BASE_API: https://alexandrieapi.yourname.synology.me #Your own synology.me DDNS STEP 10
      NUXT_PUBLIC_BASE_CDN: https://alexandrierustfs.yourname.synology.me/alexandrie #Your own synology.me DDNS STEP 15
      NUXT_PUBLIC_BASE_URL: https://alexandrie.yourname.synology.me #Your own synlogy.me DDNS STEP 6
    ports:
      - 8482:8200
    depends_on:
      - backend
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value for RUSTFS_ACCESS_KEY and MINIO_ACCESSKEY. marius is an example for ACCESSKEY. You should add the same value (marius in my case) to both environments.
Note: Before you paste the code above in the Web editor area below, change the value for RUSTFS_SECRET_KEY and MINIO_SECRETKEY. mariushosting is an example for SECRETKEY. You should add the same value (mariushosting in my case) to both environments.
Note: Before you paste the code above in the Web editor area below, change the value for JWT_SECRET. (Generate your free Random 32 byte base 64 JWT_SECRET.)
Note: Before you paste the code above in the Web editor area below, change the value for DOMAIN_CLIENT and type in your own synology.me DDNS without https:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for SMTP_MAIL and type in your own Gmail address. STEP 19.
Note: Before you paste the code above in the Web editor area below, change the value for SMTP_PASSWORD and type in your own Gmail app password. STEP 19.
Note: Before you paste the code above in the Web editor area below, change the value for NUXT_PUBLIC_BASE_API and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 10.
Note: Before you paste the code above in the Web editor area below, change the value for NUXT_PUBLIC_BASE_CDN and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 14 and /alexandrie at the end.
Note: Before you paste the code above in the Web editor area below, change the value for NUXT_PUBLIC_BASE_URL and type in your own synology.me DDNS without https:// at the beginning that you have previously created at STEP 6.

Alexandrie Synology NAS Set up 14

  • STEP 21

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Alexandrie Synology NAS Set up 15

  • STEP 22

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Portainer Success Stack NAS

  • STEP 23

🟢Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guides forget to support my work, or just ignore STEP 1. I’ve been very honest about this aspect of my work since the beginning: I don’t run any ADS, I don’t require subscriptions, paid or otherwise, I don’t collect IPs, emails, and I don’t have any referral links from Amazon or other merchants. I also don’t have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. It’s something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.

  • STEP 24

Now open your browser and type in your HTTPS/SSL certificate like this https://alexandrie.yourname.synology.me In my case it’s https://alexandrie.mariushosting.synology.me If everything goes right, you will see the Alexandrie main page. Click Get Started. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 16

  • STEP 25

Click Need an account? Sign up to create your own administrator account. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 17

  • STEP 26

Type in your own Username, Email and Password. Click Sign up. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 18

  • STEP 27

At the top right of the page, switch the theme to Dark. On the left sidebar, click on the gear icon to access the settings. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 19

  • STEP 28

On the left sidebar, click CDN to upload your files. Follow the instructions in the image below.

Alexandrie Synology NAS Set up 20

Enjoy Alexandrie!

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Alexandrie container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Container

This post was updated on Monday / December 15th, 2025 at 12:10 AM