Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions cross/ente-web/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
PKG_NAME = ente-web
PKG_VERS = 1.7.14
PKG_EXT = tar.gz
PKG_DIST_NAME = photosd-v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/ente-io/ente/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = ente-photosd-v$(PKG_VERS)

BUILD_DEPENDS = native/nodejs

HOMEPAGE = https://ente.io
COMMENT = Ente Photos web frontend - self-hosted photo storage and sharing
LICENSE = AGPL-3.0

INSTALL_TARGET = ente_web_install

include ../../mk/spksrc.install-resources.mk

ENV += NPM_CONFIG_USER=root
PATH := $(WORK_DIR)/../../../native/nodejs/work-native/node/bin:$(PATH)

.PHONY: ente_web_install
ente_web_install:
@$(MSG) "Installing yarn globally"
cd $(WORK_DIR)/$(PKG_DIR)/web && PATH=$(PATH) npm install -g yarn
@$(MSG) "Building Ente Photos web app"
cd $(WORK_DIR)/$(PKG_DIR)/web && PATH=$(PATH) yarn install --frozen-lockfile
cd $(WORK_DIR)/$(PKG_DIR)/web && PATH=$(PATH) yarn build:photos
@$(MSG) "Installing Ente Photos web app"
install -m 755 -d $(STAGING_INSTALL_PREFIX)/web
cp -R $(WORK_DIR)/$(PKG_DIR)/web/apps/photos/out/* $(STAGING_INSTALL_PREFIX)/web/
1 change: 1 addition & 0 deletions cross/ente-web/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web:web
3 changes: 3 additions & 0 deletions cross/ente-web/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ente-web-1.7.14.tar.gz SHA1 c95e584760f338af653fb7d385e90ba4d9b45233
ente-web-1.7.14.tar.gz SHA256 1212ca299767b5143fd8d0d625b8985af49c2ac270de08c5e74a075117421035
ente-web-1.7.14.tar.gz MD5 d47480510a7622be973361c2995201dd
46 changes: 46 additions & 0 deletions cross/ente/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
PKG_NAME = ente
PKG_VERS = 1.7.14
PKG_EXT = tar.gz
PKG_DIST_NAME = photosd-v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/ente-io/ente/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-photosd-v$(PKG_VERS)

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS)

DEPENDS = cross/libsodium
BUILD_DEPENDS = native/go

HOMEPAGE = https://ente.io/
COMMENT = End-to-end encrypted platform for photos and authenticators
LICENSE = AGPLv3

CGO_ENABLED = 1
COMPILE_TARGET = ente_compile_target
INSTALL_TARGET = ente_install_target

# Go source is in server subdirectory

export EXTRA_GOFLAGS=-buildvcs=false

include ../../mk/spksrc.cross-go.mk

ENV += CGO_ENABLED=1
ENV += CGO_CFLAGS=-I$(STAGING_INSTALL_PREFIX)/include
ENV += CGO_LDFLAGS=-L$(STAGING_INSTALL_PREFIX)/lib

.PHONY: ente_compile_target
ente_compile_target:
@cd $(WORK_DIR)/$(PKG_DIR)/server && env $(ENV) go build -o ../museum cmd/museum/main.go

.PHONY: ente_install_target
ente_install_target:
@install -m 755 -d $(STAGING_INSTALL_PREFIX)/bin
@install -m 755 -d $(STAGING_INSTALL_PREFIX)/share/server
@install -m 755 $(WORK_DIR)/$(PKG_DIR)/museum $(STAGING_INSTALL_PREFIX)/bin/
@cp -r $(WORK_DIR)/$(PKG_DIR)/server/configurations $(STAGING_INSTALL_PREFIX)/share/server/
@cp -r $(WORK_DIR)/$(PKG_DIR)/server/migrations $(STAGING_INSTALL_PREFIX)/share/server/
@cp -r $(WORK_DIR)/$(PKG_DIR)/server/mail-templates $(STAGING_INSTALL_PREFIX)/share/server/
@cp -r $(WORK_DIR)/$(PKG_DIR)/server/web-templates $(STAGING_INSTALL_PREFIX)/share/server/
@echo "Patching migrations for PostgreSQL transaction limitations"
@find $(STAGING_INSTALL_PREFIX)/share/server/migrations/ -name "*.up.sql" -exec sed -i '/ALTER TYPE.*ADD VALUE/d' {} \;
2 changes: 2 additions & 0 deletions cross/ente/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin:bin/museum
share:share/server
3 changes: 3 additions & 0 deletions cross/ente/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ente-1.7.14.tar.gz SHA1 c95e584760f338af653fb7d385e90ba4d9b45233
ente-1.7.14.tar.gz SHA256 1212ca299767b5143fd8d0d625b8985af49c2ac270de08c5e74a075117421035
ente-1.7.14.tar.gz MD5 d47480510a7622be973361c2995201dd
49 changes: 49 additions & 0 deletions spk/ente/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
SPK_NAME = ente
SPK_VERS = 1.7.14
SPK_REV = 1
SPK_ICON = src/ente.png

DEPENDS = cross/ente cross/ente-web

SPK_DEPENDS = "minio"

UNSUPPORTED_ARCHS = $(32bit_ARCHS) $(ARMv5_ARCHS)

MAINTAINER = SynoCommunity
DESCRIPTION = "End-to-end encrypted platform for photos and authenticators. Self-hosted alternative to Google Photos with privacy-first design."
DISPLAY_NAME = Ente
CHANGELOG = "Initial release of Ente server v1.7.14"
HOMEPAGE = https://ente.io
HELPURL = https://help.ente.io/self-hosting
SUPPORTURL = https://github.com/ente-io/ente/discussions

LICENSE = AGPLv3
LICENSE_FILE = $(WORK_DIR)/$(SPK_NAME)-photosd-v$(SPK_VERS)/LICENSE

WIZARDS_DIR = src/wizard/

# 'auto' reserved value grabs SPK_NAME
SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh
STARTABLE = yes

# Service configuration
SERVICE_PORT = 8097
SERVICE_PORT_TITLE = Ente (HTTP)

# Admin link
ADMIN_PORT = $(SERVICE_PORT)

POST_STRIP_TARGET = ente_extra_install

include ../../mk/spksrc.spk.mk

.PHONY: ente_extra_install
ente_extra_install:
@$(MSG) "Install configuration template"
@install -m 755 -d $(STAGING_DIR)/var
@install -m 644 src/museum.yaml $(STAGING_DIR)/var/museum.yaml
@$(MSG) "Install server configurations from cross/ente"
@if [ -d $(WORK_DIR)/install/$(INSTALL_PREFIX)/share ]; then \
cp -r $(WORK_DIR)/install/$(INSTALL_PREFIX)/share $(STAGING_DIR)/; \
fi
88 changes: 88 additions & 0 deletions spk/ente/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Ente for Synology NAS

End-to-end encrypted platform for photos.
Self-hosted alternative to Google Photos with privacy-first design.

## Prerequisites

**Important:** This package requires manual setup of external dependencies.

### 1. PostgreSQL Database Setup
Ente requires PostgreSQL. Use the built-in PostgreSQL on your Synology NAS:

```bash
# SSH into your Synology NAS as admin
sudo -u postgres createdb sc-ente
sudo -u postgres psql -c "GRANT ALL ON DATABASE \"sc-ente\" TO \"sc-ente\";"
```

**Note:** This creates a database named `sc-ente` that matches the service user name, using PostgreSQL's secure peer authentication (no passwords required).

### 2. MinIO Storage Setup
1. MinIO will be automatically installed as a dependency
2. Access MinIO web interface at `http://your-nas-ip:9001`
3. Login with default credentials: username=`minioadmin`, password=`minioadmin`
4. **Create a new bucket named `ente-data`** (this must be done manually)
5. Set the bucket policy to allow public read access if needed

## Installation

1. **Set up PostgreSQL first** (see prerequisites above)
2. **Set up MinIO bucket** (see prerequisites above)
3. Install ente package through Package Center
4. **The web interface will be available on port 8097**
5. **Security keys are automatically generated** during installation
6. **Edit database credentials** at `/var/packages/ente/var/work/credentials.yaml`

## Post-Installation Configuration

### 1. Database Configuration

Database connection is automatically configured.

- Uses PostgreSQL Unix socket authentication
- No manual credentials.yaml editing required
- Database: `sc-ente`, User: `sc-ente` (matches service user)
- No passwords needed (secure peer authentication)

### 2. Security Keys

Security keys are automatically generated during installation!

- Fresh cryptographic keys are created for each installation
- No manual key generation needed
- Keys are securely stored in `/var/packages/ente/var/museum.yaml`

### 3. Database Schema Setup

The museum binary will automatically create the necessary database schema on first run when you start the service.

## Usage

1. **Start the service** in Package Center after configuration
2. **Access the web interface** at: `http://your-nas-ip:8097`
3. **Create an account** and start uploading photos
4. **Use official Ente mobile apps** and configure them to connect to your NAS

## Important Security Notes

- **Security keys are automatically generated** for each installation
- **Database uses secure Unix socket authentication** (no passwords)
- **Consider enabling HTTPS** for production deployments
- **Regularly backup** your PostgreSQL database and MinIO storage
- **Keep the package updated** for security fixes

## Troubleshooting

- **Check service logs** at `/var/packages/ente/var/data/museum.log`
- **Verify database connectivity** using the credentials in credentials.yaml
- **Ensure MinIO service is running** and accessible
- **Verify storage bucket** `ente-data` exists in MinIO interface
- **Check firewall settings** for port 8097
- **Ensure PostgreSQL database** exists and user has proper permissions

## Support

- Official Ente documentation: https://help.ente.io/self-hosting
- SynoCommunity forums: https://github.com/SynoCommunity/spksrc/discussions
- Ente GitHub: https://github.com/ente-io/ente
100 changes: 100 additions & 0 deletions spk/ente/src/app/help/enu/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Ente</title>
<link href="/webman/help/help.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Ente</h1>
<p><a href="https://ente.io/">Ente</a> is an end-to-end encrypted platform for
photos and authenticators. It provides a self-hosted alternative to Google Photos
with privacy-first design, allowing you to store and sync your photos securely
on your own NAS.</p>

<h3>Prerequisites</h3>
<p><b>⚠️ Important:</b> Ente requires manual setup of PostgreSQL and MinIO before use.</p>
<p>You must create a PostgreSQL database first:</p>
<ol>
<li>SSH into your NAS as admin user</li>
<li>Run this one-liner:
<br><code>sudo -u postgres createdb sc-ente && sudo -u postgres psql -c "GRANT ALL ON DATABASE \"sc-ente\" TO \"sc-ente\";"</code>
</li>
</ol>
<p><b>Note:</b> This creates a database named <code>sc-ente</code> that matches the service user name, using PostgreSQL's secure peer authentication (no passwords required).</p>

<h3>Installation</h3>
<p>Once you have set up PostgreSQL:</p>
<ol>
<li>Install Ente through Package Center</li>
<li>MinIO will be automatically installed as a dependency</li>
<li>The service will be available on port 8097</li>
<li>Security keys will be automatically generated during installation</li>
</ol>
<p>After installation, you'll need to manually create the MinIO storage bucket.</p>

<h3>Configuration</h3>
<p><b>Good news:</b> Most configuration is automatic!</p>

<h4>Database Settings</h4>
<p><b>Automatic:</b> Database connection is pre-configured using Unix socket authentication.</p>
<ul>
<li>Database: <code>sc-ente</code></li>
<li>User: <code>sc-ente</code> (service user)</li>
<li>Authentication: Unix socket (no passwords needed)</li>
<li>Connection: <code>/run/postgresql</code></li>
</ul>

<h4>Security Keys</h4>
<p><b>Automatic:</b> Security keys are automatically generated during installation!</p>
<ul>
<li>Fresh cryptographic keys created for each installation</li>
<li>No manual key generation needed</li>
<li>Keys stored securely in <code>/var/packages/ente/var/museum.yaml</code></li>
</ul>

<h3>Usage</h3>
<p>After configuration:</p>
<ol>
<li>Start the service in Package Center</li>
<li>Access the web interface at: <code>http://your-nas-ip:8097</code></li>
<li>Create an account and start uploading photos</li>
<li>Use official Ente mobile apps and configure them to connect to your NAS</li>
</ol>

<h3>Storage Management</h3>
<p>Ente uses MinIO for S3-compatible local storage:</p>
<ol>
<li>Access MinIO web interface: <code>http://your-nas-ip:9001</code></li>
<li>Login with default credentials: username <code>minioadmin</code>, password <code>minioadmin</code></li>
<li>Create a bucket named <code>ente-data</code></li>
<li>Set the bucket policy to allow public read access if needed</li>
</ol>
<p>Photos will be stored in the <code>ente-data</code> bucket, and you can monitor storage usage through the MinIO interface.</p>

<h3>Troubleshooting</h3>
<p>If you experience issues:</p>
<ul>
<li>Check service logs at <code>/var/packages/ente/var/data/museum.log</code></li>
<li>Verify PostgreSQL database connectivity</li>
<li>Ensure MinIO service is running</li>
<li>Check that the configured port (8097) is not blocked by firewall</li>
<li>Verify storage bucket <code>ente-data</code> exists in MinIO</li>
</ul>

<h3>Security Notes</h3>
<ul>
<li>Always change default security keys before production use</li>
<li>Consider enabling HTTPS for production deployments</li>
<li>Regularly backup your PostgreSQL database</li>
<li>Keep the package updated</li>
</ul>

<h3>Support</h3>
<p>For additional help:</p>
<ul>
<li><a href="https://help.ente.io/self-hosting">Official Ente self-hosting documentation</a></li>
<li><a href="https://github.com/SynoCommunity/spksrc/discussions">SynoCommunity forums</a></li>
<li><a href="https://github.com/ente-io/ente">Ente GitHub repository</a></li>
</ul>
</body>
</html>
Binary file added spk/ente/src/ente.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading