How to Install RecipeSage on Your Synology NAS

How to Install RecipeSage on Your Synology NAS

RecipeSage is an open source collaborative recipe keeper, meal planner and shopping list organizer. Share and collaborate on recipes, manage household shopping lists and meal planning, and import recipes from anywhere on the web instantly. In this step by step guide I will show you how to install RecipeSage on your Synology NAS with Docker & Portainer. Note: This container will not work in a NAS without AVX support.

💡Note: This guide works perfectly with the latest version of RecipeSage v2.13.7

  • 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

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

  • STEP 4

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

RecipeSage Synology NAS Set up 1

  • STEP 5

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

RecipeSage Synology NAS Set up 2

  • 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 RecipeSage. After that, add the following instructions:

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

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 6914

RecipeSage Synology NAS Set up 3

  • 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 / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

RecipeSage Synology NAS Set up 4

  • STEP 9

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

RecipeSage Synology NAS Set up 5

  • STEP 10

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

RecipeSage Synology NAS Set up 6

  • STEP 11

Now create three new folders inside the recipesage folder that you have previously created at STEP 10 and name them apimedia, db, typesense. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

RecipeSage Synology NAS Set up 7

  • STEP 12

Download (click on the blue link below) then upload the proxy.conf file below in the recipesage folder that you have previously created at STEP 10. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

👉🏻Download proxy.conf

RecipeSage Synology NAS Set up 8

  • STEP 13

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 14

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

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

version: "3.9"
services:
  db:
    image: postgres:16
    container_name: RecipeSage-DB
    hostname: recipesage-db
    mem_limit: 1024m
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "recipesage", "-U", "recipesageuser"]
      timeout: 45s
      interval: 10s
      retries: 10
    volumes:
      - /volume1/docker/recipesage/db:/var/lib/postgresql/data:rw
    environment:
      POSTGRES_DB: recipesage
      POSTGRES_USER: recipesageuser
      POSTGRES_PASSWORD: recipesagepass
    restart: on-failure:5

  pushpin:
    image: julianpoy/pushpin:2023-09-17
    container_name: RecipeSage-PUSHPIN
    hostname: pushpin
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    environment:
      target: api:3000
    restart: on-failure:5

  typesense:
    image: typesense/typesense:0.25.1
    command: "--data-dir /data --api-key=recipesage_selfhost --enable-cors"
    container_name: RecipeSage-TYPESENSE
    hostname: typesense
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    read_only: true
    user: 1026:100
    volumes:
      - /volume1/docker/recipesage/typesense:/data:rw
    restart: on-failure:5

  browserless:
    image: browserless/chrome:1.61-puppeteer-21.4.1
    container_name: RecipeSage-BROWSER
    hostname: browserless
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    user: 1026:100
    environment:
      MAX_CONCURRENT_SESSIONS: 3
      MAX_QUEUE_LENGTH: 10
    restart: on-failure:5

  ingredient-instruction-classifier:
    image: julianpoy/ingredient-instruction-classifier:1.4.9
    container_name: RecipeSage-CLASSIFIER
    hostname: ingredient-instruction-classifier
    mem_limit: 2g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    read_only: true
    user: 1026:100
    environment:
      SENTENCE_EMBEDDING_BATCH_SIZE: 200
      PREDICTION_CONCURRENCY: 4
    restart: on-failure:5

  api:
    image: julianpoy/recipesage-selfhost:api-latest
    command: npx ts-node --swc --project packages/backend/tsconfig.json packages/backend/src/bin/www
    container_name: RecipeSage-API
    hostname: api
    mem_limit: 2g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    volumes:
      - /volume1/docker/recipesage/apimedia:/rs-media:rw
    environment:
      STORAGE_TYPE: filesystem
      FILESYSTEM_STORAGE_PATH: /rs-media
      NODE_ENV: selfhost
      VERBOSE: false
      VERSION: selfhost
      POSTGRES_DB: recipesage
      POSTGRES_USER: recipesageuser
      POSTGRES_PASSWORD: recipesagepass
      POSTGRES_PORT: 5432
      POSTGRES_HOST: recipesage-db
      POSTGRES_SSL: false
      POSTGRES_LOGGING: false
      DATABASE_URL: postgresql://recipesageuser:recipesagepass@recipesage-db:5432/recipesage
      GCM_KEYPAIR: 
      SENTRY_DSN: 
      GRIP_URL: http://pushpin:5561/
      GRIP_KEY: changeme
      SEARCH_PROVIDER: typesense
      TYPESENSE_NODES: '[{"host": "typesense", "port": 8108, "protocol": "http"}]'
      TYPESENSE_API_KEY: recipesage_selfhost
      STRIPE_SK: 
      STRIPE_WEBHOOK_SECRET: 
      BROWSERLESS_HOST: browserless
      BROWSERLESS_PORT: 3000
      INGREDIENT_INSTRUCTION_CLASSIFIER_URL: http://ingredient-instruction-classifier:3000/
    restart: on-failure:5
    depends_on:
      db:
        condition: service_healthy
      pushpin:
        condition: service_started
      typesense:
        condition: service_started
      browserless:
        condition: service_started

  static:
    image: julianpoy/recipesage-selfhost:static-latest
    container_name: RecipeSage-STATIC
    hostname: static
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    environment:
      API_BASE_OVERRIDE: null
    restart: on-failure:5

  proxy:
    image: nginx:latest
    container_name: RecipeSage-PROXY
    hostname: proxy
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    ports:
      - 6914:80
    volumes:
      - /volume1/docker/recipesage/proxy.conf:/etc/nginx/conf.d/default.conf:ro
    restart: on-failure:5
    depends_on:
      static:
        condition: service_started
      api:
        condition: service_started
      pushpin:
        condition: service_started

Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own UID and GID values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.

