# Download the compose file and the sample config filecurl -LO https://github.com/abhinavxd/libredesk/raw/main/docker-compose.ymlcurl -LO https://github.com/abhinavxd/libredesk/raw/main/config.sample.toml
2
Configure libredesk
# Copy the config.sample.toml to config.toml and edit as neededcp config.sample.toml config.toml
Set app.encryption_key in config.toml to a random 32-character string. See Encryption key.
3
Start the services
# Run the services in the backgrounddocker compose up -d
4
Set the admin password
# Set System user passworddocker exec -it libredesk_app ./libredesk --set-system-user-password
Download the latest release for your platform and extract the libredesk binary.
2
Configure libredesk
# Download the sample config filecurl -LO https://github.com/abhinavxd/libredesk/raw/main/config.sample.toml# Copy the config.sample.toml to config.toml and edit as neededcp config.sample.toml config.toml
Edit config.toml:
Set app.encryption_key to a random 32-character string. See Encryption key.
Set the db credentials and set db.host to localhost.
Set redis.address to localhost:6379.
3
Create the uploads directory
With the default fs upload provider, files are stored in the directory set by upload.fs.upload_path (uploads, relative to the working directory). libredesk does not create this directory, and uploads fail if it is missing or not writable.
mkdir uploadschmod 755 uploads
If libredesk runs as a different user than the one that created the directory, give that user ownership with chown.
4
Install database tables
./libredesk --install
Creates the tables in PostgreSQL.
--install deletes existing libredesk data. Run it only on a new database.
To set the System user password during installation, use the environment variable:
Generates the libredesk binary in the current directory.
3
Configure libredesk
# Copy the config.sample.toml to config.toml and edit as neededcp config.sample.toml config.toml
Edit config.toml:
Set app.encryption_key to a random 32-character string. See Encryption key.
Set the db credentials and set db.host to localhost.
Set redis.address to localhost:6379.
4
Create the uploads directory
With the default fs upload provider, files are stored in the directory set by upload.fs.upload_path (uploads, relative to the working directory). libredesk does not create this directory, and uploads fail if it is missing or not writable.
mkdir uploadschmod 755 uploads
If libredesk runs as a different user than the one that created the directory, give that user ownership with chown.
5
Install database tables
./libredesk --install
Creates the tables in PostgreSQL.
--install deletes existing libredesk data. Run it only on a new database.
To set the System user password during installation, use the environment variable:
app.encryption_key encrypts stored secrets such as inbox passwords. It must be exactly 32 characters. Generate one with openssl rand -hex 16.Set it before the first start and do not change it, or saved secrets can no longer be read.
The proxy must set X-Client-IP to $remote_addr. libredesk reads this header to identify the client for rate limiting and audit logs, and without it every request looks like it came from the proxy.
Save the following as /etc/nginx/sites-available/libredesk:
server { listen 80; server_name your-domain.com; client_max_body_size 30M; location / { proxy_pass http://localhost:9000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_set_header X-Client-IP $remote_addr; # If behind Cloudflare (or another CDN), forward the CDN's real-client header # instead, AND firewall nginx to only accept connections from the CDN's IP range, # otherwise clients can bypass the CDN and spoof this header directly. # proxy_set_header X-Client-IP $http_cf_connecting_ip; # Cloudflare proxy_cache_bypass $http_upgrade; }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"libredesk Documentation","colors":{"primary":"#2563EB","light":"#3B82F6","dark":"#1D4ED8"},"logo":{"light":"https://s3.ap-south-1.amazonaws.com/libredesk.io/libredesk_black.png","dark":"https://s3.ap-south-1.amazonaws.com/libredesk.io/libredesk_white.png","href":"https://docs.libredesk.io"},"favicon":"https://mintcdn.com/libredesk/ksNuplvdt5gGCOiH/favicon.ico?fit=max\u0026auto=format\u0026n=ksNuplvdt5gGCOiH\u0026q=85\u0026s=93a8679525456b7d819f4f376ed2b845","navbar":{"links":[{"href":"https://github.com/abhinavxd/libredesk","label":"GitHub"}]},"footer":{"socials":{"github":"https://github.com/abhinavxd/libredesk"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/abhinavxd/libredesk"},{"anchor":"OpenAPI Spec","icon":"code","href":"https://docs.libredesk.io/api-reference/openapi.json"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"libredesk","hasAudioNarration":false,"actualSubdomain":"libredesk","customDomains":["docs.libredesk.io"],"gitSource":{"type":"github","owner":"abhinavxd","repo":"docs.libredesk.io","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ad9ff2404241759b37fb353","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":83},{"language":"default","tag":"Conversations","count":27},{"language":"default","tag":"Documentation","count":18},{"language":"default","tag":"Agents \u0026 Teams","count":14},{"language":"default","tag":"Contacts","count":10},{"language":"default","tag":"Configuration","count":10},{"language":"default","tag":"Reports","count":6},{"language":"default","tag":"Getting Started","count":6},{"language":"default","tag":"Search","count":5},{"language":"default","tag":"Conversation Status \u0026 Priority","count":5}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"nav img[alt*=\"logo\"],nav img[src*=\"/logo/\"],[class*=\"navbar\"] img,[class*=\"nav-logo\"] img,header img[src*=\"/logo/\"]{max-height:24px!important;height:24px!important;width:auto!important}nav a[href=\"/\"],[class*=\"navbar\"] a[href=\"/\"],[class*=\"logo-container\"]{display:flex;align-items:center;height:auto!important}"}],"page":{"pagePath":"getting-started/installation","slug":"/getting-started/installation","pageMetadata":{"title":"Installation","description":"Deploy libredesk using Docker, binary, or from source","href":"/getting-started/installation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Deploy libredesk using Docker, binary, or from source\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`libredesk ships as a single binary and needs PostgreSQL and Redis to run. Install it with Docker, from a release binary, or from source.`}),`\n`,_jsx(Heading,{level:`2`,id:`installation-methods`,children:`Installation methods`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Docker (Recommended)`,id:`docker-recommended`,\"data-child-heading-ids\":`[\"docker-installation\",\"quick-start-with-docker-compose\"]`,children:[_jsx(Heading,{level:`2`,id:`docker-installation`,children:`Docker installation`}),_jsxs(_components.p,{children:[`The latest image is available on DockerHub at `,_jsx(_components.a,{href:`https://hub.docker.com/r/libredesk/libredesk`,children:`libredesk/libredesk:latest`})]}),_jsx(Heading,{level:`3`,id:`quick-start-with-docker-compose`,children:`Quick start with Docker Compose`}),_jsxs(Steps,{children:[_jsx(Step,{title:`Download configuration files`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Download the compose file and the sample config file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -LO https://github.com/abhinavxd/libredesk/raw/main/docker-compose.yml`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -LO https://github.com/abhinavxd/libredesk/raw/main/config.sample.toml`})]}),`\n`]})})})}),_jsxs(Step,{title:`Configure libredesk`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Copy the config.sample.toml to config.toml and edit as needed`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cp config.sample.toml config.toml`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`app.encryption_key`}),` in `,_jsx(_components.code,{children:`config.toml`}),` to a random 32-character string. See `,_jsx(_components.a,{href:`#encryption-key`,children:`Encryption key`}),`.`]})]}),_jsx(Step,{title:`Start the services`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Run the services in the background`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` compose up -d`})]}),`\n`]})})})}),_jsx(Step,{title:`Set the admin password`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Set System user password`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` exec -it libredesk_app ./libredesk --set-system-user-password`})]}),`\n`]})})})})]}),_jsxs(_components.p,{children:[`Visit `,_jsx(_components.code,{children:`http://localhost:9000`}),` and login with:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Email`}),`: `,_jsx(_components.code,{children:`System`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Password`}),`: The password you just set`]}),`\n`]})]}),_jsxs(Tab,{title:`Binary`,id:`binary`,\"data-child-heading-ids\":`[\"binary-installation\"]`,children:[_jsx(Heading,{level:`2`,id:`binary-installation`,children:`Binary installation`}),_jsxs(Info,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Prerequisites:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`PostgreSQL ≥13`}),`\n`,_jsx(_components.li,{children:`Redis`}),`\n`]})]}),_jsxs(Steps,{children:[_jsx(Step,{title:`Download the latest release`,children:_jsxs(_components.p,{children:[`Download the `,_jsx(_components.a,{href:`https://github.com/abhinavxd/libredesk/releases`,children:`latest release`}),` for your platform and extract the libredesk binary.`]})}),_jsxs(Step,{title:`Configure libredesk`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Download the sample config file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -LO https://github.com/abhinavxd/libredesk/raw/main/config.sample.toml`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Copy the config.sample.toml to config.toml and edit as needed`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cp config.sample.toml config.toml`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Edit `,_jsx(_components.code,{children:`config.toml`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`app.encryption_key`}),` to a random 32-character string. See `,_jsx(_components.a,{href:`#encryption-key`,children:`Encryption key`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set the `,_jsx(_components.code,{children:`db`}),` credentials and set `,_jsx(_components.code,{children:`db.host`}),` to `,_jsx(_components.code,{children:`localhost`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`redis.address`}),` to `,_jsx(_components.code,{children:`localhost:6379`}),`.`]}),`\n`]})]}),_jsxs(Step,{title:`Create the uploads directory`,children:[_jsxs(_components.p,{children:[`With the default `,_jsx(_components.code,{children:`fs`}),` upload provider, files are stored in the directory set by `,_jsx(_components.code,{children:`upload.fs.upload_path`}),` (`,_jsx(_components.code,{children:`uploads`}),`, relative to the working directory). libredesk does not create this directory, and uploads fail if it is missing or not writable.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uploads`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`chmod 755 uploads`})}),`\n`]})})}),_jsxs(_components.p,{children:[`If libredesk runs as a different user than the one that created the directory, give that user ownership with `,_jsx(_components.code,{children:`chown`}),`.`]})]}),_jsxs(Step,{title:`Install database tables`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`./libredesk --install`})}),`\n`]})})}),_jsx(_components.p,{children:`Creates the tables in PostgreSQL.`}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`--install`}),` deletes existing libredesk data. Run it only on a new database.`]})}),_jsxs(Tip,{children:[_jsx(_components.p,{children:`To set the System user password during installation, use the environment variable:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`LIBREDESK_SYSTEM_USER_PASSWORD=your_password ./libredesk --install`})}),`\n`]})})})]})]}),_jsx(Step,{title:`Set the System user password`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Set System user password`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`./libredesk --set-system-user-password`})}),`\n`]})})})}),_jsx(Step,{title:`Run libredesk`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`./libredesk`})}),`\n`]})})})})]}),_jsxs(_components.p,{children:[`Visit `,_jsx(_components.code,{children:`http://localhost:9000`}),` and login with:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Email`}),`: `,_jsx(_components.code,{children:`System`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Password`}),`: The password you just set`]}),`\n`]})]}),_jsxs(Tab,{title:`From Source`,id:`from-source`,\"data-child-heading-ids\":`[\"compile-from-source\"]`,children:[_jsx(Heading,{level:`2`,id:`compile-from-source`,children:`Compile from source`}),_jsxs(_components.p,{children:[`Build the latest unreleased version from the `,_jsx(_components.code,{children:`main`}),` branch.`]}),_jsxs(Info,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Prerequisites:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`PostgreSQL ≥13`}),`\n`,_jsx(_components.li,{children:`Redis`}),`\n`,_jsx(_components.li,{children:`Go 1.25 or later`}),`\n`,_jsx(_components.li,{children:`Node.js 20 or later`}),`\n`,_jsx(_components.li,{children:`pnpm`}),`\n`]})]}),_jsxs(Steps,{children:[_jsx(Step,{title:`Clone the repository`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`git`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` clone https://github.com/abhinavxd/libredesk.git`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` libredesk`})]}),`\n`]})})})}),_jsxs(Step,{title:`Build the application`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`make`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Generates the `,_jsx(_components.code,{children:`libredesk`}),` binary in the current directory.`]})]}),_jsxs(Step,{title:`Configure libredesk`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Copy the config.sample.toml to config.toml and edit as needed`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cp config.sample.toml config.toml`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Edit `,_jsx(_components.code,{children:`config.toml`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`app.encryption_key`}),` to a random 32-character string. See `,_jsx(_components.a,{href:`#encryption-key`,children:`Encryption key`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set the `,_jsx(_components.code,{children:`db`}),` credentials and set `,_jsx(_components.code,{children:`db.host`}),` to `,_jsx(_components.code,{children:`localhost`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`redis.address`}),` to `,_jsx(_components.code,{children:`localhost:6379`}),`.`]}),`\n`]})]}),_jsxs(Step,{title:`Create the uploads directory`,children:[_jsxs(_components.p,{children:[`With the default `,_jsx(_components.code,{children:`fs`}),` upload provider, files are stored in the directory set by `,_jsx(_components.code,{children:`upload.fs.upload_path`}),` (`,_jsx(_components.code,{children:`uploads`}),`, relative to the working directory). libredesk does not create this directory, and uploads fail if it is missing or not writable.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uploads`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`chmod 755 uploads`})}),`\n`]})})}),_jsxs(_components.p,{children:[`If libredesk runs as a different user than the one that created the directory, give that user ownership with `,_jsx(_components.code,{children:`chown`}),`.`]})]}),_jsxs(Step,{title:`Install database tables`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`./libredesk --install`})}),`\n`]})})}),_jsx(_components.p,{children:`Creates the tables in PostgreSQL.`}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`--install`}),` deletes existing libredesk data. Run it only on a new database.`]})}),_jsxs(Tip,{children:[_jsx(_components.p,{children:`To set the System user password during installation, use the environment variable:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`LIBREDESK_SYSTEM_USER_PASSWORD=your_password ./libredesk --install`})}),`\n`]})})})]})]}),_jsx(Step,{title:`Set the System user password`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Set System user password`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`./libredesk --set-system-user-password`})}),`\n`]})})})}),_jsx(Step,{title:`Run libredesk`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`./libredesk`})}),`\n`]})})})})]}),_jsxs(_components.p,{children:[`Visit `,_jsx(_components.code,{children:`http://localhost:9000`}),` and login with:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Email`}),`: `,_jsx(_components.code,{children:`System`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Password`}),`: The password you just set`]}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`encryption-key`,children:`Encryption key`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`app.encryption_key`}),` encrypts stored secrets such as inbox passwords. It must be exactly 32 characters. Generate one with `,_jsx(_components.code,{children:`openssl rand -hex 16`}),`.`]}),`\n`,_jsx(_components.p,{children:`Set it before the first start and do not change it, or saved secrets can no longer be read.`}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-via-environment-variables`,children:`Configuration via environment variables`}),`\n`,_jsxs(_components.p,{children:[`Instead of using a `,_jsx(_components.code,{children:`config.toml`}),` file, you can configure libredesk entirely through environment variables.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`All environment variables use the `,_jsx(_components.code,{children:`LIBREDESK_`}),` prefix`]}),`\n`,_jsxs(_components.li,{children:[`Use double underscore (`,_jsx(_components.code,{children:`__`}),`) for nested configuration keys`]}),`\n`,_jsxs(_components.li,{children:[`To use environment variables exclusively (without a config file), pass `,_jsx(_components.code,{children:`--config=\"\"`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example:`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`TOML Config`}),_jsx(_components.th,{children:`Environment Variable`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`app.encryption_key = \"...\"`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`LIBREDESK_APP__ENCRYPTION_KEY=...`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`upload.fs.upload_path = \"uploads\"`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`LIBREDESK_UPLOAD__FS__UPLOAD_PATH=uploads`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`db.host = \"localhost\"`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`LIBREDESK_DB__HOST=localhost`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`command-line-flags`,children:`Command-line flags`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--config`})}),_jsxs(_components.td,{children:[`Path to the config file. Defaults to `,_jsx(_components.code,{children:`config.toml`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--install`})}),_jsx(_components.td,{children:`Install the database schema`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--upgrade`})}),_jsx(_components.td,{children:`Run pending database upgrades`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--yes`})}),_jsx(_components.td,{children:`Skip the confirmation prompt`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--set-system-user-password`})}),_jsx(_components.td,{children:`Set the System user password`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--static-dir`})}),_jsx(_components.td,{children:`Directory with custom static files and templates`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--version`})}),_jsx(_components.td,{children:`Print the version`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`rate-limits`,children:`Rate limits`}),`\n`,_jsxs(_components.p,{children:[`Public endpoints are rate limited per client IP. Change the limits in `,_jsx(_components.code,{children:`config.toml`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Section`}),_jsx(_components.th,{children:`Endpoints`}),_jsx(_components.th,{children:`Default (requests per minute)`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[rate_limit.widget]`})}),_jsx(_components.td,{children:`Livechat widget APIs`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[rate_limit.auth]`})}),_jsx(_components.td,{children:`Login, password reset and other auth endpoints`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`30`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[rate_limit.public]`})}),_jsxs(_components.td,{children:[`Help center, CSAT, `,_jsx(_components.code,{children:`robots.txt`}),` and sitemaps`]}),_jsx(_components.td,{\"data-numeric\":`true`,children:`100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[rate_limit.media]`})}),_jsx(_components.td,{children:`Public media downloads (uploaded files, avatars)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`300`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`nginx-reverse-proxy-recommended`,children:`Nginx reverse proxy (recommended)`}),`\n`,_jsx(_components.p,{children:`We recommend running libredesk behind Nginx as a reverse proxy.`}),`\n`,_jsx(_components.p,{children:`Install nginx if you don’t have it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Debian / Ubuntu`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sudo apt update \u0026\u0026 sudo apt install nginx`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# RHEL / Fedora / CentOS`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sudo dnf install nginx \u0026\u0026 sudo systemctl enable --now nginx`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The proxy must set `,_jsx(_components.code,{children:`X-Client-IP`}),` to `,_jsx(_components.code,{children:`$remote_addr`}),`. libredesk reads this header to identify the client for rate limiting and audit logs, and without it every request looks like it came from the proxy.`]})}),`\n`,_jsxs(_components.p,{children:[`Save the following as `,_jsx(_components.code,{children:`/etc/nginx/sites-available/libredesk`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`nginx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`nginx`,children:_jsxs(_components.code,{language:`nginx`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` listen `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`80`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` server_name `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`your-domain.com;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` client_max_body_size `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30M`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` location`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` / `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_pass `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`http://localhost:9000;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_http_version `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_set_header `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Upgrade $`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`http_upgrade`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_set_header `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Connection `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'upgrade'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_set_header `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Host $`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`host`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_set_header `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`X-Client-IP $`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`remote_addr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # If behind Cloudflare (or another CDN), forward the CDN's real-client header`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # instead, AND firewall nginx to only accept connections from the CDN's IP range,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # otherwise clients can bypass the CDN and spoof this header directly.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # proxy_set_header X-Client-IP $http_cf_connecting_ip; # Cloudflare`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` proxy_cache_bypass `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`http_upgrade`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Then enable it and reload nginx:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sudo ln -s /etc/nginx/sites-available/libredesk /etc/nginx/sites-enabled/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sudo nginx -t \u0026\u0026 sudo systemctl reload nginx`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Installation","description":"Deploy libredesk using Docker, binary, or from source","href":"/getting-started/installation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Installation methods","slug":"installation-methods","depth":2,"children":[]},{"title":"Docker installation","slug":"docker-installation","depth":2,"children":[{"title":"Quick start with Docker Compose","slug":"quick-start-with-docker-compose","depth":3,"children":[],"tabId":"docker-recommended"}],"tabId":"docker-recommended"},{"title":"Binary installation","slug":"binary-installation","depth":2,"children":[],"tabId":"binary"},{"title":"Compile from source","slug":"compile-from-source","depth":2,"children":[],"tabId":"from-source"},{"title":"Encryption key","slug":"encryption-key","depth":2,"children":[]},{"title":"Configuration via environment variables","slug":"configuration-via-environment-variables","depth":2,"children":[]},{"title":"Command-line flags","slug":"command-line-flags","depth":2,"children":[]},{"title":"Rate limits","slug":"rate-limits","depth":2,"children":[]},{"title":"Nginx reverse proxy (recommended)","slug":"nginx-reverse-proxy-recommended","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/libredesk/e67c9dce170f6259/widget.js"],"subdomain":"libredesk","siteName":"libredesk Documentation","title":"Installation - libredesk Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T12:19:41.184Z","originalFileLocation":"getting-started/installation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Deploy libredesk using Docker, binary, or from source\">\u003cmeta data-mint-head name=\"application-name\" content=\"libredesk Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Installation - libredesk Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Deploy libredesk using Docker, binary, or from source\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"libredesk Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.libredesk.io/getting-started/installation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://libredesk.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Installation\u0026amp;description=Deploy+libredesk+using+Docker%2C+binary%2C+or+from+source\u0026amp;theme=12bf31105a52d6fc8c8a51bc\u0026amp;signature=f676ed9ef104905bcc6e7d3223a90e468d980f6171a057c061733acbdd8cafcd\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Installation - libredesk Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Deploy libredesk using Docker, binary, or from source\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://libredesk.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Installation\u0026amp;description=Deploy+libredesk+using+Docker%2C+binary%2C+or+from+source\u0026amp;theme=12bf31105a52d6fc8c8a51bc\u0026amp;signature=f676ed9ef104905bcc6e7d3223a90e468d980f6171a057c061733acbdd8cafcd\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/libredesk/JiEZMYNDHwQfL7ME/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"libredesk Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.libredesk.io/getting-started/installation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/getting-started/installation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.libredesk.io/#organization\",\"name\":\"libredesk Documentation\",\"url\":\"https://docs.libredesk.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://s3.ap-south-1.amazonaws.com/libredesk.io/libredesk_black.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.libredesk.io#website\",\"name\":\"libredesk Documentation\",\"url\":\"https://docs.libredesk.io\",\"publisher\":{\"@id\":\"https://docs.libredesk.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.libredesk.io/getting-started/installation#webpage\",\"url\":\"https://docs.libredesk.io/getting-started/installation\",\"name\":\"Installation\",\"description\":\"Deploy libredesk using Docker, binary, or from source\",\"dateModified\":\"2026-10-22T12:19:41.184Z\",\"isPartOf\":{\"@id\":\"https://docs.libredesk.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.libredesk.io/getting-started/installation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.libredesk.io/getting-started/installation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"libredesk Documentation\",\"item\":\"https://docs.libredesk.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installation\",\"item\":\"https://docs.libredesk.io/getting-started/installation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.libredesk.io/getting-started/installation#article\",\"headline\":\"Installation\",\"name\":\"Installation\",\"description\":\"Deploy libredesk using Docker, binary, or from source\",\"url\":\"https://docs.libredesk.io/getting-started/installation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.libredesk.io/getting-started/installation#webpage\"},\"dateModified\":\"2026-10-22T12:19:41.184Z\",\"publisher\":{\"@id\":\"https://docs.libredesk.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.libredesk.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"libredesk Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"libredesk Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/getting-started/installation.md","siteName":"libredesk Documentation","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/abhinavxd/libredesk"},{"anchor":"OpenAPI Spec","icon":"code","href":"https://docs.libredesk.io/api-reference/openapi.json"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Introduction","pages":[{"title":"Introduction","description":"Open source, self-hosted customer support software for email, live chat, and WhatsApp. Distributed as a single binary.","href":"/introduction"}]},{"group":"Getting Started","pages":[{"title":"Installation","href":"/getting-started/installation"},{"group":"Hosting Providers","pages":[{"title":"Deploy on Railway","description":"One-click deploy libredesk on Railway with managed PostgreSQL and Redis","href":"/hosting-providers/railway"}]},{"title":"Upgrade Guide","href":"/getting-started/upgrade"},{"title":"API Getting Started","href":"/getting-started/api-getting-started"}]},{"group":"Configuration","pages":[{"title":"Connecting Inboxes","href":"/configuration/connecting-inboxes"},{"title":"Live Chat","href":"/configuration/livechat"},{"title":"WhatsApp","href":"/configuration/whatsapp"},{"title":"Help Center","href":"/configuration/help-center"},{"title":"Email Templates","href":"/configuration/email-templates"},{"title":"AI","href":"/configuration/ai"},{"title":"SSO Setup","href":"/configuration/sso"},{"title":"Webhooks","href":"/configuration/webhooks"},{"title":"Context Links","href":"/configuration/context-links"},{"title":"SSRF protection","href":"/configuration/ssrf-protection"}]},{"group":"Roles","pages":[{"title":"Roles \u0026 Permissions","href":"/roles/overview"}]},{"group":"Contributing","pages":[{"title":"Developer Setup","href":"/contributing/developer-setup"},{"title":"Translations","href":"/contributing/translations"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Installation - libredesk Documentation","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}