Startup Options

The following options can be set at startup to adjust some of the server's behavior. Options can be passed either as command line arguments to the memos binary or as environment variables.

EnvironmentCLI FlagDefaultDescription
MEMOS_MODE--modeprodSets the mode of the server, influencing its runtime behavior and the database used. Can be prod (production), dev (development) or demo (demonstration).
MEMOS_ADDR--addr0.0.0.0 (all)Specifies the address on which the server will listen for incoming connections.
MEMOS_PORT--port5230Sets the port on which the server will be accessible.
MEMOS_DATA--data/var/opt/memosSpecifies the directory where Memos will store its data.
MEMOS_DRIVER--driversqliteSets the database driver to be used by Memos. Can be sqlite, postgres or mysql.
MEMOS_DSN--dsnSpecifies the database source name (DSN) for connecting to the database. Note that each database driver has its own format for specifying the DSN. See the database documentation for more information.
Important

Special characters in the DSN username and password must be escaped, such as converting = to %3D. Refer to the Connection URIs documentation for more details. Tools like URL Encoder can assist with this process.