1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
"use strict";(self.webpackChunkpingvindocs=self.webpackChunkpingvindocs||[]).push([[126],{3833:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>s,default:()=>a,frontMatter:()=>d,metadata:()=>c,toc:()=>h});var r=i(4848),t=i(8453);const d={id:"configuration"},s="Configuration",c={id:"setup/configuration",title:"Configuration",description:"General configuration",source:"@site/docs/setup/configuration.md",sourceDirName:"setup",slug:"/setup/configuration",permalink:"/pingvin-share/setup/configuration",draft:!1,unlisted:!1,editUrl:"https://github.com/stonith404/pingvin-share/edit/main/docs/docs/setup/configuration.md",tags:[],version:"current",frontMatter:{id:"configuration"},sidebar:"docsSidebar",previous:{title:"Installation",permalink:"/pingvin-share/setup/installation"},next:{title:"Integrations",permalink:"/pingvin-share/setup/integrations"}},o={},h=[{value:"General configuration",id:"general-configuration",level:2},{value:"UI",id:"ui",level:3},{value:"YAML file",id:"yaml-file",level:3},{value:"Environment variables",id:"environment-variables",level:3},{value:"Backend",id:"backend",level:4},{value:"Frontend",id:"frontend",level:4},{value:"Docker specific",id:"docker-specific",level:4}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",hr:"hr",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configuration",children:"Configuration"})}),"\n",(0,r.jsx)(n.h2,{id:"general-configuration",children:"General configuration"}),"\n",(0,r.jsx)(n.p,{children:"There are plenty of settings you can adjust to your needs. Pingvin Share can be configured in two ways:"}),"\n",(0,r.jsx)(n.h3,{id:"ui",children:"UI"}),"\n",(0,r.jsxs)(n.p,{children:["You can change the settings in the UI (",(0,r.jsx)(n.code,{children:"/admin/config"}),")"]}),"\n",(0,r.jsx)(n.h3,{id:"yaml-file",children:"YAML file"}),"\n",(0,r.jsx)(n.p,{children:"You can set the configuration via a YAML file. If you choose this way, you won't be able to change the settings in the UI."}),"\n",(0,r.jsxs)(n.p,{children:["If you use Docker you can create a ",(0,r.jsx)(n.code,{children:"config.yml"})," file based on the ",(0,r.jsx)(n.a,{href:"https://github.com/stonith404/pingvin-share/blob/main/config.yaml",children:(0,r.jsx)(n.code,{children:"config.example.yaml"})})," and mount it to ",(0,r.jsx)(n.code,{children:"/opt/app/config.yaml"})," in the container."]}),"\n",(0,r.jsxs)(n.p,{children:["If you run Pingvin Share without Docker, you can create a ",(0,r.jsx)(n.code,{children:"config.yml"})," file based on the ",(0,r.jsx)(n.a,{href:"https://github.com/stonith404/pingvin-share/blob/main/config.yaml",children:(0,r.jsx)(n.code,{children:"config.example.yaml"})})," in the root directory of the project."]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"environment-variables",children:"Environment variables"}),"\n",(0,r.jsx)(n.p,{children:"For installation specific configuration, you can use environment variables. The following variables are available:"}),"\n",(0,r.jsx)(n.h4,{id:"backend",children:"Backend"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Variable"}),(0,r.jsx)(n.th,{children:"Default Value"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"BACKEND_PORT"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"8080"})}),(0,r.jsx)(n.td,{children:"The port on which the backend listens."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"DATABASE_URL"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"file:../data/pingvin-share.db?connection_limit=1"})}),(0,r.jsx)(n.td,{children:"The URL of the SQLite database."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"DATA_DIRECTORY"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"./data"})}),(0,r.jsx)(n.td,{children:"The directory where data is stored."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"CLAMAV_HOST"})}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"127.0.0.1"})," or ",(0,r.jsx)(n.code,{children:"clamav"})," when running with Docker"]}),(0,r.jsxs)(n.td,{children:["The IP address of the ClamAV server. See the ",(0,r.jsx)(n.a,{href:"/pingvin-share/setup/integrations#clamav",children:"ClamAV docs"})," for more information."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"CLAMAV_PORT"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"3310"})}),(0,r.jsx)(n.td,{children:"The port number of the ClamAV server."})]})]})]}),"\n",(0,r.jsx)(n.h4,{id:"frontend",children:"Frontend"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Variable"}),(0,r.jsx)(n.th,{children:"Default Value"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"PORT"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"3000"})}),(0,r.jsx)(n.td,{children:"The port on which the frontend listens."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"API_URL"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"http://localhost:8080"})}),(0,r.jsx)(n.td,{children:"The URL of the backend for the frontend."})]})]})]}),"\n",(0,r.jsx)(n.h4,{id:"docker-specific",children:"Docker specific"}),"\n",(0,r.jsx)(n.p,{children:"Environment variables that are only available when running Pingvin Share with Docker."}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Variable"}),(0,r.jsx)(n.th,{children:"Default Value"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"TRUST_PROXY"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"false"})}),(0,r.jsxs)(n.td,{children:["Whether Pingvin Share is behind a reverse proxy. If set to ",(0,r.jsx)(n.code,{children:"true"}),", the ",(0,r.jsx)(n.code,{children:"X-Forwarded-For"})," header is trusted."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"PUID"})," and ",(0,r.jsx)(n.code,{children:"PGID"})]}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"1000"})}),(0,r.jsxs)(n.td,{children:["The user and group ID of the user who should run Pingvin Share inside the Docker container and owns the files that are mounted with the volume. You can get the ",(0,r.jsx)(n.code,{children:"PUID"})," and ",(0,r.jsx)(n.code,{children:"GUID"})," of your user on your host machine by using the command ",(0,r.jsx)(n.code,{children:"id"}),". For more information see ",(0,r.jsx)(n.a,{href:"https://docs.linuxserver.io/general/understanding-puid-and-pgid/#using-the-variables",children:"this article"}),"."]})]})]})]})]})}function a(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>c});var r=i(6540);const t={},d=r.createContext(t);function s(e){const n=r.useContext(d);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),r.createElement(d.Provider,{value:n},e.children)}}}]); |