import{r as s,p as c,q as u,w as o,z as e,t as l,R as t}from"./vendor.3d5b4206.js";const d={class:"markdown-body"},p=e("h2",{id:"1.-confirm-minimum-requirements"},[t("1. Confirm Minimum Requirements "),e("a",{class:"header-anchor",href:"#1.-confirm-minimum-requirements"},"#")],-1),h=e("p",null,[t("Directus requires two things to run: "),e("a",{href:"https://nodejs.dev",target:"_blank",rel:"noopener noreferrer"},"Node.js"),t(" and a Database. For both these system requirements, we aim to support the current LTS release (and newer).")],-1),_=e("p",null,"To run Directus, you currently need Node 12.20 or newer, and one of the following databases:",-1),m=e("table",null,[e("thead",null,[e("tr",null,[e("th",null,"Database"),e("th",null,"Version")])]),e("tbody",null,[e("tr",null,[e("td",null,"PostgreSQL"),e("td",null,"10+")]),e("tr",null,[e("td",null,[t("MySQL "),e("sup",null,"[1]")]),e("td",null,"5.7.8+ / 8+")]),e("tr",null,[e("td",null,"SQLite"),e("td",null,"3+")]),e("tr",null,[e("td",null,"MS SQL Server"),e("td",null,"13+")]),e("tr",null,[e("td",null,[t("MariaDB "),e("sup",null,"[2]")]),e("td",null,"10.2.7+")]),e("tr",null,[e("td",null,[t("OracleDB"),e("sup",null,"[2]"),t(),e("sup",null,"[3]")]),e("td",null,"19+")])])],-1),f=e("p",null,[e("sup",null,"[1]"),t(" MySQL 8+ requires "),e("a",{href:"https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password-compatible-connectors",target:"_blank",rel:"noopener noreferrer"},"mysql_native_password"),t(" to be enabled"),e("br"),e("sup",null,"[2]"),t(" Older versions may work, but aren\u2019t officially supported. Use at your own risk. "),e("br"),e("sup",null,"[3]"),t(" Make sure to install "),e("code",null,"node-oracledb"),t(" and it\u2019s system dependencies when using OracleDB")],-1),g=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Variants"),e("p",null,[t("In addition to the databases above, other variants are also supported, including "),e("strong",null,"AWS Aurora"),t(" (MySQL), "),e("strong",null,"AWS Redshift"),t(" (PostgreSQL), "),e("strong",null,"Azure SQL"),t(" (MS SQL).")])],-1),y=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Apple Silicon"),e("p",null,[t("When installing Directus on an Apple-made ARM CPU, make sure you have "),e("code",null,"libvips"),t(" installed. See "),e("a",{href:"https://sharp.pixelplumbing.com/install#apple-m1",target:"_blank",rel:"noopener noreferrer"},"Apple M1"),t(".")])],-1),b=e("h2",{id:"2.-create-a-project"},[t("2. Create a Project "),e("a",{class:"header-anchor",href:"#2.-create-a-project"},"#")],-1),v=e("p",null,"Navigate to the directory where you wish to create a new Directus project. The new project and directory will be created inside the current directory. Create a new Directus project by running the following npm command.",-1),w=e("pre",null,[e("code",{class:"language-bash"},`npm init directus-project my-project
`)],-1),j=e("div",{class:"warning hint"},[e("p",null,"Except for SQLite, the database must already be running before creating your Directus project.")],-1),S=e("h2",{id:"3.-start-your-project"},[t("3. Start your Project "),e("a",{class:"header-anchor",href:"#3.-start-your-project"},"#")],-1),D=e("p",null,[t("To start Directus, navigate to the project directory, "),e("em",null,"my-project"),t(".")],-1),k=e("pre",null,[e("code",{class:"language-bash"},[e("span",{class:"hljs-built_in"},"cd"),t(` my-project
`)])],-1),L=e("p",null,"Run the following command in your project directory.",-1),M=e("pre",null,[e("code",{class:"language-bash"},`npx directus start
`)],-1),P=e("h2",{id:"4.-view-your-project"},[t("4. View your Project "),e("a",{class:"header-anchor",href:"#4.-view-your-project"},"#")],-1),Q=e("p",null,[t("The default port used by Directus is 8055. To view your project locally, go to "),e("a",{href:"http://localhost:8055",target:"_blank",rel:"noopener noreferrer"},"http://localhost:8055"),t(" in your browser.")],-1),q={class:"tip hint"},C=e("div",{class:"hint-title"},"Changing Port",-1),x=t("If you want to use a different port, use "),A=t("the "),T=e("code",null,"PORT",-1),B=t(" environment variable"),N=t("."),R=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},".env Permissions"),e("p",null,[t("By default, the "),e("code",null,"create-directus-project"),t(" tool will set the file permissions of the generated "),e("code",null,".env"),t(" to "),e("code",null,"-rw-r-----"),t(" (0640). If you run Directus from a separate user on your machine, make sure these permissions are correct.")])],-1),V=e("h2",{id:"configure-%2F-update-%2F-upgrade-your-project"},[t("Configure / Update / Upgrade your Project "),e("a",{class:"header-anchor",href:"#configure-%2F-update-%2F-upgrade-your-project"},"#")],-1),F=t("See the "),I=t("Updates & Migrations"),U=t(" to learn how to maintain your project moving forward."),G={setup(W,{expose:a}){const r={title:"Installing from CLI",modularExtension:!1};return a({frontmatter:r}),(O,z)=>{const n=s("router-link"),i=s("DocsWrapper");return c(),u(i,{frontmatter:r},{default:o(()=>[e("div",d,[p,h,_,m,f,g,y,b,v,w,j,S,D,k,L,M,P,Q,e("div",q,[C,e("p",null,[x,l(n,{to:"/docs/configuration/config-options/#general"},{default:o(()=>[A,T,B]),_:1}),N])]),R,V,e("p",null,[F,l(n,{to:"/docs/configuration/upgrades-migrations/"},{default:o(()=>[I]),_:1}),U])])]),_:1})}}};export{G as default};
