A self-hosted drive solution
10K+
A modern, self-hosted cloud storage solution with mobile and web clients
Penombre is a comprehensive file storage and synchronization platform that provides you with complete control over your data. Built with modern technologies and designed for both individual users and organizations who want the convenience of cloud storage without sacrificing privacy and control.
Get the .env file
curl -o .env https://raw.githubusercontent.com/orochibraru/penombre/refs/heads/main/.example.env
Edit the .env file with your configuration (see below for details)
Start the application with Docker Compose:
services:
app:
image: orochibraru/penombre:latest
depends_on:
db:
condition: service_healthy
ports:
- 3000:3000
restart: unless-stopped
volumes:
- storage_data:/data
env_file: .env
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/penombre
db:
image: postgres:17-alpine
restart: unless-stopped
ports:
- 5432:5432
environment:
- POSTGRES_USER=${POSTGRES_USER-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD-postgres}
- POSTGRES_DB=${POSTGRES_DB-penombre}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
[
CMD-SHELL,
"sh -c 'pg_isready -U ${POSTGRES_USER-postgres} -d ${POSTGRES_DB-penombre}'",
]
interval: 1s
timeout: 2s
retries: 10
start_period: 3s
volumes:
postgres_data:
driver: local
storage_data:
driver: local
See .example.env for a complete reference.
| Variable | Description | Default |
|---|---|---|
APP_NAME | Application name (used in UI and emails) | Penombre |
APP_VERSION | Application version (used in metadata) | / |
APP_ENV | Environment (dev/production) | production |
ORIGIN | Public origin URL (used for OAuth callbacks) | http://localhost:3000 |
LOG_LEVEL | debug, info, warn, error | info |
LOG_FORMAT | console or json | console |
| Variable | Description | Default |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | Required |
| Variable | Description | Default |
|---|---|---|
AUTH_SECRET | Secret key for signing auth tokens | Required |
ENABLE_EMAIL_SIGNIN | Enable email/password sign-in | true |
ENABLE_OAUTH_SIGNIN | Enable OAuth sign-in | false |
MIN_PASSWORD_LENGTH | Minimum password length | 8 |
Configure OAuth providers using the pattern OAUTH_<PROVIDER>_<SETTING>:
| Variable | Description | Default |
|---|---|---|
OAUTH_<PROVIDER>_ENABLED | Enable this provider | true |
OAUTH_<PROVIDER>_CLIENT_ID | OAuth client ID | Required |
OAUTH_<PROVIDER>_CLIENT_SECRET | OAuth client secret | Required |
OAUTH_<PROVIDER>_DISCOVERY_URL | OIDC discovery URL | Required |
OAUTH_<PROVIDER>_PRETTY_NAME | Display name | Provider name |
OAUTH_<PROVIDER>_PKCE | Use PKCE | true |
OAUTH_<PROVIDER>_SCOPES | Comma-separated scopes | openid,profile,email |
| Variable | Description | Default |
|---|---|---|
SMTP_ENABLED | Enable SMTP | false |
SMTP_HOST | SMTP server hostname | Required if enabled |
SMTP_PORT | SMTP server port | 587 |
SMTP_USER | SMTP username | Required if enabled |
SMTP_PASSWORD | SMTP password | Required if enabled |
SMTP_FROM | Sender email address | Required if enabled |
SMTP_SECURE | Use TLS (true/false) | false |
Penombre is a monorepo with the following packages:
packages/
├── web/ # SvelteKit app (frontend + Hono API backend)
└── mobile/ # Expo/React Native mobile app
packages/web)The web package is a full-stack SvelteKit application:
STORAGE_PATH (default /data)packages/mobile)Clone the repository
git clone https://github.com/orochibraru/penombre.git
cd penombre
Install dependencies
bun install
Start development services
bun run dev
This starts PostgreSQL via Docker Compose and the Vite dev server for the web app.
Access the application
cd packages/mobile
bun install
bunx expo start
Note: When connecting to the web API from a device/emulator, don't use
localhost:
- iOS Simulator: Use your host machine IP (e.g.,
http://192.168.x.x:3000)- Android Emulator: Use
http://10.0.2.2:3000or set upadb reverse
Build and run the production container:
docker compose up --build
The app will be available at http://localhost:3000.
Penombre includes backup and restore scripts to protect your data. Backups include both the PostgreSQL database and all file storage.
# With the stack running:
bun run backup
# Or specify a custom backup directory:
./scripts/backup.sh /path/to/backups
This creates a timestamped archive containing:
# With the stack running:
bun run restore ./backups/penombre_backup_20240115_120000.tar.gz
# Or directly:
./scripts/restore.sh ./backups/penombre_backup_20240115_120000.tar.gz
Warning: Restore will replace all existing data. Make sure you have a backup of current data before restoring.
For automated backups, add a cron job:
# Daily backup at 2 AM
0 2 * * * cd /path/to/penombre && ./scripts/backup.sh /path/to/backups >> /var/log/penombre-backup.log 2>&1
# Root commands
bun run dev # Start dev servers (DB + web)
bun run test # Run tests
bun run build # Build all packages
bun run lint # Lint with Biome
bun run lint:fix # Lint and fix issues
bun run check # Type-check all packages
# Web package (packages/web)
bun run dev # Start Vite dev server
bun run build # Build for production
bun run check # Type-check with svelte-check
bun run db:generate # Generate Drizzle migrations
# Mobile package (packages/mobile)
bunx expo start # Start Expo dev server
bunx expo run:android # Run on Android
bunx expo run:ios # Run on iOS
This project is licensed under the MIT License - see the LICENSE file for details.
Built with these open-source technologies:
Content type
Image
Digest
sha256:084653eb7…
Size
221.4 MB
Last updated
4 days ago
docker pull orochibraru/penombre