Ente部署记录
Ente是什么?
简介
Ente是一群工具的集合,包括locker,su,photo,paste的集合(截止至2026.4.18) 其中:
- Lcoker:是一个私密空间,用于存储、分享和传递您最重要的数字信息
- Photos 是 Google Photos 和 Apple Photos 的端到端加密替代方案
- Ensu 是 Ente 的本地优先 AI 聊天应用。它直接在你的设备上运行一个大型语言模型(LLM),让你的对话完全私密。无需账户,无需追踪,无需使用次数限制,也无需支付费用(这玩意到目前而言比较类似对标Google的Gemini手机软件,但是依旧是非常前期的项目) 其中最为重要的就是Ente Photos这个玩意了,他是一个端对端的加密相册,但是却拥有人工智能识别,地理位置划分的功能,并且不使用服务器的资源,也是大大的节省了服务器的资源(这就不得不提immich了,虽然集中了资源处理,可是服务器配置远远不及个人设备下,计算效率非常低下),可以说是非常好用了 官方文档:https://ente.com/help/ 但是这里不得不喷官方的文档简直就是稀烂
部署前,先来看看Ente的架构
为了方便,我就拿AI帮助我生成了,总览:

其中比较重要的是

其中museum也被叫做终端
Ente部署
官方是有自己的一键部署脚本的,可以看看 脚本 其实就是一个docker- compose和museum的yml文件的一键生成代码和docker启动指令而已,不过确实也能一定解决一点问题,不过如果打算在公网使用,不推荐直接使用他,拿来生成一份基础的配置文件即可 并且推荐一定要用反向代理,直接使用端口,可能会造成一些问题 以下配置中,英文注释为自带的注释
域名列表
museun
docker-compose的配置文件(需要修改的地方我会备注)
services: museum: image: ghcr.io/ente-io/server ports: - 8080:8080 # API(此处为museum的暴露端口) depends_on: postgres: condition: service_healthy volumes: - ./museum.yaml:/museum.yaml:ro - ./data:/data:ro healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/ping"]# 此处的test在容器内,因此就算使用域名也不用更改 interval: 60s timeout: 5s retries: 3 start_period: 120s
# Resolve "localhost:3200" in the museum container to the minio container.# socat是内部协商的进程,可以不理 socat: image: alpine/socat network_mode: service:museum depends_on: [museum] command: "TCP-LISTEN:3200,fork,reuseaddr TCP:minio:3200"
web: image: ghcr.io/ente-io/web # Uncomment what you need to tweak. ports: - 3000:3000 # Photos web app # - 3001:3001 # Accounts(museum通行密钥服务) - 3002:3002 # Public albums # - 3003:3003 # Auth(另外的TOTP自行托管服务,不过还是得勤备份,不然服务没了,就完了) # - 3004:3004 # Cast(Photo的其他设备的投屏服务) # - 3005:3005 # Share(Locker服务) # - 3006:3006 # Embed(在其他页面嵌入代码用的服务) # - 3008:3008 # Paste(这个暂时没搞懂) # Modify these values to your custom subdomains, if using any environment: ENTE_API_ORIGIN: https://ente-museum.example.xxx #你的域名 ENTE_ALBUMS_ORIGIN: https://ente-albums.example.xxx #你的域名 ENTE_PHOTOS_ORIGIN: https://ente-photo.example.xxx #你的域名
postgres: image: postgres:15 environment: POSTGRES_USER: pguser POSTGRES_PASSWORD: gZ48MlyM17A7Wsip3qG7hjd/VfR1 POSTGRES_DB: ente_db healthcheck: test: pg_isready -q -d ente_db -U pguser start_period: 40s start_interval: 1s volumes: - postgres-data:/var/lib/postgresql/data
minio: image: minio/minio ports: - 3200:3200 # MinIO API # Uncomment to enable MinIO Web UI # - 3201:3201 #这里可开可不可,开进MinIo里可以看看被加密的文件,就没什么用了,不过要开的话,得把MinIO API启动后才能登录进去 environment: MINIO_ROOT_USER: minio-user-Q9nyRF8a MINIO_ROOT_PASSWORD: L+ditvZHvCKI/CjNLGzSwMlR4yTl command: server /data --address ":3200" --console-address ":3201" volumes: - minio-data:/data post_start: - command: | sh -c ' #!/bin/sh
while ! mc alias set h0 http://minio:3200 minio-user-Q9nyRF8a L+ditvZHvCKI/CjNLGzSwMlR4yTl 2>/dev/null do echo "Waiting for minio..." sleep 0.5 done
cd /data
mc mb -p b2-eu-cen mc mb -p wasabi-eu-central-2-v3 mc mb -p scw-eu-fr-v3 '
volumes: postgres-data: minio-data:museum配置文件
db: host: postgres port: 5432 name: ente_db user: pguser password: gZ48MlyM17A7Wsip3qG7hjd/VfR1
s3: # Top-level configuration for buckets, you can override by specifying these configuration in the desired bucket. # Set this to false if using external object storage bucket or bucket with SSL are_local_buckets: true # 这里如果要使用公网要把这里关了 # Set this to false if using subdomain-style URL. This is set to true for ensuring compatibility with MinIO when SSL is enabled. use_path_style_urls: true b2-eu-cen: # Uncomment the below configuration to override the top-level configuration # are_local_buckets: true # use_path_style_urls: true key: minio-user-Q9nyRF8a secret: L+ditvZHvCKI/CjNLGzSwMlR4yTl endpoint: https://ente-minoapi.example.xxx # 这里修改为自己的minoio的api域名 region: eu-central-2 bucket: b2-eu-cen wasabi-eu-central-2-v3: # are_local_buckets: true # use_path_style_urls: true key: minio-user-Q9nyRF8a secret: L+ditvZHvCKI/CjNLGzSwMlR4yTl endpoint: https://ente-minoapi.example.xxx # 这里修改为自己的minoio的api域名 region: eu-central-2 bucket: wasabi-eu-central-2-v3 compliance: false scw-eu-fr-v3: # are_local_buckets: true # use_path_style_urls: true key: minio-user-Q9nyRF8a secret: L+ditvZHvCKI/CjNLGzSwMlR4yTl endpoint: https://ente-minoapi.example.xxx # 这里修改为自己的minoio的api域名 region: eu-central-2 bucket: scw-eu-fr-v3
# Specify the base endpoints for various web appsapps: # If you're running a self hosted instance and wish to serve public links, # set this to the URL where your albums web app is running. # 这里有需要的就改成自己的域名就行了 public-albums: https://ente-albums.example.xxx cast: http://localhost:3004 # Public locker (share) app public-locker: https://localhost:3005 # Public paste app public-paste: http://localhost:3008 # Embed app for embedded album sharing embed-albums: http://localhost:3006 # Set this to the URL where your accounts web app is running, primarily used for # passkey based 2FA. accounts: http://localhost:3001
key: encryption: YFYXhtFNdiP5TCeqgHgssTedPzhErPVb8HBW11w1YyM= hash: KybAIMxdy2tiyr8+0nodoA8h5oSHWccyYzeTrugYJDUFYubl9iAadwPDEpjMxnY/7Hg/E0dOC1apy4WYJa8oIw==
jwt: secret: hI_yIzLFeHRIlivavcTcKUXJ99PXRVwXUrFENGsIA5o=
# 一下为而外设置,因服务而改变webauthn: # 这里是如果开启通行密钥后的设置 rpid: ente-accounts.example.com # 你的通行密钥验证会对ente-accounts.example.com以及他的子域名标记为通行密钥的识别域名 rporigins: - "https://ente-accounts.example.com" # 这里你的通信密钥服务会对这里面的域名豁免,并且需要完全匹配,防止中间人攻击#internal:# admins: # 这里是你的管理员账号的ID# - hidden# disable-registration: true # 这里是禁止新用户注册这里面需要注意,bucket的名称是被硬编码于配置文件里的,因此不能修改 并且虽然有三个bucket,但是实际本地存储就用一个而已
配置管理员账号和无限大小
一下内容来自 阿银 的Blog(我懒得写了,官方一直没有更新😢) Ente这个程序目前没有可视化的管理员界面,所有管理操作只能通过CLI来完成。 安装ente-cli:
mkdir -p /opt/ente-cli/export && cd /opt/ente-cli
wget https://github.com/ente-io/ente/releases/download/cli-v0.2.3/ente-cli-v0.2.3-linux-amd64.tar.gz
tar -xzvf ente-cli-v0.2.3-linux-amd64.tar.gz这玩意目前在Linux下运行会报错,运行前必须先导入这个环境变量才行:
export ENTE_CLI_SECRETS_PATH=./secrets.txt嫌麻烦的话可以写到.bashrc里面,这样每次打开终端就自动加载了。 在这个CLI所在的目录下新建一个配置文件:
nano config.yaml写入如下内容,将API的地址改为你自己的后端地址:
endpoint:
api: "https://ente-museum.example.com"添加账号,CLI只能添加现有账号,不能注册新账号,也就是只能添加刚才通过Web界面注册的账号:
./ente account add添加的时候会让你输入一个导出目录,这里就填写export即可,之前已经创建好这个目录了:
Enter app type (default: photos):
Use default app type: photos
Enter export directory: export
Enter email address: imlala@example.com
Enter password:
Please wait authenticating...
Account added successfully
run `ente export` to initiate export of your account data然后这个CLI目前有BUG。。如果你启用了Passkey通行密钥,在使用CLI登录的时候返回的验证URL是错的,这会导致无法登录,只能暂时先把Passkey关了。。 执行如下命令查看账号的ID:
./ente account list类似如下回显:
Configured accounts: 1
====================================
Email: imlala@example.com
ID: 1580559962386438
App: photos
ExportDir: export
====================================然后编辑后端的museum.yaml配置文件:
cd /opt/ente.io && nano museum.yaml取消掉之前的注释,将ID修改为你自己的,同时为防止滥用可以关闭新用户注册:
internal:
admins:
- 1580559962386438
disable-registration: true最后
至此,大功告成 还是得说说,软件是很好用的东西,可是文档确实是稀烂,能够把很多自建用户劝退了吧,还是希望能够有更多的人能够使用上并且参与到其中文档的补全中吧!
对了,要是使用过程中出现一下内容:
[2025-11-28T23:11:15+08:00] Error: Error: net::ERR_CONNECTION_CLOSED at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:2:124413) at SimpleURLLoaderWrapper.emit (node:events:519:28)[2025-11-28T23:11:15+08:00] [main] [error] Unhandled rejection: Error: net::ERR_CONNECTION_CLOSEDError: net::ERR_CONNECTION_CLOSED at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:2:124413) at SimpleURLLoaderWrapper.emit (node:events:519:28)那问题就是没有使用可被信任的SSL证书了,因为他的底层的库,在使用时是会收设备根证书的影响的
文章分享
如果这篇文章对你有帮助,欢迎分享给更多人!