selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
luna logo

Self-host luna

Self-hosted calendar aggregator with CalDAV, iCal, Google

AlphaOpen Source
Updated4 months ago
LanguageGo
Setup difficultyAdvanced
ThemeDark mode
Stars
525
Ports
8080 (frontend HTTP), 3000 (backend API)
Requires
PostgreSQL
Install with Docker Compose
Luna calendar in light and dark modeLuna calendar with different themes

What is luna?

Luna is a self-hosted calendar aggregator and frontend that consolidates multiple calendar sources — CalDAV servers, iCal files, and Google Calendar — into one web application. It supports user management with registration and login, customizable themes and fonts with many built-in options, and a dark mode. The project is nearing a 1.0.0 release but is not yet officially released; the developer notes that recurring event support and mobile screen size support are still incomplete. Deployment is via Docker Compose (building images locally with make) or baremetal using bun, Go, and PostgreSQL 16+. No first-party Docker images are published yet, though community images exist. The backend requires PostgreSQL and stores data with encryption. Authentication is built-in username/password with JWT tokens; OAuth 2.0 is supported for connecting to calendar sources, not for user login. The API uses bearer tokens or cookies. There is no LDAP, OIDC, SAML, or 2FA support yet — these are listed as future plans.

Should you self-host luna?

luna scores 43/100 on selfhost.directory (how scoring works) and ranks #25 of 30 in Calendar & Contacts. It has 525 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is written mostly in Go.

Its closest alternative on selfhost.directory is Radicale (69/100, 5 152 stars). It scores higher overall, so compare the two before you pick. See luna vs Radicale side by side.

Features

  • CalDAV Support
  • Calendar aggregation
  • CSRF protection
  • Customizable fonts
  • Database Encryption
  • Google Calendar support
  • iCal support
  • OAuth 2.0 for calendar sources
  • Rate Limiting
  • REST API
  • User Management

luna README

How to install luna

Install luna with Docker Compose

make, docker
Environment variables
PORT, PUBLIC_URL, API_URL for frontend; PUBLIC_URL, DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE, DATA_PATH, API_PORT, REQUEST_TIMEOUT_DEFAULT, REQUEST_TIMEOUT_AUTHENTICATION, DEVELOPMENT for backend

make

or

docker compose up -d --build

Builds images locally; no first-party images published yet. Community images available at tiritibambix/lunafrontend and tiritibambix/lunabackend.

How to configure luna

  • API_PORT3000Backend API port

    Backend API port

  • API_URLhttp://localhost:3000How the frontend accesses the backend

    How the frontend accesses the backend

  • DATA_PATH/dataData storage path

    Data storage path

  • DB_DATABASElunaDatabase name (mandatory if DB_URL not specified)

    Database name (mandatory if DB_URL not specified)

  • DB_HOSTlocalhostDatabase host (mandatory if DB_URL not specified)

    Database host (mandatory if DB_URL not specified)

  • DB_PASSWORDlunaDatabase password (mandatory if DB_URL not specified)

    Database password (mandatory if DB_URL not specified)

  • DB_PORT5432Database port

    Database port

  • DB_URLDatabase connection string as a URL (optional)

    Database connection string as a URL (optional)

  • DB_USERNAMElunaDatabase username (mandatory if DB_URL not specified)

    Database username (mandatory if DB_URL not specified)

  • DEVELOPMENTfalseWhether backend runs in development mode

    Whether backend runs in development mode

  • PORT8080Frontend listen port

    Frontend listen port

  • PUBLIC_URLURL of the frontend (mandatory)

    URL of the frontend (mandatory)

  • REQUEST_TIMEOUT_AUTHENTICATION15sAuthentication request timeout

    Authentication request timeout

  • REQUEST_TIMEOUT_DEFAULT15sDefault request timeout

    Default request timeout

More in Calendar & Contacts

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…