How to Install Ente Photos on a VPS with Docker: An Encrypted Gallery to Replace Google Photos
Photos are the hardest data to leave behind in a free service. Tens of thousands of family photos, screenshots of documents, and short videos accumulate over years in a single Google Photos account — and moving them means downloading a giant archive, losing albums, and starting again from zero. Many people stay not because they are happy, but because leaving feels more expensive than staying.
Ente Photos offers a way out that does not ask you to trust any company's promises: an open-source photo gallery with end-to-end encryption, running the same code as their hosted service. Photos are encrypted on your device before upload, so the server — including your own VPS — only stores files that cannot be read without your keys. This guide installs it on a VPS with Ente's official quickstart script, then takes it to your own domain with Nginx and HTTPS.
One honest note first: installing Ente is not a single container like most guides on this blog. The official quickstart runs four services — museum as the API, the Photos web app, PostgreSQL, and MinIO object storage — plus a small container called socat. That is more to understand, but the official script handles most of the complexity, including generating random credentials. What you need to understand is what the script creates and where its files live, so that when something stalls you know what to check.
A note on the repository name: Ente's official documentation currently points to github.com/ente/ente — the quickstart command below uses that address. If you find older links to a different organisation name, use the address from the official docs.
Prerequisites
- A Linux VPS with Docker and Docker Compose v2.30 or newer installed. The quickstart script checks this version itself and stops if it is older — that requirement is written into the script.
- At least 1 GB of RAM and 1 CPU core, as stated on Ente's quickstart page. For a large photo collection, allow far more disk than RAM: it is your photos that fill the disk, not the application.
- SSH access to the VPS with
sudorights. - One domain already pointing at the VPS IP if you want HTTPS access, for example
photos.example.comfor the gallery andapi.example.comfor the API. This article uses those domains as examples; replace them with your own.
Check Docker and Compose first:
docker --version
docker compose version
Expected result: docker compose version prints v2.30 or newer. If the number is older, update Docker Compose first — the quickstart script will refuse to run.
Step 1: run the official quickstart script
Move to the folder where you want to keep the installation — /opt, for example — then run the command from Ente's quickstart page:
cd /opt
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente/ente/main/server/quickstart.sh)"
This downloads the quickstart.sh script from Ente's official repository and runs it. The script creates a my-ente folder in your working directory, containing two files: compose.yaml and museum.yaml. The credentials inside — the PostgreSQL password, MinIO credentials, museum encryption key, and JWT secret — are generated randomly by the script, not defaults shared by every installation. At the end, the script asks whether you want to start the cluster right away. Answer y to start, or n if you want to inspect the files first.
If you answered n, or the terminal closed halfway, start it yourself from that folder:
cd /opt/my-ente
docker compose up -d
Expected result: Docker downloads the required images — ghcr.io/ente/server for museum, ghcr.io/ente/web for the web app, postgres:15, pgsty/silo for object storage, and alpine/socat — then the containers come up. The first download takes a few minutes, depending on your VPS speed. Check the status:
docker compose ps
Expected result: the museum, web, postgres, minio, and socat services show as running or healthy. Museum has a healthcheck against http://localhost:8080/ping inside the container, so it can take up to two minutes before its status turns healthy — that is normal, not a sign of a stall.
Step 2: understand what was just created
Before opening the app, take a moment to understand the contents of /opt/my-ente. The generated compose.yaml holds four services, each with a role described in Ente's quickstart documentation:
| Service | Image | Port | Role |
|---|---|---|---|
| museum | ghcr.io/ente/server |
8080 | Ente's API server — every app talks to it |
| web | ghcr.io/ente/web |
3000, 3002 | Photos web app (3000) and public Albums (3002) |
| postgres | postgres:15 |
not exposed | The ente_db database for users and photo indexes |
| minio | pgsty/silo |
3200 | S3-compatible object storage for photo files |
| socat | alpine/socat |
— | Forwards localhost:3200 inside museum to MinIO |
Notice one detail that often confuses people: object storage in this setup uses port 3200, not the classic MinIO ports 9000/9001. That is because the quickstart uses the pgsty/silo image with the command server /data --address ":3200". Do not look for a MinIO console on port 9001 — that port is simply not opened here.
The second file, museum.yaml, is the museum server configuration: the database connection, three local S3 buckets (b2-eu-cen, wasabi-eu-central-2-v3, scw-eu-fr-v3) all pointing at local MinIO with endpoint: localhost:3200, the encryption and hash keys, the JWT secret, and an apps section holding the web app addresses. The quickstart documentation stresses one thing about this file: keep museum.yaml safe. Without the credentials inside it, Ente cannot access the data stored in the volumes. Copy this file to a backup location away from the VPS — separate from the server — before uploading photos that matter.
Step 3: create your first account and fetch the verification code
Open the Photos web app at http://YOUR-VPS-IP:3000. Choose Don't have an account? and fill in the signup form. The first user created is treated as an admin by default — that is stated on Ente's official post-install page.
Signup asks for a verification code. The code is not sent by email — no SMTP is configured in this setup — it appears in the cluster logs. From the /opt/my-ente folder, run:
sudo docker compose logs
Expected result: among the museum log lines, there is a verification code for the email address you registered. Enter that code on the signup page, then save the recovery key shown afterwards in your password manager. This recovery key matters: with end-to-end encryption, Ente cannot recover an account that has lost both its password and its recovery key.
Once signed in, upload one photo through the web interface. Expected result: the photo appears in the gallery and its thumbnail is generated. This upload proves the most important path works: your browser uploads directly to MinIO object storage using a URL handed out by museum. If uploads from the browser on the server machine work but uploads from your phone fail, the cause is almost always the endpoint — covered in step 5 and Troubleshooting.
Step 4: whitelist yourself as an admin in the database
The first account is already an admin by default, but this whitelisting step is still written in Ente's post-install page and worth doing so your admin status is recorded explicitly in the configuration. First, find your user ID in the database. Enter the PostgreSQL container:
cd /opt/my-ente
docker exec -it my-ente-postgres-1 sh
psql -U pguser -d ente_db
The container name may differ on your VPS — check with docker compose ps and replace my-ente-postgres-1 with the name shown there. At the psql prompt, run:
SELECT user_id, email FROM users;
Note the user_id for your email, then leave with \q and exit. Now add that ID to museum.yaml:
sudo nano museum.yaml
Add the following section, replacing <user_id> with the ID you just noted:
internal:
admins:
- <user_id>
For a single admin, the same documentation allows a shorter form: internal: followed by admin: <user_id>. Save, then recreate the cluster so museum reads the new configuration:
docker compose down && docker compose up -d
Expected result: all containers come back up, and you can still sign in with the same account. Running docker compose down without the --volumes flag does not delete data — the volumes stay. Never add --volumes here unless you genuinely intend to wipe the whole installation including your photos.
Step 5: take Ente to your own domain
The quickstart setup uses localhost addresses in several places, and that only fits when you open Ente from the same machine. Ente's post-install documentation explains the problem clearly: museum embeds the bucket endpoint value into the URLs it hands to clients for uploading. The quickstart fills in endpoint: localhost:3200, which is only reachable from inside the server. From another phone or laptop, uploads fail silently — the museum log records OBJECT_SIZE_FETCH_FAILED — because localhost:3200 on your device points at that device itself, not at the VPS.
So for use outside your local network, a domain and a reverse proxy are a required step, not decoration. Prepare two subdomains: photos.example.com for the Photos app and api.example.com for museum. Then change three things:
1. ENTE_API_ORIGIN in compose.yaml. Open that file and change the environment line on the web service:
environment:
ENTE_API_ORIGIN: https://api.example.com
This tells the web app where to talk to museum.
2. The endpoint in museum.yaml. Change endpoint: localhost:3200 on each bucket to an address reachable by both clients and museum — in this setup, the MinIO address exposed through your VPS domain or IP. If you choose to expose MinIO through its own subdomain, for example https://s3.example.com, put that value here. Ente's documentation also warns about CORS: a browser treats different ports on the same IP as different origins, and uploads can be blocked if the object storage CORS settings do not allow your app's origin. Using a domain for every component avoids most of these problems.
3. The apps section in museum.yaml. Point the app addresses at your domains:
apps:
public-albums: https://albums.example.com
accounts: https://accounts.example.com
Note that the quickstart only exposes Photos on port 3000 and Albums on 3002 by default. The other apps — Accounts on 3001, Auth on 3003, and so on — have their port lines commented out in compose.yaml. Uncomment the ports you need before pointing apps.* at their URLs, as Ente's post-install page reminds you.
After all the changes, recreate the cluster:
cd /opt/my-ente
docker compose down && docker compose up -d
Then create Nginx blocks for both subdomains. An example for Photos, in /etc/nginx/sites-available/photos:
server {
listen 80;
server_name photos.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Create the same block for api.example.com with proxy_pass http://127.0.0.1:8080;. Enable them and issue certificates:
sudo ln -s /etc/nginx/sites-available/photos /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo certbot --nginx -d photos.example.com -d api.example.com
Expected result: nginx -t answers test is successful, and Certbot issues certificates for both domains. After that, open https://photos.example.com, sign in, and upload one photo from a device other than the VPS — from your phone over mobile data, for example. If that photo appears in the gallery, the upload path through the domain is correct.
Step 6: connect the mobile and desktop apps
Download Ente Photos from your phone's app store. By default the app points at Ente's hosted service — to use your own server, tap the onboarding screen seven times until the developer settings appear, then fill in your server endpoint. The same applies to the desktop app: tap the onboarding screen seven times to set the endpoint. This seven-tap procedure is written on Ente's post-install page.
One thing that is easy to miss: the account on your self-hosted server is a separate account, even if it uses the same email address as your hosted Ente account. Its password and recovery key are different, and signing up on your own server does not move or link your hosted account. Keep a separate password-manager entry labelled with the server address, so the two never get mixed up.
For importing old photos, Ente provides migration guides from Google Takeout and other services in their self-hosting documentation. A large import is best done in stages over a stable connection — an interrupted upload can be repeated, but repeating thousands of photos at once wastes time. And one warning from the quickstart documentation worth repeating: keep a copy of your photos elsewhere until you are confident about this installation's backup strategy. Self-hosted Ente has no built-in button that moves your whole collection off the VPS.
Troubleshooting
The quickstart script stops saying Docker Compose must be 2.30+.
Update Docker Compose to the requested version, then run the script again. Do not edit the script to skip this check — the version floor exists because the generated compose.yaml uses newer Compose features.
The script refuses because the my-ente folder already exists.
That is the script's own protection: run cd my-ente && docker compose up from the existing folder, or delete that folder and start again if you are sure its contents are not needed. Do not overwrite a my-ente folder holding an active museum.yaml — the credentials inside it cannot be recreated.
Museum fails with pq: password authentication failed.
Most likely you recreated the my-ente folder while the old volumes (my-ente_postgres-data and my-ente_minio-data) still existed, so the new credentials in museum.yaml do not match the old database. The quickstart documentation names this case explicitly. Choose one: restore the old museum.yaml, or remove the old volumes with docker compose down --volumes from the my-ente folder — the second option deletes all Ente data, so be sure that is what you want.
Photos will not upload from your phone, but upload fine from the browser on the VPS.
This is the classic symptom of the endpoint problem explained in step 5: endpoint: localhost:3200 in museum.yaml cannot be reached from your phone. Change the endpoint to an address reachable by clients and museum, check the object storage CORS settings as well, then recreate the cluster. Check the museum logs while trying an upload — OBJECT_SIZE_FETCH_FAILED points at the same problem.
The verification code cannot be found.
The code appears in the cluster logs when the signup is created. Run sudo docker compose logs from the /opt/my-ente folder and look for the line mentioning the code for your email. If the logs have scrolled too far, repeat the signup and watch the freshly appearing logs.
Port 3000, 8080, or 3200 is already used by another app.
Check with sudo ss -tlnp | grep 3000 and the other ports. Change the port mapping in the script-generated compose.yaml — for example "3001:3000" — then update the proxy_pass in Nginx and ENTE_API_ORIGIN if the API port changed. After changing compose.yaml or museum.yaml, always recreate the cluster with docker compose down && docker compose up -d.
Summary table
| Component | Function | Port | Notes |
|---|---|---|---|
| museum | Ente API server | 8080 | Image ghcr.io/ente/server |
| web | Photos + Albums web apps | 3000, 3002 | Image ghcr.io/ente/web; ENTE_API_ORIGIN points at museum |
| postgres | User and photo-index database | not exposed | Image postgres:15, database ente_db |
| minio | S3-compatible object storage | 3200 | Image pgsty/silo; local buckets in museum.yaml |
| socat | Forwards localhost:3200 to MinIO |
— | Image alpine/socat |
museum.yaml |
Server configuration + credentials | /opt/my-ente/museum.yaml |
Must be backed up away from the VPS |
| Nginx on host | Reverse proxy + HTTPS | 80 / 443 | One block per subdomain |
Check before you finish
-
docker compose psin/opt/my-enteshows all five services running or healthy. - The first account was created through
http://YOUR-VPS-IP:3000orhttps://photos.example.com, and the verification code from the logs worked. - The recovery key is saved in a password manager.
- One photo uploaded successfully and appears in the gallery.
- The admin is whitelisted through
internal.adminsinmuseum.yamland the cluster was recreated. - Uploads from a phone through the domain work — not only from the browser on the VPS.
-
museum.yamlis copied to a backup outside the VPS.
Ente on a VPS is more than a spare gallery — it is a gallery whose keys you hold yourself, running code anyone can read. Which photos will you move to this server first — the family archive, or the work photos that have been piling up in your phone gallery? Tell us in the comments, and if any step above does not work on your VPS, paste the error message so it can be discussed together.
Baca juga: the Rnevio guide how to install Zipline for storing and sharing files from your own VPS covers another self-hosted file storage tool that complements this gallery, while the companion guide in this batch is available in the Baïkal guide for self-hosted calendars and contacts.


Diskusi
Ada pertanyaan atau pengalaman yang ingin dibagikan?
Komentar ditinjau sebelum ditampilkan. Mari berdiskusi dengan sopan dan sesuai topik.
Tulis komentar