RecipeSage Synology NAS Set up 9

  • STEP 15

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.

RecipeSage Synology NAS Set up 10

⌛Now just wait because the RecipeSage images are about 11GB.

  • STEP 16

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

RecipeSage Synology NAS Set up 11

  • STEP 17

On the left sidebar in Portainer, click Containers. Identify your RecipeSage-API instance, then click on the little terminal icon. Follow the instructions in the image below.

RecipeSage Synology NAS Set up 12

  • STEP 18

After you click on the little terminal icon at STEP 17, a new page will open. From the dropdown menu select /bin/ash then click Connect. Follow the instructions in the image below.

RecipeSage Synology NAS Set up 13

  • STEP 19

After you click Connect at STEP 18, a Console will open. Copy paste the code below and confirm by pressing Enter on your keyboard to start the RecipeSage migration process. Follow the instructions in the image below.

tsx packages/backend/src/migrate

RecipeSage Synology NAS Set up 14

  • STEP 20

After a few seconds all migrations will be successfully performed.

RecipeSage Synology NAS Set up 15

  • STEP 21

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 22

Now open your browser and type in your HTTPS/SSL certificate like this https://recipesage.yourname.synology.me that you have previously created at STEP 6. In my case it’s https://recipesage.mariushosting.synology.me If everything goes right, you will see the RecipeSage start page. Click CREATE AN ACCOUNT. Follow the instructions in the image below.

RecipeSage Synology NAS Set up 16

  • STEP 23

Type in your own details then click CREATE ACCOUNT. Follow the instructions in the image below.

RecipeSage Synology NAS Set up 17

  • STEP 24

Your RecipeSage dashboard at a glance!

RecipeSage Synology NAS Set up 18

  • STEP 25

From now on, if you want to restrict user registration to your RecipeSage instance, just add in the compose at STEP 14 the following line under BROWSERLESS_PORT: 3000

DISABLE_REGISTRATION: true

Enjoy RecipeSage!

🆘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 RecipeSage 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 Containers.

This post was updated on Sunday / February 25th, 2024 at 10:50 PM