Self-Hosting
Musubi is designed to be self-hosted. If you want your calendar data on your own infrastructure, this is the path.
Prerequisites
Section titled “Prerequisites”- A server with Docker and Docker Compose installed
- A domain name (optional but recommended for HTTPS)
1. Get the code
Section titled “1. Get the code”git clone https://github.com/f-tuma/musubi.gitcd musubi2. Configure environment variables
Section titled “2. Configure environment variables”cp .env.example .envEdit .env with your production values. Key variables:
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
BETTER_AUTH_SECRET | Long random secret — generate with openssl rand -base64 32 |
BETTER_AUTH_URL | The public URL of your API, e.g. https://musubi.yourdomain.com |
ENVIRONMENT | Set to anything other than dev for production |
For password reset emails to work, also set SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, and FROM_EMAIL.
3. Start everything
Section titled “3. Start everything”docker compose up -dThis starts the API server, the PostgreSQL database, and runs migrations automatically.
4. Point the mobile app at your server
Section titled “4. Point the mobile app at your server”When users open Musubi for the first time, they can enter a custom server URL on the welcome screen. Give them your server’s address — e.g. https://musubi.yourdomain.com.
Updating
Section titled “Updating”To pull the latest version:
git pulldocker compose downdocker compose up -d --buildMigrations run automatically on startup.
Backups
Section titled “Backups”The only stateful piece is the PostgreSQL database. Back it up with:
docker exec musubi-db pg_dump -U postgres musubi > backup.sqlRestore with:
cat backup.sql | docker exec -i musubi-db psql -U postgres musubi