Enable self-hosting on Synology NAS #4057
Replies: 6 comments 19 replies
-
|
hey @StefanOltmann. Thanks for raising this, I have a Synology device on order. Regarding: First you can't have a container use the official 5432 port. This must be remapped to something else to not collide with the internal Postgres of Synology DSM Have you looked into overriding the port using an environment variable? source: https://github.com/ente-io/ente/blob/main/server/configurations/local.yaml#L18-L27 |
Beta Was this translation helpful? Give feedback.
-
|
I really don't get why it's so hard to self host Ente. My intention was to set it up again in a clean way and document that for others, but the system doesn't work. What I wanted to change here is:
The empty folders exist and I can start up the system and register, but it won't upload files. minio-provision spams
|
Beta Was this translation helpful? Give feedback.
-
|
The issue is with uploads, checkout https://help.ente.io/self-hosting/guides/configuring-s3.
What do you mean by Empty Folders ? Are they the empty folders in in MinIO UI you're seeing or is it somewhere else ? The minio spam error should be ignorable. The reason why it fails is, minIO keep on failing. Most likely the credentials are wrong for the bucket in your config or dockerfile. I can't assure because on a normal setup these haven't failed for me (other than once, when I manually fixed it). Check all the credential related to minIO you've modified or changed. You can try fixing this manually as well by entering into the container and setting the appropriate alias manually. Checkout. If museum doesn't have logs, javascript isn't going to hold it back :). You can always check whats happening in XHR logs. |
Beta Was this translation helpful? Give feedback.
-
Oh, yes, that was it. I didn't get that this I suggest for clarity to change it in the template to |
Beta Was this translation helpful? Give feedback.
-
|
It still does not work for me. I'll try in a few months again. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @StefanOltmann, meanwhile I have it up and running but sill some errors in the container logs. my "docker" folder is "/ente-io" and it contains the following manually generated folder:
as well as the two yaml-files
Note: This all needs to be there before compose.yaml is executed. The docker compose file "compose.yaml" contains: # compose.yaml (specifically to build latest ente via docker in synology container manager for DSM 7.2.2)
services:
museum:
image: ghcr.io/ente-io/server
container_name: ente-museum
restart: unless-stopped
ports:
- 8080:8080 # API
# - 2112:2112 # Prometheus metrics (comment in for status monitoring of server)
depends_on:
postgres:
condition: service_healthy
environment:
# Pass-in the config to connect to the DB and MinIO
ENTE_CREDENTIALS_FILE: /credentials.yaml
# ENTE_CLI_SECRETS_PATH: /cli-data/secret.txt
# ENTE_CLI_CONFIG_PATH: /cli-data/
# - PUID=1000
# - PGID=1000
# - TZ=DE
volumes:
- /volume1/docker/ente-io/credentials.yaml:/credentials.yaml:ro
- /volume1/docker/ente-io/custom-logs:/var/logs
- /volume1/docker/ente-io/museum.yaml:/museum.yaml:ro
- /volume1/docker/ente-io/data:/data:ro
networks:
- ente
# Resolve "localhost:3200" in the museum container to the minio container.
socat:
image: alpine/socat
container_name: ente-socat
restart: unless-stopped
network_mode: service:museum
depends_on: [museum]
command: "TCP-LISTEN:3200,fork,reuseaddr TCP:minio:3200"
web:
image: ghcr.io/ente-io/web
container_name: ente-web
restart: unless-stopped
# Uncomment what you need to tweak.
ports:
- 3000:3000 # Photos web app
# - 3001:3001 # Accounts
- 3002:3002 # Public albums
# - 3003:3003 # Auth
# - 3004:3004 # Cast
# environment:
# ENTE_API_ORIGIN: http://localhost:8080
# ENTE_ALBUMS_ORIGIN: https://localhost:3002
networks:
- ente
postgres:
image: postgres:15 # :16 seems to be also working (but did not test it since ente scripts use all :15)
container_name: ente-postgres
restart: unless-stopped
ports:
- 5433:5433 # default port: 5432 # changed since Synology NAS already internally used this port (use/check same in museum.yaml!)
environment:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: _my_secret_pguser_password_
POSTGRES_DB: ente_db
PGPORT: 5433 #default port: 5432
# Wait for postgres to accept connections before starting museum.
healthcheck:
# Also do this with correct custom port option "-p xxxx"
test: pg_isready -q -d ente_db -U pguser -p 5433
start_period: 40s
# start_interval: 1s # start_interval property needs docker compose >=v2.30.0+ which synology does not yet provide.
# Synology DSM v7.2.2. comes with Docker Engine v24.0.2 which runs "Docker Compose" v2.18.1
volumes:
#- postgres-data:/var/lib/postgresql/data
- /volume1/docker/ente-io/postgres-data:/var/lib/postgresql/data
networks:
- ente
minio:
image: minio/minio
container_name: ente-minio
restart: unless-stopped
ports:
- 3200:3200 # MinIO API
- 3201:3201 # MinIO Console
environment:
# MINIO_SERVER_URL: "http://minio.example.com/"
# MINIO_BROWSER_REDIRECT_URL: "http://minio.example.com/console/"
MINIO_ROOT_USER: minio_user_ente
MINIO_ROOT_PASSWORD: _my_secret_minio_user_ente_password_
command: server /data --address ":3200" --console-address ":3201"
volumes:
#- minio-data:/data
- /volume1/docker/ente-io/minio-data:/data
# post_start: # post_start property needs docker compose >=v2.30.0+ which synology does not provided. DSM v7.2.2. is at Docker Engine v24.0.2 which comes with compose v2.18.1
# # issue and workaround see here: https://help.ente.io/self-hosting/troubleshooting/docker
#
#post_start:
# - command: |
# sh -c '
# #!/bin/sh
# while ! mc config host add h0 http://minio:3200 minio_user_ente _my_secret_minio_user_ente_password_ 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
# '
###### once post_start is supported by synology comment above in and below out #######
entrypoint: |
sh -c '
#!/bin/sh
while ! mc config host add h0 http://minio:3200 minio_user_ente _my_secret_minio_user_ente_password_ 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
'
######################################################################################
networks:
- ente
networks:
ente:
# external: true
volumes:
postgres-data:
minio-data:The " credentials.yaml" contains: # credentials.yaml
# copy file with this content into setup folder where the compose.yaml will be
key:
encryption: eGJKOFoyZ2FwMjN0ZzFnN0RqZlNydHVk # this key needs to be base64 and max(?) 32 char long and should be randomly populated via bash command: tr -dc A-Za-z0-9 </dev/urandom | base64 | head -c 32; echo
hash: OTd4U1lWc3EzMWFSYzBEd0hSa1ZCb1VuYUlReDhsNnh2WGRJR3dIQ0tBTHJ2Y0dl # this hash needs to be base64 and max(?) 64 char long and should be randomly populated via bash command: tr -dc A-Za-z0-9 </dev/urandom | base64 | head -c 64; echo
jwt:
secret: VkJJNTkzbk01QkRKVnFRYW9iclBFcUpS # this secret needs to be base64 and max (?) 32 chars long and should be randomly populated via bash command: tr -dc A-Za-z0-9 </dev/urandom | base64 | head -c 32; echo
db:
host: postgres
port: 5433 #default port: 5432
# take identical postgres DB credential as in compose.yaml
# POSTGRES_USER: pguser
# POSTGRES_PASSWORD: _my_secret_pguser_password_
# POSTGRES_DB: ente_db
name: ente_db
user: pguser
password: _my_secret_pguser_password_
s3:
are_local_buckets: true
# use identical minio credentials as in compose.yaml
# MINIO_ROOT_USER: minio_user_ente
# MINIO_ROOT_PASSWORD: _my_secret_minio_user_ente_password_
b2-eu-cen:
key: minio_user_ente
secret: _my_secret_minio_user_ente_password_
endpoint: localhost:3200
region: eu-central-2
bucket: b2-eu-cen
wasabi-eu-central-2-v3:
key: minio_user_ente
secret: _my_secret_minio_user_ente_password_
endpoint: localhost:3200
region: eu-central-2
bucket: wasabi-eu-central-2-v3
compliance: false
scw-eu-fr-v3:
key: minio_user_ente
secret: _my_secret_minio_user_ente_password_
endpoint: localhost:3200
region: eu-central-2
bucket: scw-eu-fr-v3And "museum.yaml" contains: # museum.yaml
# copy file with this content into setup folder where the compose.yaml will be
key:
encryption: eGJKOFoyZ2FwMjN0ZzFnN0RqZlNydHVk # this key needs to be base64 and max(?) 32 char long and should be randomly populated via bash command: tr -dc A-Za-z0-9 </dev/urandom | base64 | head -c 32; echo
hash: OTd4U1lWc3EzMWFSYzBEd0hSa1ZCb1VuYUlReDhsNnh2WGRJR3dIQ0tBTHJ2Y0dl # this hash needs to be base64 and max(?) 64 char long and should be randomly populated via bash command: tr -dc A-Za-z0-9 </dev/urandom | base64 | head -c 64; echo
jwt:
secret: VkJJNTkzbk01QkRKVnFRYW9iclBFcUpS # this secret needs to be base64 and max (?) 32 chars long and should be randomly populated via bash command: tr -dc A-Za-z0-9 </dev/urandom | base64 | head -c 32; echo
db:
host: postgres
port: 5433 #default port: 5432
# take identical postgres DB credential as in compose.yaml
# POSTGRES_USER: pguser
# POSTGRES_PASSWORD: _my_secret_pguser_password_
# POSTGRES_DB: ente_db
name: ente_db
user: pguser
password: _my_secret_pguser_password_
s3:
are_local_buckets: true
# use identical minio credentials as in compose.yaml
# MINIO_ROOT_USER: minio_user_ente
# MINIO_ROOT_PASSWORD: _my_secret_minio_user_ente_password_
b2-eu-cen:
key: minio_user_ente
secret: _my_secret_minio_user_ente_password_
endpoint: localhost:3200
region: eu-central-2
bucket: b2-eu-cen
wasabi-eu-central-2-v3:
key: minio_user_ente
secret: _my_secret_minio_user_ente_password_
endpoint: localhost:3200
region: eu-central-2
bucket: wasabi-eu-central-2-v3
compliance: false
scw-eu-fr-v3:
key: minio_user_ente
secret: _my_secret_minio_user_ente_password_
endpoint: localhost:3200
region: eu-central-2
bucket: scw-eu-fr-v3****NOTE:
The good news for today is, that I can access a local ente instance on http://:3000 I will try resolving the issue within minio. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to self host ente on my Synology DS920+ withing the Container Manager and noticed here several problems.
First you can't have a container use the official 5432 port. This must be remapped to something else to not collide with the internal Postgres of Synology DSM:
After that I noticed I can't change the password "pgpass" for Postgres or museum won't start up.
And lastly Synology doesn't have a proper volume support. It would be great to change that in a way that all data is actually written to the "data" mount point.
I managed to start my instance, but the "data" folder is empty.
Would be great if you could make this working smooth with Synology NAS.
Beta Was this translation helpful? Give feedback.
All reactions