# Configuration
URL: https://usememos.com/docs/configuration

Configure Memos around how your instance runs, where its data lives, and how people sign in. These pages explain startup options, declarative configuration files, database and attachment storage, and access controls.

<Cards>
  <Card title="Environment Variables" href="/docs/configuration/environment-variables" icon="Terminal">
    Set the listen address, port, data directory, database connection, and canonical instance URL.
  </Card>

  <Card title="Declarative Configuration" href="/docs/configuration/declarative-configuration" icon="Settings">
    Describe identity providers, instance settings, and bootstrap admins in JSON files, then plan and apply them.
  </Card>

  <Card title="Database" href="/docs/configuration/database" icon="Database">
    Configure SQLite, MySQL, or PostgreSQL and understand the operational tradeoffs.
  </Card>

  <Card title="Storage" href="/docs/configuration/storage" icon="HardDrive">
    Choose where attachments live and manage named storage configurations for new and existing files.
  </Card>

  <Card title="Authentication" href="/docs/configuration/authentication" icon="Key">
    Configure password sign-in, SSO providers, and personal access tokens.
  </Card>

  <Card title="Security" href="/docs/configuration/security" icon="Shield">
    Review HTTPS, credentials, sharing, and recovery as part of operating your instance.
  </Card>
</Cards>

## Choose the question you need to answer [#choose-the-question-you-need-to-answer]

| If you want to know…                                               | Start with…                                                                |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| How do I change the port, data path, or external URL?              | [Environment Variables](/docs/configuration/environment-variables)         |
| How do I keep settings under deployment or secret-manager control? | [Declarative Configuration](/docs/configuration/declarative-configuration) |
| Which database fits my deployment?                                 | [Database](/docs/configuration/database)                                   |
| Where should uploads be stored?                                    | [Storage](/docs/configuration/storage)                                     |
| How do I set up SSO or authenticate an integration?                | [Authentication](/docs/configuration/authentication)                       |
| What should I review before exposing the instance?                 | [Security](/docs/configuration/security)                                   |

## Configuration layers [#configuration-layers]

Runtime flags and `MEMOS_*` environment variables control server startup. Instance settings manage policies and services through the UI or API. From 26.10, [declarative configuration](/docs/configuration/declarative-configuration) files can manage identity providers, instance settings, and bootstrap administrators instead: Memos applies them at startup or with `memos config apply`, and managed resources are read-only in the app.

In Memos 0.31, the `ACCESS` instance setting selects public or private access independently of `MEMOS_INSTANCE_URL`. Set the URL to the canonical external HTTP(S) address, including for private instances behind a proxy. Manage access in instance settings or in [declarative configuration](/docs/configuration/declarative-configuration#access-policy).

For the installation itself, start with [Deploy](/docs/deploy). Once Memos is running, use [Admin](/docs/admin) for ongoing instance and account management, and [Reverse Proxy](/docs/deploy/reverse-proxy) for HTTPS and forwarded headers.
