Getting Started
Set up your own LibreDiary instance in minutes. Choose between Docker for a quick start or manual installation for full control.
Prerequisites
Before installing LibreDiary, ensure you have the following tools installed on your system.
Docker Quick Start
The fastest way to get LibreDiary running. Docker handles all dependencies automatically.
Create a project directory
bashmkdir librediary && cd librediaryCreate a docker-compose.yml file
docker-compose.ymlversion: "3.8" services: librediary: image: ghcr.io/akaal-creatives/librediary:latest container_name: librediary ports: - "3000:3000" environment: DATABASE_URL: postgres://libre:libre@db:5432/librediary SECRET_KEY: your-secret-key-here NODE_ENV: production depends_on: - db restart: unless-stopped db: image: postgres:15-alpine container_name: librediary-db environment: POSTGRES_USER: libre POSTGRES_PASSWORD: libre POSTGRES_DB: librediary volumes: - pgdata:/var/lib/postgresql/data restart: unless-stopped volumes: pgdata:Start the services
bashdocker compose up -dOpen LibreDiary in your browser
texthttp://localhost:3000LibreDiary will be available at http://localhost:3000. The first user to register will become the admin.
Manual Setup
For full control over your installation, follow these step-by-step instructions to set up LibreDiary from source.
Clone the repository
bashgit clone https://github.com/Akaal-Creatives/LibreDiary.git cd LibreDiaryInstall dependencies
bashpnpm installSet up the database
bash# Create a PostgreSQL database createdb librediary # Run database migrations pnpm db:migrateConfigure environment variables
bash# Copy the example environment file cp .env.example .env # Edit the .env file with your settings # At minimum, set DATABASE_URL and SECRET_KEYSee the Configuration section below for all available environment variables.
Start the development server
bashpnpm devThe application will start on http://localhost:3000 by default.
Build for production
bashpnpm build pnpm startFor production deployments, use the build command followed by start.
Configuration
LibreDiary is configured through environment variables. Copy .env.example to .env and adjust the values to match your environment.
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
SECRET_KEY | Secret key for session encryption and JWT signing |
NODE_ENV | Application environment |
PORT | Port the server listens on |
HOST | Host address to bind to |
STORAGE_PROVIDER | File storage backend (local, s3, minio) |
S3_BUCKET | S3 bucket name (when using S3/MinIO storage) |
S3_REGION | S3 region (when using S3 storage) |
OPENROUTER_API_KEY | API key for AI writing features via OpenRouter |
SMTP_HOST | SMTP server for email notifications |
SMTP_PORT | SMTP server port |
# Required
DATABASE_URL=postgres://user:password@localhost:5432/librediary
SECRET_KEY=change-me-to-a-secure-random-string
# Optional
NODE_ENV=production
PORT=3000
STORAGE_PROVIDER=local
# AI features (optional)
OPENROUTER_API_KEY=sk-or-v1-your-key-hereSystem Requirements
LibreDiary is designed to be lightweight. Here are the minimum and recommended specifications for self-hosting.
Minimum
- CPU1 vCPU
- RAM1 GB
- Storage10 GB SSD
- OSLinux (Ubuntu 22.04+, Debian 12+), macOS, or Windows with WSL2
Recommended
- CPU2+ vCPUs
- RAM2 GB+
- Storage20 GB+ SSD
- OSUbuntu 22.04 LTS or Debian 12
Supported Browsers
- Chrome / Chromium 90+
- Firefox 90+
- Safari 15+
- Edge 90+
Need more details?
Check the full documentation on GitHub for advanced configuration, API reference, and deployment guides.