1"use strict";(globalThis.webpackChunkdawarich_app=globalThis.webpackChunkdawarich_app||[]).push([[2169],{96547(e,n,r){r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"self-hosting/installation/synology","title":"Synology","description":"Step-by-step guide to install and configure Dawarich on a Synology NAS using Container Manager.","source":"@site/docs/self-hosting/installation/synology.md","sourceDirName":"self-hosting/installation","slug":"/self-hosting/installation/synology","permalink":"/docs/self-hosting/installation/synology","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2,"title":"Synology","description":"Step-by-step guide to install and configure Dawarich on a Synology NAS using Container Manager."},"sidebar":"tutorialSidebar","previous":{"title":"Docker Compose","permalink":"/docs/self-hosting/installation/docker-compose"},"next":{"title":"Unraid","permalink":"/docs/self-hosting/installation/unraid"}}');var o=r(74848),i=r(28453);const t={sidebar_position:2,title:"Synology",description:"Step-by-step guide to install and configure Dawarich on a Synology NAS using Container Manager."},l="Synology",a={},d=[{value:"Preparation",id:"preparation",level:2},{value:"Container manager",id:"container-manager",level:3},{value:"Web station",id:"web-station",level:3},{value:"Project folder preparation",id:"project-folder-preparation",level:3},{value:"Docker root share",id:"docker-root-share",level:3},{value:"Dawarich root folder",id:"dawarich-root-folder",level:4},{value:"Installation",id:"installation",level:2},{value:"Project create",id:"project-create",level:3},{value:"Configuration",id:"configuration",level:3},{value:"DNS",id:"dns",level:4},{value:"Dawarich",id:"dawarich",level:4},{value:"Run",id:"run",level:2},{value:"Link in the Main menu",id:"link-in-the-main-menu",level:2},{value:"Web station",id:"web-station-1",level:3},{value:"Custom application",id:"custom-application",level:3},{value:"Default credentials",id:"default-credentials",level:2}];function c(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:(0,o.jsxs)(n.em,{children:["The author of the original tutorial on Github is ",(0,o.jsx)(n.a,{href:"https://github.com/djhrum",children:"djhrum"})]})}),"\n",(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"synology",children:"Synology"})}),"\n",(0,o.jsx)(n.h2,{id:"preparation",children:"Preparation"}),"\n",(0,o.jsx)(n.h3,{id:"container-manager",children:"Container manager"}),"\n",(0,o.jsxs)(n.p,{children:["Firstly you need to install ",(0,o.jsx)(n.a,{href:"https://www.synology.com/en-global/dsm/feature/container-manager",children:"Container manager"})," on your DSM."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Open Synology DSM web UI."}),"\n",(0,o.jsxs)(n.li,{children:["In the main menu open ",(0,o.jsx)(n.strong,{children:"Package Center"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Search ",(0,o.jsx)(n.strong,{children:"Container Manager"}),' in the "open source" section.']}),"\n",(0,o.jsx)(n.li,{children:"Install that."}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"web-station",children:"Web station"}),"\n",(0,o.jsxs)(n.p,{children:["Do the same for ",(0,o.jsx)(n.a,{href:"https://www.synology.com/en-global/dsm/packages/WebStation",children:"Web station"})," packet."]}),"\n",(0,o.jsx)(n.h3,{id:"project-folder-preparation",children:"Project folder preparation"}),"\n",(0,o.jsx)(n.h3,{id:"docker-root-share",children:"Docker root share"}),"\n",(0,o.jsx)(n.p,{children:"If you don't yet have separate share for docker projects would be good to create it."}),"\n",(0,o.jsx)(n.p,{children:"If you don't want to use dedicated share for projects installed by docker skip it and go to the next chapter."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Open ",(0,o.jsx)(n.strong,{children:"Control panel"})," -> ",(0,o.jsx)(n.strong,{children:"Shared folder"})," -> ",(0,o.jsx)(n.strong,{children:"Create"})," -> ",(0,o.jsx)(n.strong,{children:"Create shared folder"})]}),"\n",(0,o.jsxs)(n.li,{children:["Set name, for example ",(0,o.jsx)(n.strong,{children:"docker"}),", and location."]}),"\n",(0,o.jsxs)(n.li,{children:["Check ",(0,o.jsx)(n.strong,{children:'Hide this shared folder in "My Network Places"'}),". This hides this folder from listening by smb, afp, ftp shares."]}),"\n",(0,o.jsxs)(n.li,{children:["Click ",(0,o.jsx)(n.strong,{children:"Next"})," several times until you see ",(0,o.jsx)(n.strong,{children:"Configure user permissions"})," window."]}),"\n",(0,o.jsxs)(n.li,{children:["Check ",(0,o.jsx)(n.strong,{children:"Read/write"})," access for your user and ",(0,o.jsx)(n.strong,{children:"No Access"})," for all another."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"dawarich-root-folder",children:"Dawarich root folder"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Open your ",(0,o.jsx)(n.a,{href:"#docker-root-share",children:"Docker root folder"})," in ",(0,o.jsx)(n.strong,{children:"File station"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Create new folder ",(0,o.jsx)(n.strong,{children:"dawarich"})," and open it."]}),"\n",(0,o.jsxs)(n.li,{children:["Create folders ",(0,o.jsx)(n.strong,{children:"redis"}),", ",(0,o.jsx)(n.strong,{children:"db_data"}),", ",(0,o.jsx)(n.strong,{children:"db_shared"}),", ",(0,o.jsx)(n.strong,{children:"app_storage"})," and ",(0,o.jsx)(n.strong,{children:"public"})," in the ",(0,o.jsx)(n.strong,{children:"dawarich"})," folder."]}
1),"\n",(0,o.jsxs)(n.li,{children:["Download ",(0,o.jsx)("a",{href:"/downloads/synology/docker-compose.yml",download:"docker-compose.yml",children:"docker-compose.yml"})," and ",(0,o.jsx)("a",{href:"/downloads/synology/synology.env",download:"synology.env",children:"synology.env"})," into the ",(0,o.jsx)(n.strong,{children:"dawarich"})," folder. Rename ",(0,o.jsx)(n.code,{children:"synology.env"})," to ",(0,o.jsx)(n.code,{children:".env"})," (including the leading dot). If your browser displays a file, use ",(0,o.jsx)(n.strong,{children:"Save link as"})," and keep the filename."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["These templates are for a new installation and run Dawarich in production mode. For an existing installation, follow ",(0,o.jsx)(n.a,{href:"/docs/self-hosting/updating",children:"Updating Dawarich"})," and keep your existing environment settings, secrets and storage paths instead of replacing them with these templates."]}),"\n",(0,o.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,o.jsx)(n.h3,{id:"project-create",children:"Project create"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Open ",(0,o.jsx)(n.strong,{children:"Container Manager"})," -> ",(0,o.jsx)(n.strong,{children:"Projects"})," -> ",(0,o.jsx)(n.strong,{children:"Create"})]}),"\n",(0,o.jsxs)(n.li,{children:["In ",(0,o.jsx)(n.strong,{children:"create project window"}),".","\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.strong,{children:"project name"})," as you wish."]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.strong,{children:"path"})," to ",(0,o.jsx)(n.a,{href:"#dawarich-root-folder",children:"Dawarich root folder"}),".","\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["DSM asks about existed docker-compose file, choose ",(0,o.jsx)(n.strong,{children:"use existing a docker-compose.yml to create the project"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["Click ",(0,o.jsx)(n.strong,{children:"Next"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Check ",(0,o.jsx)(n.strong,{children:"Set up web portal via Web Station"}),".","\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Select container name, port, and ",(0,o.jsx)(n.strong,{children:"http"})," protocol (not https)."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.li,{children:'Click "Next".'}),"\n",(0,o.jsxs)(n.li,{children:["Uncheck ",(0,o.jsx)(n.strong,{children:"Start the project once it is created"}),"."]}),"\n",(0,o.jsx)(n.li,{children:'Click "Done".'}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:['In the popup "dawarich has been created. Go to Web Station to configure the web portal for the container." click "OK". ',(0,o.jsx)(n.strong,{children:"Web station"})," Portal Creation Wizard will be opened."]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.strong,{children:"portal type"})," to ",(0,o.jsx)(n.strong,{children:"Name-based"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.strong,{children:"hostname"})," as your wish. For example, if your DSM has hostname ",(0,o.jsx)(n.strong,{children:"my-syno.com"}),", you can use ",(0,o.jsx)(n.strong,{children:"dawarich.my-syno.com"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Check ",(0,o.jsx)(n.strong,{children:"HTTPS settings - HSTS"}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.p,{children:["I expected that you have configured the certificate in DSM. See ",(0,o.jsx)(n.strong,{children:"Control panel"})," -> ",(0,o.jsx)(n.strong,{children:"Security"})," -> ",(0,o.jsx)(n.strong,{children:"Certificate"}),". For example, previously you configured ",(0,o.jsx)(n.strong,{children:"QuickConnect"})," or ",(0,o.jsx)(n.strong,{children:"DynDNS"})," (DDNS). See ",(0,o.jsx)(n.strong,{children:"Control panel"})," -> ",(0,o.jsx)(n.strong,{children:"External Access"})]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["Click ",(0,o.jsx)(n.strong,{children:"Create"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"configuration",children:"Configuration"}),"\n",(0,o.jsx)(n.h4,{id:"dns",children:"DNS"}),"\n",(0,o.jsxs)(n.p,{children:["On your local DNS server, you need to add new record with ",(0,o.jsx)(n.code,{children:"dawarich.my-syno.com"})," and IP address of Synology (see ",(0,o.jsx)(n.strong,{children:"Control panel"})," -> ",(0,o.jsx)(n.strong,{children:"Network"})," -> ",(0,o.jsx)(n.strong,{children:"Network Interface"})," in your DSM) to provide correct access to Dawarich, or just use wildcard ",(0,o.jsx)(n.code,{children:"*.my-syno.com"})," record to resolve all subdomains ",(0,o.jsx)(n.code,{children:"my-syno.com"})," to Synology ip."]}),"\n",(0,o.jsx)(n.p,{children:"Please read the documentation of your DNS server to understand how to do it."}),"\n",(0,o.jsxs)(n.p,{children:["If you don't yet have a DNS server you can install ",(0,o.jsx)(n.a,{href:"https://www.synology.com/en-global/dsm/packages/DNSServer",children:"Synology DNS"}),"."]}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsx)(n.p,{children:"Don't forget to reconfigure your DHCP server or all device settings in your local network to use this DNS server."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"dawarich",children:"Dawarich"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Open /",(0,o.jsx)(n.a,{href:"#docker-root-share",children:"Docker root folder"}),"/",(0,o.jsx)(n.a,{href:"#dawarich-root-folder",children:"Dawarich root folder"}),"/.env file in any text editor. For example, you can use ",(0,o.jsx)(n.a,{href:"https://www.synology.com/en-global/dsm/packages/TextEditor",children:"Text editor"})," package or download it from ",(0,o.jsx)(n.strong,{children:"File station"}),", edit locally and upload it back, or get access by file share."]}),"\n",(0,o.jsxs)(n.li,{children:["Update your ",(0,o.jsx)(n.code,{children:"APPLICATION_HOSTS"})," value to include your ",(0,o.jsx)(n.strong,{children:"Dawarich hostname"})," that you set in ",(0,o.jsx)(n.strong,{children:"Web station"}),". In example above ",(0,o.jsx)(n.strong,{children:"dawarich.my-syno.com"}),". If you want to set multiple hosts, separate them by a comma: ",(0,o.jsx)(n.code,{children:"dawarich.my-syno.com,dawarich2.my-syno.com"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Set your current ",(0,o.jsx)(n.code,{children:"TIME_ZONE"}),". The full list ",(0,o.jsx)(n.a,{href:"https://github.com/Freika/dawarich/issues/27#issuecomment-2094721396",children:"here"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.code,{children:"DATABASE_PASSWORD"})," to a strong password. You can also change ",(0,o.jsx)(n.code,{children:"DATABASE_USERNAME"})," and ",(0,o.jsx)(n.code,{children:"DATABASE_NAME"})," before the first start."]}),"\n",(0,o.jsxs)(n.li,{children:["Generate a ",(0,o.jsx)(n.code,{children:"SECRET_KEY_BASE"})," with ",(0,o.jsx)(n.code,{children:"openssl rand -hex 64"})," on a computer with OpenSSL, then paste the result after ",(0,o.jsx)(n.code,{children:"SECRET_KEY_BASE="})," in ",(0,o.jsx)(n.code,{children:".env"}),". Keep this value for future restarts and upgrades, and keep ",(0,o.jsx)(n.code,{children:".env"})," private."]}),"\n",(0,o.jsxs)(n.li,{children:["Save ",(0,o.jsx)(n.code,{children:".env"}),". Leave ",(0,o.jsx)(n.code,{children:"RAILS_ENV=production"}),", ",(0,o.jsx)(n.code,{children:"DATABASE_HOST=dawarich_db"})," and ",(0,o.jsx)(n.code,{children:"REDIS_URL=redis://dawarich_redis:6379"})," as provided."]}),"\n",(0,o.jsxs)(n.li,{children:["Click on the name of your project and open the ",(0,o.jsx)(n.strong,{children:"YAML Configurations"})," tab."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"run",children:"Run"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Open ",(0,o.jsx)(n.strong,{children:"Container Manager"})," -> ",(0,o.jsx)(n.strong,{children:"Projects"})," ->",(0,o.jsx)(n.strong,{children:"dawarich"})]}),"\n",(0,o.jsxs)(n.li,{children:["In the top right corner click ",(0,o.jsx)(n.strong,{children:"Action"})," -> ",(0,o.jsx)(n.strong,{children:"Build"})]}),"\n",(0,o.jsx)(n.li,{children:"Wait until the popup writes that all is done and wait a few minutes more until all apps in containers start."}),"\n",(0,o.jsxs)(n.li,{children:["Open it by your hostname. In this example ",(0,o.jsx)(n.a,{href:"https://dawarich.my-syno.com",children:"https://dawarich.my-syno.com"})]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"link-in-the-main-menu",children:"Link in the Main menu"}),"\n",(0,o.jsx)(n.p,{children:"There are two possible options:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["With ",(0,o.jsx)(n.strong,{children:"Web station"}),". But you will have the default web station icon."]}),"\n",(0,o.jsxs)(n.li,{children:["With custom application for ",(0,o.jsx)(n.strong,{children:"Package Center"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"web-station-1",children:"Web station"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Open ",(0,o.jsx)(n.strong,{children:"Web station"})," -> ",(0,o.jsx)(n.strong,{children:"Web Portal"})," -> ",(0,o.jsx)(n.strong,{children:"dawarich (project)"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Check ",(0,o.jsx)(n.strong,{children:"Create shortcut on main menu"})," and set link name."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"custom-application",children:"Custom application"}),"\n",(0,o.jsxs)(n.p,{children:["Synology allows you to create custom applications and install them by ",(0,o.jsx)(n.strong,{children:"Package Center"}),"\n",(0,o.jsx)(n.a,{href:"https://github.com/vletroye/Mods",children:"Here"})," you can find a tool that creates dummy applications only with icon on the main menu.\nYou can use that tool to create your own app, or download the prepared ",(0,o.jsx)("a",{href:"/downloads/synology/update.sh",download:"update.sh",children:"update.sh"})," and ",(0,o.jsx)("a",{href:"/downloads/synology/spk.tgz",download:"spk.tgz",children:"spk.tgz"}
1)," into a new folder."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Edit ",(0,o.jsx)(n.code,{children:"update.sh"})," and set ",(0,o.jsx)(n.code,{children:"author"})," and ",(0,o.jsx)(n.code,{children:"URL"})," at the top of the file."]}),"\n",(0,o.jsxs)(n.li,{children:["In a Linux shell, change to that folder and run ",(0,o.jsx)(n.code,{children:"sh update.sh"}),". When the script finishes, you will see ",(0,o.jsx)(n.code,{children:"spk"})," and ",(0,o.jsx)(n.code,{children:"Dawarich.spk"})," in the same folder."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"If you don't have Linux console you can create a temporal docker project to generate spk package."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Create a new folder in ",(0,o.jsx)(n.a,{href:"#docker-root-share",children:"Docker root folder"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Create subfolder ",(0,o.jsx)(n.code,{children:"app"})," and copy ",(0,o.jsx)(n.code,{children:"update.sh"})," and ",(0,o.jsx)(n.code,{children:"spk.tgz"})," into this subfolder."]}),"\n",(0,o.jsxs)(n.li,{children:["Open ",(0,o.jsx)(n.strong,{children:"Container Manager"})," -> ",(0,o.jsx)(n.strong,{children:"Projects"})," -> ",(0,o.jsx)(n.strong,{children:"Create"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Set any name, set a newly created folder, and set ",(0,o.jsx)(n.strong,{children:"Create docker-compose.yml"}),"."]}),"\n",(0,o.jsx)(n.li,{children:"Copy the text below to the text field."}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'name: spk-template\n\nservices:\n spk-template:\n container_name: spk-template\n image: alpine\n restart: "no"\n working_dir: /app\n volumes:\n - ./app:/app\n command:\n - sh\n - /app/update.sh\n'})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Click ",(0,o.jsx)(n.strong,{children:"Next"}),", ",(0,o.jsx)(n.strong,{children:"Next"}),", ",(0,o.jsx)(n.strong,{children:"Done"}),"\nThe container should run and finish automatically."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["After that you can see ",(0,o.jsx)(n.code,{children:"spk"})," and ",(0,o.jsx)(n.code,{children:"Dawarich.spk"})," in the ",(0,o.jsx)(n.code,{children:"app"})," folder."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Check ",(0,o.jsx)(n.code,{children:"url"})," in ",(0,o.jsx)(n.code,{children:"spk/package/ui/config"})," file and ",(0,o.jsx)(n.code,{children:"maintainer"})," and ",(0,o.jsx)(n.code,{children:"distributor"})," in ",(0,o.jsx)(n.code,{children:"spk/INFO"})," file."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Open ",(0,o.jsx)(n.strong,{children:"Package Center"}),", click on ",(0,o.jsx)(n.strong,{children:"Manual Install"}),", select ",(0,o.jsx)(n.code,{children:"Dawarich.spk"}),", agree with the security notice, and install it."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"default-credentials",children:"Default credentials"}),"\n",(0,o.jsxs)(n.p,{children:["The default credentials are ",(0,o.jsx)(n.code,{children:"[email protected]"})," and ",(0,o.jsx)(n.code,{children:"safepassword"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453(e,n,r){r.d(n,{R:()=>t,x:()=>l});var s=r(96540);const o={},i=s.createContext(o);function t(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.