Skip to main content

Quick Start

Get up and running in under a minute.

Ephemeral Mode (Try It Out)

Ephemeral mode uses transient storage. Uploaded files stay in memory, and the SQLite database is created as temporary scratch storage and discarded when the server stops.

./mahresources -ephemeral -bind-address=:8181

Open http://localhost:8181 in your browser.

Your First Upload

  1. Navigate to Resources in the top navigation bar
  2. Click the Create button
  3. Select one or more files to upload
  4. Add a name and optional description
  5. Click Save

The file is stored and indexed. Images get automatic thumbnails.

Your First Note

  1. Navigate to Notes in the top navigation bar
  2. Click the Create button
  3. Enter a title and text
  4. Optionally select a Note Type (you can create one under Note Types in the Admin menu)
  5. Click Save

Persistent Setup

To keep data between restarts, configure a database and file path.

./mahresources \
-db-type=SQLITE \
-db-dsn=./mahresources.db \
-file-save-path=./files \
-bind-address=:8181

This creates:

  • mahresources.db - SQLite database for all metadata
  • files/ - Directory where uploaded files are stored

PostgreSQL (For Larger Deployments)

./mahresources \
-db-type=POSTGRES \
-db-dsn="host=localhost user=mah password=secret dbname=mahresources" \
-file-save-path=/var/lib/mahresources/files \
-bind-address=:8181

Environment Variables

All flags can also be set as environment variables in a .env file:

# .env file
DB_TYPE=SQLITE
DB_DSN=./mahresources.db
FILE_SAVE_PATH=./files
BIND_ADDRESS=:8181

Then run:

./mahresources

Next Steps

Next: First Steps to learn how to organize content.