1"use strict";(globalThis.webpackChunkragflow_docs=globalThis.webpackChunkragflow_docs||[]).push([[2342],{39447(e,n,r){r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"administrator/upgrade_ragflow","title":"Upgrading","description":"Upgrade RAGFlow to nightly or the latest, published release.","source":"@site/docs/administrator/upgrade_ragflow.mdx","sourceDirName":"administrator","slug":"/upgrade_ragflow","permalink":"/docs/upgrade_ragflow","draft":false,"unlisted":false,"editUrl":"https://github.com/infiniflow/ragflow/tree/main/docs/administrator/upgrade_ragflow.mdx","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1,"title":"Upgrading","sidebar_label":"Upgrading","slug":"/upgrade_ragflow","sidebar_custom_props":{"categoryIcon":"LucideArrowBigUpDash"}},"sidebar":"tutorialSidebar","previous":{"title":"Sandbox Quickstart","permalink":"/docs/sandbox_quickstart"},"next":{"title":"Migration","permalink":"/docs/category/migration"}}');var a=r(74848),t=r(28453);r(11470),r(19365);const s={sidebar_position:1,title:"Upgrading",sidebar_label:"Upgrading",slug:"/upgrade_ragflow",sidebar_custom_props:{categoryIcon:"LucideArrowBigUpDash"}},l="Upgrading",i={},c=[{value:"Upgrade RAGFlow to <code>nightly</code>, the Most Recent, Tested Docker Image",id:"upgrade-ragflow-to-nightly-the-most-recent-tested-docker-image",level:2},{value:"Upgrade RAGFlow to Given Release",id:"upgrade-ragflow-to-given-release",level:2},{value:"Frequently Asked Questions",id:"frequently-asked-questions",level:2},{value:"Do I Need to Back Up My Datasets Before Upgrading RAGFlow?",id:"do-i-need-to-back-up-my-datasets-before-upgrading-ragflow",level:3},{value:"Upgrade RAGFlow in an Offline Environment (Without Internet Access)",id:"upgrade-ragflow-in-an-offline-environment-without-internet-access",level:3}];function d(e){const n={admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrading",children:"Upgrading"})}),"\n","\n",(0,a.jsxs)(n.p,{children:["Upgrade RAGFlow to ",(0,a.jsx)(n.code,{children:"nightly"})," or the latest, published release."]}),"\n",(0,a.jsx)(n.admonition,{title:"NOTE",type:"info",children:(0,a.jsxs)(n.p,{children:["Upgrading RAGFlow in itself will ",(0,a.jsx)(n.em,{children:"not"})," remove your uploaded or historical data. However, ",(0,a.jsx)(n.code,{children:"docker compose --env-file docker/.env -f docker/docker-compose.yml down -v"})," removes Docker container volumes and causes data loss."]})}),"\n",(0,a.jsxs)(n.h2,{id:"upgrade-ragflow-to-nightly-the-most-recent-tested-docker-image",children:["Upgrade RAGFlow to ",(0,a.jsx)(n.code,{children:"nightly"}),", the Most Recent, Tested Docker Image"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"nightly"})," refers to the RAGFlow Docker image without embedding models."]}),"\n",(0,a.jsxs)(n.p,{children:["To upgrade RAGFlow, you must upgrade ",(0,a.jsx)(n.strong,{children:"both"})," your code ",(0,a.jsx)(n.strong,{children:"and"})," your Docker image:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Stop the server"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"docker compose --env-file docker/.env -f docker/docker-compose.yml down\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Update the local code"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git pull\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Update ",(0,a.jsx)(n.strong,{children:"docker/.env"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"RAGFLOW_IMAGE=infiniflow/ragflow:nightly\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Update RAGFlow image and restart RAGFlow:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"docker
1compose --env-file docker/.env -f docker/docker-compose.yml pull\ndocker compose --env-file docker/.env -f docker/docker-compose.yml up -d\n"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"upgrade-ragflow-to-given-release",children:"Upgrade RAGFlow to Given Release"}),"\n",(0,a.jsxs)(n.p,{children:["To upgrade RAGFlow, you must upgrade ",(0,a.jsx)(n.strong,{children:"both"})," your code ",(0,a.jsx)(n.strong,{children:"and"})," your Docker image:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Stop the server"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"docker compose --env-file docker/.env -f docker/docker-compose.yml down\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Update the local code"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git pull\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Switch to the latest, officially published release, e.g., ",(0,a.jsx)(n.code,{children:"v1.0.0-rc1"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git checkout -f v1.0.0-rc1\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Update ",(0,a.jsx)(n.strong,{children:"docker/.env"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"RAGFLOW_IMAGE=infiniflow/ragflow:v1.0.0-rc1\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Update the RAGFlow image and restart RAGFlow:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"docker compose --env-file docker/.env -f docker/docker-compose.yml pull\ndocker compose --env-file docker/.env -f docker/docker-compose.yml up -d\n"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"frequently-asked-questions",children:"Frequently Asked Questions"}),"\n",(0,a.jsx)(n.h3,{id:"do-i-need-to-back-up-my-datasets-before-upgrading-ragflow",children:"Do I Need to Back Up My Datasets Before Upgrading RAGFlow?"}),"\n",(0,a.jsxs)(n.p,{children:["No, you do not need to. Upgrading RAGFlow in itself will ",(0,a.jsx)(n.em,{children:"not"})," remove your uploaded data or dataset settings. However, ",(0,a.jsx)(n.code,{children:"docker compose --env-file docker/.env -f docker/docker-compose.yml down -v"})," removes Docker container volumes and causes data loss."]}),"\n",(0,a.jsx)(n.h3,{id:"upgrade-ragflow-in-an-offline-environment-without-internet-access",children:"Upgrade RAGFlow in an Offline Environment (Without Internet Access)"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsx)(n.li,{children:"From an environment with Internet access, pull the required Docker image."}),"\n",(0,a.jsxs)(n.li,{children:["Save the Docker image to a ",(0,a.jsx)(n.strong,{children:".tar"})," file.","\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"docker save -o ragflow.v1.0.0-rc1.tar infiniflow/ragflow:v1.0.0-rc1\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["Copy the ",(0,a.jsx)(n.strong,{children:".tar"})," file to the target server."]}),"\n",(0,a.jsxs)(n.li,{children:["Load the ",(0,a.jsx)(n.strong,{children:".tar"})," file into Docker:","\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"docker load -i ragflow.v1.0.0-rc1.tar\n"})}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},19365(e,n,r){r.d(n,{A:()=>s});r(96540);var o=r(34164);const a="tabItem_Ymn6";var t=r(74848);function s({children:e,hidden:n,className:r}){return(0,t.jsx)("div",{role:"tabpanel",className:(0,o.A)(a,r),hidden:n,children:e})}},11470(e,n,r){r.d(n,{A:()=>A});var o=r(96540),a=r(34164),t=r(17559),s=r(23104),l=r(56347),i=r(205),c=r(57485),d=r(31682),u=r(70679);function h(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,o.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs>
1 child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function p(e){const{values:n,children:r}=e;return(0,o.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:r,default:o}})=>({value:e,label:n,attributes:r,default:o}))}(r);return function(e){const n=(0,d.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e},[n,r])}function g({value:e,tabValues:n}){return n.some(n=>n.value===e)}function f({queryString:e=!1,groupId:n}){const r=(0,l.W6)(),a=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,c.aZ)(a),(0,o.useCallback)(e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})},[a,r])]}function m(e){const{defaultValue:n,queryString:r=!1,groupId:a}=e,t=p(e),[s,l]=(0,o.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!g({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const r=n.find(e=>e.default)??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:t})),[c,d]=f({queryString:r,groupId:a}),[h,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,a]=(0,u.Dv)(n);return[r,(0,o.useCallback)(e=>{n&&a.set(e)},[n,a])]}({groupId:a}),v=(()=>{const e=c??h;return g({value:e,tabValues:t})?e:null})();(0,i.A)(()=>{v&&l(v)},[v]);return{selectedValue:s,selectValue:(0,o.useCallback)(e=>{if(!g({value:e,tabValues:t}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),m(e)},[d,m,t]),tabValues:t}}var v=r(92303);const x="tabList__CuJ",b="tabItem_LNqP";var j=r(74848);function w({className:e,block:n,selectedValue:r,selectValue:o,tabValues:t}){const l=[],{blockElementScrollPositionUntilNextRender:i}=(0,s.a_)(),c=e=>{const n=e.currentTarget,a=l.indexOf(n),s=t[a].value;s!==r&&(i(n),o(s))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=l.indexOf(e.currentTarget)+1;n=l[r]??l[0];break}case"ArrowLeft":{const r=l.indexOf(e.currentTarget)-1;n=l[r]??l[l.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},e),children:t.map(({value:e,label:n,attributes:o})=>(0,j.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{l.push(e)},onKeyDown:d,onClick:c,...o,className:(0,a.A)("tabs__item",b,o?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function k({lazy:e,children:n,selectedValue:r}){const t=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=t.find(e=>e.props.value===r);return e?(0,o.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:t.map((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function y(e){const n=m(e);return(0,j.jsxs)("div",{className:(0,a.A)(t.G.tabs.container,"tabs-container",x),children:[(0,j.jsx)(w,{...n,...e}),(0,j.jsx)(k,{...n,...e})]})}function A(e){const n=(0,v.A)();return(0,j.jsx)(y,{...e,children:h(e.children)},String(n))}},28453(e,n,r){r.d(n,{R:()=>s,x:()=>l});var o=r(96540);const a={},t=o.createContext(a);function s(e){const n=o.useContext(t);return o.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(a):e.components||a:s(e.components),o.createElement(t.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.