You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ef7d065
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: content/docs/admin/instance-settings.mdx
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,21 @@ Instance settings control authentication, storage, and memo policies. Admins can
7
7
8
8
Common areas include:
9
9
10
+
- Instance access policy: public or private access, stored independently of the canonical instance URL.
10
11
- General access controls: user registration, password auth, username and nickname changes, week start day, and custom instance profile.
11
-
- Storage settings: database, local filesystem, or S3-compatible attachment storage, file path templates, and upload limits.
12
+
- Storage settings: named database, local filesystem, or S3-compatible configurations with stable IDs, a default for new uploads, file path templates, and upload limits.
- Notification settings: SMTP email delivery, sender details, reply-to address, and the email test endpoint.
14
15
- AI settings: instance-level OpenAI or Gemini providers and speech-to-text transcription defaults.
15
16
16
17
Tag colors and content-blur rules are user settings in Memos 0.30 and later, not instance settings. See [Tags](/docs/usage/tags).
17
18
19
+
## Access policy
20
+
21
+
In 0.31, the `ACCESS` setting determines whether anonymous visitors may read public content. `MEMOS_INSTANCE_URL` supplies the canonical external address and no longer changes an existing access policy. Use [deployment-managed access configuration](/docs/configuration/deployment-configuration#access-policy) when infrastructure should own this setting.
22
+
23
+
Instance admins manage these policies but do not become members of every Space or gain editing authority over other authors' memos. See [Users & Roles](/docs/admin/users-roles).
24
+
18
25
## Sensitive settings
19
26
20
27
Storage, notification, and AI settings can contain credentials. API responses do not return stored S3 secrets, SMTP passwords, or AI provider API keys in plaintext. When updating those settings, submit a new secret only when you intend to replace it.
Copy file name to clipboardExpand all lines: content/docs/admin/users-roles.mdx
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,22 @@ title: Users & Roles
3
3
description: Manage users and permissions.
4
4
---
5
5
6
-
Memos supports two roles:
6
+
Memos has two instance roles:**Admin** and **User**. The first account created during setup becomes an instance admin. Instance admins manage accounts, instance configuration, and access policy.
7
7
8
-
- Admin
9
-
- User
8
+
## Instance roles and Space roles
10
9
11
-
Admins can create users, update profiles, and manage access. The first account created during setup becomes an admin.
10
+
Each [Space](/docs/usage/spaces) has its own accepted **Admin** and **User** memberships. Instance roles and Space roles are independent: an instance User can create and administer a Space, while an instance Admin has no automatic membership in another user's Space.
11
+
12
+
Space admins manage the Space's metadata, invitations, and members. Neither kind of admin can edit another author's memo, change its visibility or placement, or manage its attachments, relations, or shares. Reading also follows the memo's visibility; instance administration does not grant access to private or members-only content.
13
+
14
+
## Usernames
15
+
16
+
Sign-in and username lookup are case-sensitive: `Alice` and `alice` are different spellings. New and renamed usernames must contain 1–36 ASCII letters or digits, with hyphens allowed only inside the name. Underscores, email addresses, and non-ASCII usernames cannot be newly assigned.
17
+
18
+
Legacy usernames remain addressable with their exact spelling. Spellings outside the new grammar cannot be written as new mentions. See [Authentication](/docs/configuration/authentication) and [Mentions](/docs/usage/reactions-comments#mentions).
19
+
20
+
## Removing access or accounts
21
+
22
+
Removing a Space member leaves their contributions in that Space. A Space must always retain an active admin, so assign another admin before removing or archiving the last one.
23
+
24
+
Deleting an account is blocked while it has active Space memberships, including when the API request sets `force`. Resolve those memberships first. Deleting a Space instead permanently deletes all directly assigned memos; it is not an equivalent way to remove one user's access.
Copy file name to clipboardExpand all lines: content/docs/configuration/authentication.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,10 @@ Password auth is usually the right starting point when:
35
35
36
36
Users sign in with their Memos username and password. Archived users cannot sign in. Failed sign-in attempts use the same error message for unknown usernames and wrong passwords, so the login page does not reveal whether a username exists.
37
37
38
+
### Username spelling
39
+
40
+
In 0.31, sign-in and lookup use exact-case usernames. `Alice` and `alice` are distinct spellings. New or renamed usernames must contain 1–36 ASCII letters or digits, with hyphens only inside the name. Existing legacy names remain addressable, but unsupported spellings cannot be used for new mentions. When diagnosing a failed sign-in after upgrading, check the stored username and its case before resetting credentials.
41
+
38
42
### Disable password authentication
39
43
40
44
Admins can disable password sign-in for regular users after SSO is configured. When password auth is disabled:
Memos 0.30 and later can load selected configuration from JSON files mounted under `/etc/secrets`. Use this when settings such as SSO, storage credentials, or registration policy should be controlled by Docker Compose, Kubernetes, GitOps, or a secret manager instead of the admin UI.
@@ -74,6 +74,7 @@ Memos scans direct children of `/etc/secrets` and reads only these filename patt
@@ -136,6 +137,25 @@ See [Authentication](/docs/configuration/authentication) for provider setup and
136
137
137
138
Each instance-setting file contains a `key` and the matching settings object. A file supplies the complete effective group: omitted scalar fields use their default values instead of inheriting values from the database. Empty secret fields are also treated as empty values.
138
139
140
+
### Access policy
141
+
142
+
In 0.31, use `memos-instance-setting-access.json` to select access independently of the canonical instance URL:
143
+
144
+
```json
145
+
{
146
+
"key": "ACCESS",
147
+
"accessSetting": {
148
+
"accessMode": "INSTANCE_ACCESS_MODE_PRIVATE"
149
+
}
150
+
}
151
+
```
152
+
153
+
Use `INSTANCE_ACCESS_MODE_PUBLIC` to allow eligible anonymous public reads. The mode must be explicit; an omitted or unspecified mode is rejected. This setting does not revoke existing share links.
154
+
155
+
Set `MEMOS_INSTANCE_URL` separately to the canonical external HTTP(S) URL. Credentials, queries, and fragments are not allowed. A private instance can have a canonical URL behind a reverse proxy.
156
+
157
+
The first upgraded startup initializes a missing database access setting from the old URL-based behavior. Later URL changes do not change access. Upgrade every replica before changing the policy; older binaries still infer public access from the URL. See [Upgrading to 0.31](/docs/operations/upgrade#upgrading-to-031).
158
+
139
159
### General
140
160
141
161
Use `memos-instance-setting-general.json` with `key: "GENERAL"`. The complete format is shown in the [Docker Compose quick start](#quick-start-with-docker-compose).
@@ -144,28 +164,37 @@ Use `memos-instance-setting-general.json` with `key: "GENERAL"`. The complete fo
144
164
145
165
### Storage
146
166
147
-
Storage types are `DATABASE`, `LOCAL`, and `S3`. S3 requires all credential and location fields shown below.
167
+
For 0.31, use named entries in `storages` and select one with `defaultStorageId`. Types are `DATABASE`, `LOCAL`, and `S3`. Each entry has a stable ID; existing attachments continue to use the configuration identified at upload time.
Keep every configuration referenced by existing attachments when replacing this complete settings group. Changing the default affects new uploads only. Legacy `storageType` and top-level `s3Config` remain supported for compatibility, but new configurations should use the named format. This example requires 0.31; pin the candidate image to `neosmemo/memos:0.31.0-rc.1` when testing it before the stable release.
197
+
169
198
Only enable `insecureSkipTlsVerify` for a trusted S3-compatible endpoint using a self-signed certificate. It disables TLS certificate verification.
@@ -36,9 +37,16 @@ When `MEMOS_DRIVER=sqlite` and `MEMOS_DSN` is empty, the database file defaults
36
37
37
38
### Public and private mode
38
39
39
-
Since Memos 0.30, an empty `MEMOS_INSTANCE_URL` puts the instance in **private mode**. Anonymous visitors are redirected to sign-in, RSS is unavailable, and anonymous API access is limited to setup, authentication, registration when allowed, and shared-memo routes.
40
+
In Memos 0.31, access is controlled by the `ACCESS` instance setting, through `accessSetting.accessMode`:
40
41
41
-
Set `MEMOS_INSTANCE_URL` to the canonical external URL when you intentionally want public profiles, public memos, Explore, RSS, and other anonymous reads. The value must include the scheme, for example `https://memos.example.com`.
42
+
-`INSTANCE_ACCESS_MODE_PRIVATE`: anonymous visitors are sent to sign-in; anonymous API access is limited to endpoints such as setup, authentication, registration when allowed, and explicit shared memos.
43
+
-`INSTANCE_ACCESS_MODE_PUBLIC`: eligible public memos, profiles, and Explore can be read anonymously.
44
+
45
+
Configure access in instance settings or with a [deployment-managed JSON file](/docs/configuration/deployment-configuration#access-policy). It is not a runtime flag or environment variable.
46
+
47
+
`MEMOS_INSTANCE_URL` supplies the canonical external address, including for a private instance behind a proxy. It must be an absolute HTTP(S) URL without credentials, a query, or a fragment, such as `https://memos.example.com`.
48
+
49
+
When the access setting is first initialized, Memos preserves the earlier behavior: a configured URL initializes public access; an empty URL initializes private access. Once the setting exists, changing the URL never changes the access policy. See [Upgrading to 0.31](/docs/operations/upgrade#upgrading-to-031).
42
50
43
51
## Priority order
44
52
@@ -50,10 +58,10 @@ An explicit flag always wins over the environment variable for the same setting.
50
58
51
59
## Practical guidance
52
60
53
-
-leave `MEMOS_INSTANCE_URL` empty for a private-only instance
54
-
- set it to the canonical public URL when you want anonymous public access or when the app sits behind a proxy
61
+
-select private or public access explicitly in the `ACCESS`instance setting
62
+
- set `MEMOS_INSTANCE_URL` to the canonical external URL when the app sits behind a proxy
55
63
- prefer explicit `MEMOS_DRIVER` and `MEMOS_DSN` when you are not using SQLite defaults
56
-
-leave `MEMOS_ALLOW_PRIVATE_WEBHOOKS` disabled unless your webhook targets intentionally live on a trusted private network
64
+
-allow only required private webhook destinations with `MEMOS_WEBHOOK_PRIVATE_NETWORK_ALLOWLIST`; leave the deprecated blanket option disabled
57
65
- keep secrets such as database credentials outside committed compose files
58
66
- treat these values as part of deployment config and back them up accordingly
@@ -27,7 +28,7 @@ Memos can be configured through command-line flags, `MEMOS_*` environment variab
27
28
- instance settings control storage, registration, and some auth behavior
28
29
- reverse proxy settings affect HTTPS, cookie behavior, and public URL correctness
29
30
30
-
`MEMOS_INSTANCE_URL` is also an access-mode switch in Memos 0.30 and later. Leave it empty for private mode; set it to the canonical external URL to enable anonymous public surfaces such as Explore and RSS.
31
+
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 a [deployment-managed access file](/docs/configuration/deployment-configuration#access-policy).
Copy file name to clipboardExpand all lines: content/docs/configuration/security.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ The JWT secret is auto-generated as a UUID on first run and stored in the databa
19
19
20
20
## Core recommendations
21
21
22
-
- leave `MEMOS_INSTANCE_URL` empty for private mode; set it only when anonymous public access is intended and to the canonical URL used by your reverse proxy
22
+
- select private access in the `ACCESS` instance setting when anonymous public access is not intended
23
+
- set `MEMOS_INSTANCE_URL` to the canonical URL used by your reverse proxy; changing this URL does not change access policy
23
24
- disable user registration if your instance is private
24
25
- disable public memo visibility if you do not want any public content
Copy file name to clipboardExpand all lines: content/docs/configuration/storage.mdx
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,14 @@ Memos supports three storage backends for attachments:
11
11
12
12
Storage is usually configured at the instance level rather than purely through startup flags.
13
13
14
+
## Named storage configurations
15
+
16
+
In 0.31, storage settings contain named configurations with stable IDs. Choose a default for new uploads. Existing attachments retain their storage ID, so switching the default does not move old files or change where Memos reads them.
17
+
18
+
Keep configurations that existing attachments still reference, including their credentials and backing objects. A new default is not a storage migration. Legacy settings migrate automatically on upgrade.
19
+
20
+
API and deployment-file clients should use `storages` and `defaultStorageId`. The older `storageType` and top-level `s3Config` fields remain compatibility fields. See the [deployment configuration example](/docs/configuration/deployment-configuration#storage).
21
+
14
22
## Database storage
15
23
16
24
Database-backed attachments are the default.
@@ -52,6 +60,12 @@ certificate verification for that connection, so use it only for an endpoint
52
60
you control and trust. Prefer installing a trusted certificate whenever
53
61
possible.
54
62
63
+
### Authenticated delivery
64
+
65
+
Memos proxies managed S3 files through its file routes and checks authorization there. Range requests support seeking and partial media reads. Managed S3 attachments no longer return presigned object URLs in `externalLink`; clients should use the Memos file route and preserve any share authorization supplied for a shared memo.
66
+
67
+
Back up all referenced storage configurations alongside the database and file objects. Changing the default storage only affects new uploads.
68
+
55
69
## Operational reminders
56
70
57
71
- set an upload limit appropriate for your environment
Copy file name to clipboardExpand all lines: content/docs/deploy/docker-compose.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ docker compose up -d
49
49
50
50
- keep your data directory on persistent storage
51
51
- place Memos behind a reverse proxy for HTTPS
52
-
-leave`MEMOS_INSTANCE_URL`empty for private mode, or set it to the canonical public URL to enable anonymous public access
52
+
-set`MEMOS_INSTANCE_URL`to the canonical external URL and configure private or public access separately through the [ACCESS setting](/docs/configuration/deployment-configuration#access-policy)
53
53
- back up both the database and any local assets if you do not use database-backed attachment storage
The quick-start command at the top of this page omits `MEMOS_INSTANCE_URL`, so it runs in private mode. The example above enables public mode and anonymous public surfaces by setting the canonical external URL.
90
+
On a fresh instance, the quick-start command initializes private access because it omits `MEMOS_INSTANCE_URL`. A configured URL initializes public access only when the access setting does not yet exist. In 0.31, select the desired `ACCESS` policy in instance settings or [deployment configuration](/docs/configuration/deployment-configuration#access-policy); changing the URL of an existing instance does not change that policy.
0 commit comments