π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[docs] complete installation procedures
Keerthana637f11ac23c0
diff --git a/docs/docs/.vitepress/sidebar.ts b/docs/docs/.vitepress/sidebar.tsindex 7ca16798cf..d1b8c37e3f 100644--- a/docs/docs/.vitepress/sidebar.ts+++ b/docs/docs/.vitepress/sidebar.ts@@ -260,62 +260,54 @@ export const sidebar = [},{text: "Docker Compose",- link: "/self-hosting/install/from-source",+ link: "/self-hosting/install/compose",},{text: "Without Docker",- link: "/self-hosting/install/standalone-ente",+ link: "/self-hosting/install/without-docker",},{- text: "Configuration",- link: "/self-hosting/install/config",+ text: "Configuration Variables",+ link: "/self-hosting/install/configuration-variables",},{text: "Post Installation",- link: "/self-hosting/install/post-install",- },- {- text: "Connecting to Custom Server",- link: "/self-hosting/install/custom-server/",- },+ link: "/self-hosting/install/post-install/",+ }],},{text: "Administration",collapsed: true,items: [- {- text: "Creating accounts",- link: "/self-hosting/administration/creating-accounts",- },{text: "Configuring your server",link: "/self-hosting/administration/museum",},{text: "Configuring S3",- link: "/self-hosting/guides/configuring-s3",+ link: "/self-hosting/administration/configuring-s3",},{text: "Reverse proxy",link: "/self-hosting/administration/reverse-proxy",},+ {+ text: "Configuring CLI for your instance",+ link: "/self-hosting/guides/selfhost-cli",+ },+],},{- text: "Guides",+ text: "Developer",collapsed: true,items: [- { text: "Introduction", link: "/self-hosting/guides/" },{- text: "Administering your server",- link: "/self-hosting/guides/admin",- },- {- text: "Configuring CLI for your instance",- link: "/self-hosting/guides/selfhost-cli",- },- ],+ text: "Building mobile apps",+ link: "/self-hosting/developer/mobile-build"+ }+ ]},{text: "Troubleshooting",@@ -337,10 +329,6 @@ export const sidebar = [text: "Docker / quickstart",link: "/self-hosting/troubleshooting/docker",},- {- text: "Ente CLI secrets",- link: "/self-hosting/troubleshooting/keyring",- },],},{@@ -359,23 +347,8 @@ export const sidebar = [},{text: "FAQ",- collapsed: true,- items: [- { text: "General", link: "/self-hosting/faq/" },- {- text: "Verification code",- link: "/self-hosting/faq/otp",- },- {- text: "Shared albums",- link: "/self-hosting/faq/sharing",- },- {- text: "Backups",- link: "/self-hosting/faq/backup",- },- ],- },+ link: "/self-hosting/faq/",+ }],},];diff --git a/docs/docs/self-hosting/faq/backup.md b/docs/docs/self-hosting/administration/backup.mdsimilarity index 100%rename from docs/docs/self-hosting/faq/backup.mdrename to docs/docs/self-hosting/administration/backup.mddiff --git a/docs/docs/self-hosting/guides/configuring-s3.md b/docs/docs/self-hosting/administration/configuring-s3.mdsimilarity index 63%rename from docs/docs/self-hosting/guides/configuring-s3.mdrename to docs/docs/self-hosting/administration/configuring-s3.mdindex 744760ed7e..0ac0657228 100644--- a/docs/docs/self-hosting/guides/configuring-s3.md+++ b/docs/docs/self-hosting/administration/configuring-s3.md@@ -17,21 +17,13 @@ description:> For more information, check this> [discussion](https://github.com/ente-io/ente/discussions/3167#discussioncomment-10585970).-If you're wondering why there are 3 buckets on the MinIO UI - that's because our-production instance uses these to perform+If you're wondering why there are 3 buckets on the MinIO UI - that's because our production instance uses these to perform[replication](https://ente.io/reliability/).-If you're also wondering about why the bucket names are specifically what they-are, it's because that is exactly what we are using on our production instance.-We use `b2-eu-cen` as hot, `wasabi-eu-central-2-v3` as cold (also the secondary-hot) and `scw-eu-fr-v3` as glacier storage. As of now, all of this is hardcoded.-Hence, the same hardcoded configuration is applied when you self host Ente.-In a self hosted Ente instance replication is turned off by default. Whenreplication is turned off, only the first bucket (`b2-eu-cen`) is used, and theother two are ignored. Only the names here are specifically fixed, but in the-configuration body you can put any other keys. It does not have any relation-with `b2`, `wasabi` or even `scaleway`.+configuration body you can put any other keys.Use the `s3.hot_storage.primary` option if you'd like to set one of the otherpredefined buckets as the primary bucket.@@ -53,20 +45,4 @@ need to enable `s3.use_path_style_urls`.Set the S3 bucket `endpoint` in `credentials.yaml` to a `yourserverip:3200` orsome such IP / hostname that is accessible from both where you are running theEnte clients (e.g. the mobile app) and also from within the Docker compose-cluster.--### Example--An example `museum.yaml` when you're trying to connect to museum running on your-computer from your phone on the same WiFi network:--```yaml-s3:- are_local_buckets: true- b2-eu-cen:- key: test- secret: testtest- endpoint: http://<YOUR-WIFI-IP>:3200- region: eu-central-2- bucket: b2-eu-cen-```+cluster.\ No newline at end of filediff --git a/docs/docs/self-hosting/administration/creating-accounts.md b/docs/docs/self-hosting/administration/creating-accounts.mddeleted file mode 100644index 2cdfd7e8ba..0000000000--- a/docs/docs/self-hosting/administration/creating-accounts.md+++ /dev/null@@ -1,27 +0,0 @@-----title: Creating Accounts - Self-hosting-description: Creating accounts on your deployment------# Creating accounts--Once Ente is up and running, the Ente Photos web app will be accessible on-`http://localhost:3000`. Open this URL in your browser and proceed with creating-an account.--The default API endpoint for museum will be `localhost:8080`.----To complete your account registration you will need to enter a 6-digit-verification code.--This code can be found in the server logs, which should already be shown in your-quickstart terminal. Alternatively, you can open the server logs with the-following command from inside the `my-ente` folder:--```sh-sudo docker compose logs-```--diff --git a/docs/docs/self-hosting/guides/selfhost-cli.md b/docs/docs/self-hosting/administration/selfhost-cli.mdsimilarity index 100%rename from docs/docs/self-hosting/guides/selfhost-cli.mdrename to docs/docs/self-hosting/administration/selfhost-cli.mddiff --git a/docs/docs/self-hosting/guides/mobile-build.md b/docs/docs/self-hosting/developer/mobile-build.mdsimilarity index 100%rename from docs/docs/self-hosting/guides/mobile-build.mdrename to docs/docs/self-hosting/developer/mobile-build.mddiff --git a/docs/docs/self-hosting/faq/otp.md b/docs/docs/self-hosting/faq/otp.mddeleted file mode 100644index 0a85b60717..0000000000--- a/docs/docs/self-hosting/faq/otp.md+++ /dev/null@@ -1,45 +0,0 @@-----title: Verification code-description: Getting the OTP for a self hosted Ente------# Verification code--The self-hosted Ente by default does not send out emails, so you can pick the-verification code by:--- Getting it from the server logs, or--- Reading it from the DB (otts table)--The easiest option when getting started is to look for it in the server (museum)-logs. If you're already running the docker compose cluster using the quickstart-script, you should be already seeing the logs in your terminal. Otherwise you-can go to the folder (e.g. `my-ente`) where your `compose.yaml` is, then run-`docker compose logs museum --follow`. Once you can see the logs, look for a-line like:--```-... Skipping sending email to [email protected]: *Verification code: 112089*-```--That is the verification code.--> [!TIP]->-> You can also configure your instance to send out emails so that you can get-> your verification code via emails by using the `smtp` section in the config.--You can also set pre-defined hardcoded OTTs for certain users when running-locally by creating a `museum.yaml` and adding the `internal.hardcoded-ott`-configuration setting to it. See-[local.yaml](https://github.com/ente-io/ente/blob/main/server/configurations/local.yaml)-in the server source code for details about how to define this.--> [!NOTE]->-> If you're not able to get the OTP with the above methods, make sure that you-> are actually connecting to your self hosted instance and not to Ente's-> production servers. e.g. you can use the network requests tab in the browser-> console to verify that the API requests are going to your server instead of-> `api.ente.io`.diff --git a/docs/docs/self-hosting/faq/sharing.md b/docs/docs/self-hosting/faq/sharing.mddeleted file mode 100644index 2eb5578448..0000000000--- a/docs/docs/self-hosting/faq/sharing.md+++ /dev/null@@ -1,104 +0,0 @@-----title: Album sharing-description: Getting album sharing to work using an self-hosted Ente------# Is public sharing available for self-hosted instances?--Yes.--You'll need to run two instances of the web app, one is regular web app, but-another one is the same code but running on a different origin (i.e. on a-different hostname or different port).--Then, you need to tell the regular web app to use your second instance to-service public links. You can do this by setting the-`NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT` to point to your second instance when running-or building the regular web app.--For more details, see-[.env](https://github.com/ente-io/ente/blob/main/web/apps/photos/.env) and-[.env.development](https://github.com/ente-io/ente/blob/main/web/apps/photos/.env.development).--As a concrete example, assuming we have a Ente server running on-`localhost:8080`, we can start two instances of the web app, passing them-`NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT` that points to the origin-("scheme://host[:port]") of the second "albums" instance.--The first one, the normal web app--```sh-NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 \- NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3002 \- yarn dev:photos-```--The second one, the same code but acting as the "albums" app (the only-difference is the port it is running on):--```sh-NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 \- NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3002 \- yarn dev:albums-```--If you also want to change the prefix (the origin) in the generated public-links, to use your custom albums endpoint in the generated public link instead-of albums.ente.io, set `apps.public-albums` property in museum's configuration--For example, when running using the starter docker compose file, you can do this-by creating a `museum.yaml` and defining the following configuration there:--```yaml-apps:- public-albums: http://localhost:3002-```--(For more details, see-[local.yaml](https://github.com/ente-io/ente/blob/main/server/configurations/local.yaml)-in the server's source code).--## Dockerfile example--Here is an example of a Dockerfile by @Dylanger on our community Discord. This-runs a standalone self-hosted version of the public albums app in production-mode.--```Dockerfile-FROM node:20-alpine as builder--WORKDIR /app-COPY . .--ARG NEXT_PUBLIC_ENTE_ENDPOINT=https://your.ente.example.org-ARG NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=https://your.albums.example.org--RUN yarn install && yarn build--FROM node:20-alpine--WORKDIR /app-COPY --from=builder /app/apps/photos/out .--RUN npm install -g serve--ENV PORT=3000-EXPOSE ${PORT}--CMD serve -s . -l tcp://0.0.0.0:${PORT}-```--Note that this only runs the public albums app, but the same principle can be-used to run both the normal Ente photos app and the public albums app. There is-a slightly more involved example showing how to do this also provided by in a-community contributed guide about-[configuring external S3](/self-hosting/guides/external-s3).--You will also want to tell museum about your custom shared albums endpoint so-that it uses that instead of the default URL when creating share links. You can-configure that in museum's `config.yaml`:--```-apps:- public-albums: https://your.albums.example.org-```diff --git a/docs/docs/self-hosting/guides/db-migration.md b/docs/docs/self-hosting/guides/db-migration.mddeleted file mode 100644index 60818caa2d..0000000000--- a/docs/docs/self-hosting/guides/db-migration.md+++ /dev/null@@ -1,158 +0,0 @@-----title: DB Migration-description:- Migrating your self hosted Postgres 12 database to newer Postgres versions------# Migrating Postgres 12 to 15--The old sample docker compose file used Postgres 12, which is now nearing end of-life, so we've updated it to Postgres 15. Postgres major versions changes-require a migration step. This document mentions some approaches you can use.--> [!TIP]->-> Ente itself does not use any specific Postgres 12 or Postgres 15 features, and-> will talk to either happily. It should also work with newer Postgres versions,-> but let us know if you run into any problems and we'll update this page.--### Taking a backup--`docker compose exec` allows us to run a command against a running container. We-can use it to run the `pg_dumpall` command on the postgres container to create a-plaintext backup.--Assuming your cluster is already running, and you are in the `ente/server`-directory, you can run the following (this command uses the default credentials,-you'll need to change these to match your setup):--```sh-docker compose exec postgres env PGPASSWORD=pgpass PGUSER=pguser PG_DB=ente_db pg_dumpall >pg12.backup.sql-```--This will produce a `pg12.backup.sql` in your current directory. You can open it-in a text editor (it can be huge!) to verify that it looks correct.--We won't be needing this file, this backup is recommended just in case something-goes amiss with the actual migration.--> If you need to restore from this plaintext backup, you could subsequently run-> something like:->-> ```sh-> docker compose up postgres-> cat pg12.backup.sql | docker compose exec -T postgres env PGPASSWORD=pgpass psql -U pguser -d ente_db-> ```--## The migration--At the high level, the steps are--1. Stop your cluster.--2. Start just the postgres container after changing the image to- `pgautoupgrade/pgautoupgrade:15-bookworm`.--3. Once the in-place migration completes, stop the container, and change the- image to `postgres:15`.--#### 1. Stop the cluster--Stop your running Ente cluster.--```sh-docker compose down-```--#### 2. Run `pgautoupgrade`--Modify your `compose.yaml`, changing the image for the "postgres" container from-"postgres:12" to "pgautoupgrade/pgautoupgrade:15-bookworm"--```diff-diff a/server/compose.yaml b/server/compose.yaml-- postgres:-- image: postgres:12-+ image: pgautoupgrade/pgautoupgrade:15-bookworm- ports:-```--[pgautoupgrade](https://github.com/pgautoupgrade/docker-pgautoupgrade) is a-community docker image that performs an in-place migration.--After making the change, run only the `postgres` container in the cluster--```sh-docker compose up postgres-```--The container will start and peform an in-place migration. Once it is done, it-will start postgres normally. You should see something like this is the logs--```-postgres-1 | Automatic upgrade process finished with no errors reported-...-postgres-1 | ... starting PostgreSQL 15...-```--At this point, you can stop the container (`CTRL-C`).--#### 3. Finish by changing image--Modify `compose.yaml` again, changing the image to "postgres:15".--```diff-diff a/server/compose.yaml b/server/compose.yaml-- postgres:-- image: pgautoupgrade/pgautoupgrade:15-bookworm-+ image: postgres:15- ports:-```--And cleanup the temporary containers by--```sh-docker compose down --remove-orphans-```--Migration is now complete. You can start your Ente cluster normally.--```sh-docker compose up-```--## Migration elsewhere--The above instructions are for Postgres running inside docker, as the sample-docker compose file does. There are myriad other ways to run Postgres, and the-migration sequence then will depend on your exact setup.--Two common approaches are--1. Backup and restore, the `pg_dumpall` + `psql` import sequence described in- [Taking a backup](#taking-a-backup) above.--2. In place migrations using `pg_upgrade`, which is what the- [pgautoupgrade](#the-migration) migration above does under the hood.--The first method, backup and restore, is low tech and will work similarly in-most setups. The second method is more efficient, but requires a bit more-careful preparation.--As another example, here is how one can migrate 12 to 15 when running Postgres-on macOS, installed using Homebrew.--1. Stop your postgres. Make sure there are no more commands shown by- `ps aux | grep '[p]ostgres'`.--2. Install postgres15.--3. Migrate data using `pg_upgrade`:-- ```sh- /opt/homebrew/Cellar/postgresql@15/15.8/bin/pg_upgrade -b /opt/homebrew/Cellar/postgresql@12/12.18_1/bin -B /opt/homebrew/Cellar/postgresql@15/15.8/bin/ -d /opt/homebrew/var/postgresql@12 -D /opt/homebrew/var/postgresql@15- ```--4. Start postgres 15 and verify version using `SELECT VERSION()`.diff --git a/docs/docs/self-hosting/guides/external-s3.md b/docs/docs/self-hosting/guides/external-s3.mddeleted file mode 100644index 0a919092c0..0000000000--- a/docs/docs/self-hosting/guides/external-s3.md+++ /dev/null@@ -1,261 +0,0 @@-----title: External S3 buckets-description:- Self hosting Ente's server and photos web app when using an external S3- bucket------# Hosting server and web app using external S3--> [!NOTE]->-> This is a community contributed guide, and some of these steps ~~might be~~-> ARE out of sync with the upstream changes. This document is retained for-> reference purposes, but if something is not working correctly, please see the-> latest [READMEs](https://github.com/ente-io/ente/blob/main/server/README.md)-> in the repository and/or other guides in [self-hosting](/self-hosting/).--This guide is for self hosting the server and the web application of Ente Photos-using docker compose and an external S3 bucket. So we assume that you already-have the keys and secrets for the S3 bucket. The plan is as follows:--1. Create a `compose.yaml` file-2. Set up the `.credentials.env` file-3. Run `docker-compose up`-4. Create an account and increase storage quota-5. Fix potential CORS issue with your bucket--## 1. Create a `compose.yaml` file--After cloning the main repository with--```bash-git clone https://github.com/ente-io/ente.git-# Or git clone [email protected]:ente-io/ente.git-cd ente-```--Create a `compose.yaml` file at the root of the project with the following-content (there is nothing to change here):--```yaml-services:- museum:- build:- context: server- args:- GIT_COMMIT: local- ports:- - 8080:8080 # API- - 2112:2112 # Prometheus metrics- depends_on:- postgres:- condition: service_healthy-- # Wait for museum to ping pong before starting the webapp.- healthcheck:- test: [- "CMD",- "echo",- "1", # I don't know what to put here- ]- environment:- # no need to touch these- ENTE_DB_HOST: postgres- ENTE_DB_PORT: 5432- ENTE_DB_NAME: ente_db- ENTE_DB_USER: pguser- ENTE_DB_PASSWORD: pgpass- env_file:- - ./.credentials.env- volumes:- - custom-logs:/var/logs- - museum.yaml:/museum.yaml:ro- networks:- - internal-- web:- build:- context: web- ports:- - 8081:80- - 8082:80- depends_on:- museum:- condition: service_healthy- env_file:- - ./.credentials.env-- postgres:- image: postgres:12- ports:- - 5432:5432- environment:- POSTGRES_USER: pguser- POSTGRES_PASSWORD: pgpass- POSTGRES_DB: ente_db- # Wait for postgres to be accept connections before starting museum.- healthcheck:- test: ["CMD", "pg_isready", "-q", "-d", "ente_db", "-U", "pguser"]- interval: 1s- timeout: 5s- retries: 20- volumes:- - postgres-data:/var/lib/postgresql/data- networks:- - internal-volumes:- custom-logs:- postgres-data:-networks:- internal:-```--It maybe be added in the future, but if it does not exist, create a `Dockerfile`-in the `web` directory with the following content:--```Dockerfile-# syntax=docker/dockerfile:1-FROM node:21-bookworm-slim as ente-builder-WORKDIR /app-RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/apt/lists/*-COPY . .-RUN yarn install-ENV NEXT_PUBLIC_ENTE_ENDPOINT=DOCKER_RUNTIME_REPLACE_ENDPOINT-ENV NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=DOCKER_RUNTIME_REPLACE_ALBUMS_ENDPOINT-RUN yarn build---FROM nginx:1.25-alpine-slim-COPY --from=ente-builder /app/apps/photos/out /usr/share/nginx/html-COPY <<EOF /etc/nginx/conf.d/default.conf-server {- listen 80 default_server;- root /usr/share/nginx/html;- location / {- try_files \$uri \$uri.html \$uri/ =404;- }- error_page 404 /404.html;- location = /404.html {- internal;- }-}-EOF-ARG ENDPOINT="http://localhost:8080"-ENV ENDPOINT "$ENDPOINT"-ARG ALBUMS_ENDPOINT="http://localhost:8082"-ENV ALBUMS_ENDPOINT "$ALBUMS_ENDPOINT"-COPY <<EOF /docker-entrypoint.d/replace_ente_endpoints.sh-echo "Replacing endpoints"-echo " Endpoint: \$ENDPOINT"-echo " Albums Endpoint: \$ALBUMS_ENDPOINT"--replace_enpoints() {- sed -i -e 's,DOCKER_RUNTIME_REPLACE_ENDPOINT,'"\$ENDPOINT"',g' \$1- sed -i -e 's,DOCKER_RUNTIME_REPLACE_ALBUMS_ENDPOINT,'"\$ALBUMS_ENDPOINT"',g' \$1-}-for jsfile in `find '/usr/share/nginx/html' -type f -name '*.js'`-do- replace_enpoints "\$jsfile"-done-EOF--RUN chmod +x /docker-entrypoint.d/replace_ente_endpoints.sh-```--This runs nginx inside to handle both the web & album URLs so we don't have to-make two web images with different port.--- `DOCKER_RUNTIME_REPLACE_ENDPOINT` this is your public museum API URL.-- `DOCKER_RUNTIME_REPLACE_ALBUMS_ENDPOINT` this is the shared albums URL (for- more details about configuring shared albums, see- [faq/sharing](/self-hosting/faq/sharing)).--Note how above we had updated the `compose.yaml` file for the server with--```yaml-web:- build:- context: web- ports:- - 8081:80- - 8082:80-```--so that web and album both point to the same container and nginx will handle it.--## 2. Set up the `.credentials.env` file--Create a `.credentials.env` file at the root of the project with the following-content (here you need to set the correct value of each variable):--<!-- The following code block should have language env, but vitepress currently-doesn't support that language, so use sh as a reasonable fallback instead. -->--```sh-# run `go run tools/gen-random-keys/main.go` in the server directory to generate the keys-ENTE_KEY_ENCRYPTION=-ENTE_KEY_HASH=-ENTE_JWT_SECRET=--# if you deploy it on a server under a domain, you need to set the correct value of the following variables-# it can be changed later--# The backend server URL (Museum) to be used by the webapp-ENDPOINT=http://localhost:8080-# The URL of the public albums webapp (also need to be updated in museum.yml so the correct links are generated)-ALBUMS_ENDPOINT=http://localhost:8082-```--Create the `museum.yaml` with additional configuration, this will be mounted-(read-only) into the container:--```yaml-s3:- are_local_buckets: false- # For some self-hosted S3 deployments you (e.g. Minio) you might need to disable bucket subdomains- use_path_style_urls: true- # The key must be named like so- b2-eu-cen:- key: $YOUR_S3_KEY- secret: $YOUR_S3_SECRET- endpoint: $YOUR_S3_ENDPOINT- region: $YOUR_S3_REGION- bucket: $YOUR_S3_BUCKET_NAME-# The same value as the one specified in ALBUMS_ENDPOINT-apps:- public-albums: http://localhost:8082-```--## 3. Run `docker-compose up`--Run `docker-compose up` at the root of the project (add `-d` to run it in the-background).--## 4. Create an account and increase storage quota--Open `http://localhost:8080` or whatever Endpoint you mentioned for the web app-and create an account. If your SMTP related configurations are all set and-right, you will receive an email with your OTT in it. There are two work arounds-to retrieve the OTP, checkout-[this document](https://help.ente.io/self-hosting/faq/otp) for getting your-OTT's..--If you successfully log in, select any plan and increase the storage quota with-the following command:--```bash-docker compose exec -i postgres psql -U pguser -d ente_db -c "INSERT INTO storage_bonus (bonus_id, user_id, storage, type, valid_till) VALUES ('self-hosted-myself', (SELECT user_id FROM users), 1099511627776, 'ADD_ON_SUPPORT', 0)"-```--After few reloads, you should see 1 To of quota.--## Related--Some other users have also shared their setups.--- [Using Traefik](https://github.com/ente-io/ente/pull/3663)--- [Building custom images from source (Linux)](https://github.com/ente-io/ente/discussions/3778)--- [Troubleshooting Bucket CORS](/self-hosting/troubleshooting/bucket-cors)diff --git a/docs/docs/self-hosting/index.md b/docs/docs/self-hosting/index.mdindex 4ea0156d60..4c170fe150 100644--- a/docs/docs/self-hosting/index.md+++ b/docs/docs/self-hosting/index.md@@ -5,9 +5,11 @@ description: Getting started with self-hosting Ente# Get Started-The entire source code for Ente is open source,-[including the server](https://ente.io/blog/open-sourcing-our-server/). This is-the same code we use for our own cloud service.+If you're looking to spin up Ente on your server for preserving those+sweet memories, you are in the right place!++Our entire source code ([including the server](https://ente.io/blog/open-sourcing-our-server/))+is open source. This is the same code we use on production.For a quick preview of Ente on your server, make sure your system meets therequirements mentioned below. After trying the preview, you can explore other@@ -30,11 +32,14 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente-io/ente/main/server/q```The above command creates a directory `my-ente` in the current working-directory, prompts to start the cluster with needed containers after pulling the-images required to run Ente.+directory, prompts to start the cluster with needed containers after pulling the images required to run Ente.+> [!NOTE]+> Make sure to modify the default values in `compose.yaml` and `museum.yaml`+> if you wish to change endpoints, bucket configuration or server configuration.+## Try the web appThe first user to be registered will be treated as the admin user.diff --git a/docs/docs/self-hosting/install/compose.md b/docs/docs/self-hosting/install/compose.mdnew file mode 100644index 0000000000..4ac1cd724b--- /dev/null+++ b/docs/docs/self-hosting/install/compose.md@@ -0,0 +1,46 @@+---+title: Docker Compose+description: Running Ente with Docker Compose from source+---++# Docker Compose++If you wish to run Ente via Docker Compose from source, do the following:++## Step 1: Clone the repository++Clone the repository to a prefered directory. Change into the `server/config` directory inside the cloned repository, where the compose file for running the cluster is present.++Run the following command for the same:++``` sh+git clone https://github.com/ente-io/ente+cd ente/server/config+```++## Step 2: Populate the configuration file and environment variables++In order to run the cluster, you will have to provide environment variable values.++Copy the configuration files for modification by the following command inside `server/config` directory of the repository.++This allows you to modify configuration without having to face hassle while pulling in latest changes.++``` shell+# Inside the cloned repository's directory (usually `ente`)+cd server/config+cp example.env .env+cp example.yaml museum.yaml+```++Change the values present in `.env` file along with `museum.yaml` file accordingly.++## Step 3: Start the cluster++Now you can start the cluster by running the following command:++```sh+docker compose up --build+```++This builds Museum and web applications based on the Dockerfile and starts the containers needed for Ente.diff --git a/docs/docs/self-hosting/install/config-file.md b/docs/docs/self-hosting/install/config-file.mdnew file mode 100644index 0000000000..975b25772c--- /dev/null+++ b/docs/docs/self-hosting/install/config-file.md@@ -0,0 +1,14 @@+---+title: "Configuration File - Self-hosting"+description:+ "Information about all the configuration variables needed to run Ente with+ museum.yaml"+---+++# Configuration File++Ente's server, Museum, uses YAML-based configuration file that is used for handling database+connectivity, bucket configuration, admin user whitelisting, etc.++Self-hosted clusters generally use `museum.yaml` file for reading configuration specifications.diff --git a/docs/docs/self-hosting/install/config.md b/docs/docs/self-hosting/install/configuration-variables.mdsimilarity index 51%rename from docs/docs/self-hosting/install/config.mdrename to docs/docs/self-hosting/install/configuration-variables.mdindex 99a20525ea..b79a53f6d7 100644--- a/docs/docs/self-hosting/install/config.md+++ b/docs/docs/self-hosting/install/configuration-variables.md@@ -1,11 +1,11 @@----title: "Configuration - Self-hosting"+title: "Environment Variables and Defaults - Self-hosting"description:"Information about all the configuration variables needed to run Ente alongwith description on default configuration"----# Configuration+# Environment Variables and DefaultsThe environment variables needed for running Ente, configuration variablespresent in Museum's configuration file and the default configuration are@@ -17,24 +17,28 @@ A self-hosted Ente instance requires specific endpoints in both Museum (theserver) and web apps. This document outlines the essential environment variablesand port mappings of the web apps.-Here's the list of environment variables that need to be configured:+Here's the list of environment variables that is used by the cluster:-| Service | Environment Variable | Description | Default Value |-| ------- | -------------------- | ------------------------------------------------ | --------------------- |-| Web | `ENTE_API_ORIGIN` | API Endpoint for Ente's API (Museum) | http://localhost:8080 |-| Web | `ENTE_ALBUMS_ORIGIN` | Base URL for Ente Album, used for public sharing | http://localhost:3002 |--## Config File--Ente's server, Museum, uses a configuration file+| Service | Environment Variable | Description | Default Value |+| ---------- | --------------------- | ------------------------------------------------ | --------------------------------- |+| `web` | `ENTE_API_ORIGIN` | API Endpoint for Ente's API (Museum) | http://localhost:8080 |+| `web` | `ENTE_ALBUMS_ORIGIN` | Base URL for Ente Album, used for public sharing | http://localhost:3002 |+| `postgres` | `POSTGRES_USER` | Username for PostgreSQL database | pguser |+| `postgres` | `POSTGRES_DB` | Name of database for use with Ente | ente_db |+| `postgres` | `POSTGRES_PASSWORD` | Password for PostgreSQL database's user | Randomly generated for quickstart |+| `minio` | `MINIO_ROOT_USER` | Username for MinIO | Randomly generated for quickstart |+| `minio` | `MINIO_ROOT_PASSWORD` | Password for MinIO | Randomly generated for quickstart |## Default Configuration+Self-hosted Ente clusters have certain default configuration for ease of use,+which is documented below to understand its behavior:+### PortsThe below format is according to how ports are mapped in Docker when usingquickstart script. The mapping is of the format `- <host-port>:<container-port>`-in `ports`.+in `ports` in compose file.| Service | Type | Host Port | Container Port || ---------------------------------- | -------- | --------- | -------------- |diff --git a/docs/docs/self-hosting/install/post-install.md b/docs/docs/self-hosting/install/defaults.mdsimilarity index 100%rename from docs/docs/self-hosting/install/post-install.mdrename to docs/docs/self-hosting/install/defaults.mddiff --git a/docs/docs/self-hosting/install/from-source.md b/docs/docs/self-hosting/install/from-source.mddeleted file mode 100644index b3f1ebc5d2..0000000000--- a/docs/docs/self-hosting/install/from-source.md+++ /dev/null@@ -1,183 +0,0 @@-----title: Ente from Source-description: Getting started self hosting Ente Photos and/or Ente Auth------# Ente from Source--## Installing Docker--Refer to-[How to install Docker from the APT repository](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)-for detailed instructions.--## Start the server--```sh-git clone https://github.com/ente-io/ente-cd ente/server-docker compose up --build-```--> [!TIP]->-> You can also use a pre-built Docker image from `ghcr.io/ente-io/server`-> ([More info](https://github.com/ente-io/ente/blob/main/server/docs/docker.md))--Install the necessary dependencies for running the web client--```sh-# installing npm and yarn--sudo apt update-sudo apt install nodejs npm-sudo npm install -g yarn // to install yarn globally-```--Then in a separate terminal, you can run (e.g) the web client--```sh-cd ente/web-git submodule update --init --recursive-yarn install-NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 yarn dev-```--That's about it. If you open http://localhost:3000, you will be able to create-an account on a Ente Photos web app running on your machine, and this web app-will be connecting to the server running on your local machine at-`localhost:8080`.--For the mobile apps, you don't even need to build, and can install normal Ente-apps and configure them to use your-[custom self-hosted server](/self-hosting/guides/custom-server/).--> If you want to build the mobile apps from source, see the instructions-> [here](/self-hosting/guides/mobile-build).--## Web app with Docker and Compose--The instructoins in previous section were just a temporary way to run the web-app locally. To run the web apps as services, the user has to build a docker-image manually.--> [!IMPORTANT]->-> Recurring changes might be made by the team or from community if more-> improvements can be made so that we are able to build a full-fledged docker-> image.--```dockerfile-FROM node:20-bookworm-slim as builder--WORKDIR ./ente--COPY . .-COPY apps/ .--# Will help default to yarn versoin 1.22.22-RUN corepack enable--# Endpoint for Ente Server-ENV NEXT_PUBLIC_ENTE_ENDPOINT=https://your-ente-endpoint.com-ENV NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=https://your-albums-endpoint.com--RUN yarn cache clean-RUN yarn install --network-timeout 1000000000-RUN yarn build:photos && yarn build:accounts && yarn build:auth && yarn build:cast--FROM node:20-bookworm-slim--WORKDIR /app--COPY --from=builder /ente/apps/photos/out /app/photos-COPY --from=builder /ente/apps/accounts/out /app/accounts-COPY --from=builder /ente/apps/auth/out /app/auth-COPY --from=builder /ente/apps/cast/out /app/cast--RUN npm install -g serve--ENV PHOTOS=3000-EXPOSE ${PHOTOS}--ENV ACCOUNTS=3001-EXPOSE ${ACCOUNTS}--ENV AUTH=3002-EXPOSE ${AUTH}--ENV CAST=3003-EXPOSE ${CAST}--# The albums app does not have navigable pages on it, but the-# port will be exposed in-order to self up the albums endpoint-# `apps.public-albums` in museum.yaml configuration file.-ENV ALBUMS=3004-EXPOSE ${ALBUMS}--CMD ["sh", "-c", "serve /app/photos -l tcp://0.0.0.0:${PHOTOS} & serve /app/accounts -l tcp://0.0.0.0:${ACCOUNTS} & serve /app/auth -l tcp://0.0.0.0:${AUTH} & serve /app/cast -l tcp://0.0.0.0:${CAST}"]-```--The above is a multi-stage Dockerfile which creates a production ready static-output of the 4 apps (Photos, Accounts, Auth and Cast) and serves the static-content with Caddy.--Looking at 2 different node base-images doing different tasks in the same-Dockerfile would not make sense, but the Dockerfile is divided into two just to-improve the build efficiency as building this Dockerfile will arguably take more-time.--Lets build a Docker image from the above Dockerfile. Copy and paste the above-Dockerfile contents in the root of your web directory which is inside-`ente/web`. Execute the below command to create an image from this Dockerfile.--```sh-# Build the image-docker build -t <image-name>:<tag> --no-cache --progress plain .-```--You can always edit the Dockerfile and remove the steps for apps which you do-not intend to install on your system (like auth or cast) and opt out of those.--Regarding Albums App, take a note that they are not apps with navigable pages,-if accessed on the web-browser they will simply redirect to ente.web.io.--## compose.yaml--Moving ahead, we need to paste the below contents into the compose.yaml inside-`ente/server/compose.yaml` under the services section.--```yaml-ente-web:- image: <image-name> # name of the image you used while building- ports:- - 3000:3000- - 3001:3001- - 3002:3002- - 3003:3003- - 3004:3004- environment:- - NODE_ENV=development- restart: always-```--Now, we're good to go. All we are left to do now is start the containers.--```sh-docker compose up -d # --build--# Accessing the logs-docker compose logs <container-name>-```--## Configure App Endpoints--> [!NOTE] Previously, this was dependent on the env variables-> `NEXT_ENTE_PUBLIC_ACCOUNTS_ENDPOINT` and etc. Please check the below-> documentation to update your setup configurations--You can configure the web endpoints for the other apps including Accounts,-Albums Family and Cast in your `museum.yaml` configuration file. Checkout-[`local.yaml`](https://github.com/ente-io/ente/blob/543411254b2bb55bd00a0e515dcafa12d12d3b35/server/configurations/local.yaml#L76-L89)-to configure the endpoints. Make sure to setup up your DNS Records accordingly-to the similar URL's you set up in `museum.yaml`.diff --git a/docs/docs/self-hosting/install/custom-server/custom-server.png b/docs/docs/self-hosting/install/post-install/custom-server.pngsimilarity index 100%rename from docs/docs/self-hosting/install/custom-server/custom-server.pngrename to docs/docs/self-hosting/install/post-install/custom-server.pngdiff --git a/docs/docs/self-hosting/install/custom-server/index.md b/docs/docs/self-hosting/install/post-install/index.mdsimilarity index 54%rename from docs/docs/self-hosting/install/custom-server/index.mdrename to docs/docs/self-hosting/install/post-install/index.mdindex 63ba371eb8..a3d1d4f703 100644--- a/docs/docs/self-hosting/install/custom-server/index.md+++ b/docs/docs/self-hosting/install/post-install/index.md@@ -1,16 +1,39 @@----title: Custom server-description: Using a custom self-hosted server with Ente client apps and CLI+title: Post-installation steps - Self-hosting+description: Steps to be followed post-installation for smooth experience----# Connecting to a custom server+# Post-installation Steps++A list of steps that should be done after installing Ente are described below:++## Step 1: Creating first user++The first user to be created will be treated as an admin user.++Once Ente is up and running, the Ente Photos web app will be accessible on+`http://localhost:3000`. Open this URL in your browser and proceed with creating+an account.++To complete your account registration you will need to enter a 6-digit+verification code.++This code can be found in the server logs, which should already be shown in your+quickstart terminal. Alternatively, you can open the server logs with the+following command from inside the `my-ente` folder:++```sh+sudo docker compose logs+```++++## Step 2: Configure apps to use your serverYou can modify various Ente client apps and CLI to connect to a self hostedcustom server endpoint.-[[toc]]--## Mobile+### MobileThe pre-built Ente apps from GitHub / App Store / Play Store / F-Droid can beeasily configured to use a custom server.@@ -20,7 +43,7 @@ configure the endpoint the app should be connecting to.-## Desktop and web+### Desktop and webSame as the mobile app, you can tap 7 times on the onboarding screen toconfigure the endpoint the app should connect to.@@ -47,21 +70,7 @@ Note that the custom server configured this way is cleared when you reset thestate during logout. In particular, the app also does a reset when you press thechange email button during the login flow.-### Building from source--Alternatively (e.g. if you don't wish to configure this setting and just want to-change the endpoint the client connects to by default), you can build the app-from source and use the `NEXT_PUBLIC_ENTE_ENDPOINT` environment variable to tell-it which server to connect to. For example:--```sh-NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 yarn dev:photos-```--For more details, see-[hosting the web app](https://help.ente.io/self-hosting/guides/web-app).--## CLI+## Step 3: Configure Ente CLI> [!NOTE]>@@ -78,38 +87,4 @@ endpoint:```(Another-[example](https://github.com/ente-io/ente/blob/main/cli/config.yaml.example))--## Find the hostname of your server--If you want to access your museum within your own network, you can use the-`hostname` command to find a addressable local network hostname or IP for your-computer, and then use it by suffixing it with the port number.--First, run--```sh-hostname-```--The result will look something like this--```sh-my-computer.local-```--You will need to replace the server endpoint with an address that uses your-server's hostname and the port number. Here's an example:--```-http://my-computer.local:8080-```--Note that this will only work within your network. To access it from outside the-network, you need to use the public IP or hostname.--> [!TIP]->-> If you're having trouble uploading from your mobile app, it is likely that-> museum is not able to connect to your S3 storage. See the-> [Configuring S3](/self-hosting/guides/configuring-s3) guide for more details.+[example](https://github.com/ente-io/ente/blob/main/cli/config.yaml.example))\ No newline at end of filediff --git a/docs/docs/self-hosting/install/custom-server/web-custom-endpoint-indicator.png b/docs/docs/self-hosting/install/post-install/web-custom-endpoint-indicator.pngsimilarity index 100%rename from docs/docs/self-hosting/install/custom-server/web-custom-endpoint-indicator.pngrename to docs/docs/self-hosting/install/post-install/web-custom-endpoint-indicator.pngdiff --git a/docs/docs/self-hosting/install/custom-server/web-dev-settings.png b/docs/docs/self-hosting/install/post-install/web-dev-settings.pngsimilarity index 100%rename from docs/docs/self-hosting/install/custom-server/web-dev-settings.pngrename to docs/docs/self-hosting/install/post-install/web-dev-settings.pngdiff --git a/docs/docs/self-hosting/install/quickstart.md b/docs/docs/self-hosting/install/quickstart.mdindex e7311f5cc7..cff6e3c932 100644--- a/docs/docs/self-hosting/install/quickstart.md+++ b/docs/docs/self-hosting/install/quickstart.md@@ -6,7 +6,7 @@ description: Self-hosting Ente with quickstart script# QuickstartWe provide a quickstart script which can be used for self-hosting Ente on your-machine.+machine in less than 5 minutes.## Requirements@@ -21,10 +21,10 @@ Run this command on your terminal to setup Ente.sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente-io/ente/main/server/quickstart.sh)"```-The above `curl` command pulls the Docker image, creates a directory `my-ente`-in the current working directory, prompts to start the cluster and starts all-the containers required to run Ente.+The above `curl` command does the following:+1. Creates a directory `./my-ente` in working directory.+2. Starts the containers required to run Ente upon prompting.-+You should be able to access the web application at [`http://localhost:3000`](http://localhost:3000) or [`http://<machine-ip>:3000`](http://<machine-ip>:3000)-+The data pertaining to be used by Museum is stored in `./data` folder inside `my-ente` directory, which contains extra configuration files that is to be used (billing configuration, push notification credentials, etc.)\ No newline at end of filediff --git a/docs/docs/self-hosting/install/standalone-ente.md b/docs/docs/self-hosting/install/standalone-ente.mddeleted file mode 100644index adaf444594..0000000000--- a/docs/docs/self-hosting/install/standalone-ente.md+++ /dev/null@@ -1,120 +0,0 @@-----title: Running Ente Without Docker - Self-hosting-description: Installing and setting up Ente without Docker------# Running Ente without Docker--## Running Museum (Ente's server) without Docker--First, start by installing all the dependencies to get your machine ready for-development.--- For macOS- ```sh- brew tap homebrew/core- brew update- brew install go- ```-- For Debian/Ubuntu-based distros- ```sh- sudo apt update && sudo apt upgrade- sudo apt install golang-go- ```--Alternatively, you can also download the latest binaries from-['All Release'](https://go.dev/dl/) page from the official website.--- For macOS- ```sh- brew install postgres@15- # Link the postgres keg- brew link postgresql@15- brew install libsodium- ```-- For Debian/Ubuntu-based distros- ```sh- sudo apt install postgresql- sudo apt install libsodium23 libsodium-dev- ```--The package `libsodium23` might be installed already in some cases.--Install `pkg-config`--- For macOS- ```sh- brew install pkg-config- ```-- For Debian/Ubuntu-based distros- ```sh- sudo apt install pkg-config- ```--## Starting Postgres--### With `pg_ctl`--```sh-pg_ctl -D /usr/local/var/postgres -l logfile start-```--Depending on the operating system type, the path for postgres binary or-configuration file might be different, please check if the command keeps failing-for you.--Ideally, if you are on a Linux system with `systemd` as the initialization-("init") system. You can also start postgres as a systemd service. After-Installation execute the following commands:--```sh-sudo systemctl enable postgresql-sudo systemctl daemon-reload && sudo systemctl start postgresql-```--### Create user--```sh-sudo useradd postgres-```--## Start Museum--Start by cloning ente to your system.--```sh-git clone https://github.com/ente-io/ente-```--```sh-export ENTE_DB_USER=postgres-cd ente/server-go run cmd/museum/main.go-```--You can also add the export line to your shell's RC file, to avoid exporting the-environment variable every time.--For live reloads, install [air](https://github.com/air-verse/air#installation).-Then you can just call air after declaring the required environment variables.-For example,--```sh-ENTE_DB_USER=postgres-air-```--## Museum as a background service--Please check the below links if you want to run Museum as a service, both of-them are battle tested.--1. [How to run museum as a systemd service](https://gist.github.com/mngshm/a0edb097c91d1dc45aeed755af310323)-2. [Museum.service](https://github.com/ente-io/ente/blob/23e678889189157ecc389c258267685934b83631/server/scripts/deploy/museum.service#L4)--Once you are done with setting and running Museum, all you are left to do is run-the web app and reverse_proxy it with a webserver. You can check the following-resources for Deploying your web app.--1. [Hosting the Web App](https://help.ente.io/self-hosting/guides/web-app).-2. [Running Ente Web app as a systemd Service](https://gist.github.com/mngshm/72e32bd483c2129621ed0d74412492fd)diff --git a/docs/docs/self-hosting/install/without-docker.md b/docs/docs/self-hosting/install/without-docker.mdnew file mode 100644index 0000000000..826b39bb31--- /dev/null+++ b/docs/docs/self-hosting/install/without-docker.md@@ -0,0 +1,82 @@+---+title: Running Ente Without Docker - Self-hosting+description: Installing and setting up Ente without Docker+---++# Running Ente without Docker++If you wish to run Ente from source without using Docker, follow the steps described below:++## Pre-requisites++1. **Go:** Install Go on your system. This is needed for building Museum (Ente's server)++ ``` shell+ sudo apt update && sudo apt upgrade+ sudo apt install golang-go+ ```++ Alternatively, you can also download the latest binaries+ from the [official website](https://go.dev/dl/).++2. **PostgreSQL and `libsodium`:** Install PostgreSQL (database) and `libsodium` (high level API for encryption) via package manager.++ ``` shell+ sudo apt install postgresql+ sudo apt install libsodium23 libsodium-dev+ ```++3. **`pkg-config`:** Install `pkg-config` for dependency handling.++ ``` shell+ sudo apt install pkg-config+ ```++Start the database using `systemd` automatically when the system starts.+``` shell+sudo systemctl enable postgresql+sudo systemctl start postgresql+```++Ensure the database is running using++``` shell+sudo systemctl status postgresql+```++### Create user++```sh+sudo useradd postgres+```++## Start Museum++Start by cloning ente to your system.++```sh+git clone https://github.com/ente-io/ente+```++```sh+export ENTE_DB_USER=postgres+cd ente/server+go run cmd/museum/main.go+```++You can also add the export line to your shell's RC file, to avoid exporting the environment variable every time.++## Museum as a background service++Please check the below links if you want to run Museum as a service, both of+them are battle tested.++1. [How to run museum as a systemd service](https://gist.github.com/mngshm/a0edb097c91d1dc45aeed755af310323)+2. [Museum.service](https://github.com/ente-io/ente/blob/23e678889189157ecc389c258267685934b83631/server/scripts/deploy/museum.service#L4)++Once you are done with setting and running Museum, all you are left to do is run+the web app and reverse_proxy it with a webserver. You can check the following+resources for Deploying your web app.++1. [Hosting the Web App](https://help.ente.io/self-hosting/guides/web-app).+2. [Running Ente Web app as a systemd Service](https://gist.github.com/mngshm/72e32bd483c2129621ed0d74412492fd)diff --git a/server/.gitignore b/server/.gitignoreindex e7f5bda723..0a1c4aa635 100644--- a/server/.gitignore+++ b/server/.gitignore@@ -10,3 +10,5 @@ bin/**data/my-ente/__debug_bin*+config/.env+config/museum.yaml\ No newline at end of filediff --git a/server/config/compose.yaml b/server/config/compose.yamlnew file mode 100644index 0000000000..aa2189c545--- /dev/null+++ b/server/config/compose.yaml@@ -0,0 +1,79 @@+services:+ museum:+ build:+ context: ..+ ports:+ - 8080:8080 # Museum/API+ depends_on:+ postgres:+ condition: service_healthy+ env_file:+ - .env+ volumes:+ - ./museum.yaml:/museum.yaml:ro+ - ./data:/data:ro++ # Resolve "localhost:3200" in the museum container to the minio container.+ socat:+ image: alpine/socat+ network_mode: service:museum+ depends_on: [museum]+ command: "TCP-LISTEN:3200,fork,reuseaddr TCP:minio:3200"++ postgres:+ image: postgres:15+ env_file:+ - .env+ # Wait for postgres to accept connections before starting museum.+ healthcheck:+ test: pg_isready -q -d ${POSTGRES_DB} -U ${POSTGRES_USER}+ start_period: 30s+ start_interval: 1s+ volumes:+ - postgres-data:/var/lib/postgresql/data++ minio:+ image: minio/minio+ ports:+ - 3200:3200 # MinIO API+ # - 3201:3201 # MinIO Console (uncomment to access externally)+ env_file:+ - .env+ 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_ROOT_USER} ${MINIO_ROOT_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+ '++ ente-web:+ build:+ context: ../../web+ ports:+ - 3000:3000+ - 3001:3001+ - 3002:3002+ - 3003:3003+ - 3004:3004+ environment:+ - NODE_ENV=development+ env_file:+ - .env++volumes:+ postgres-data:+ minio-data:diff --git a/server/config/example.env b/server/config/example.envnew file mode 100644index 0000000000..f67d1fbefd--- /dev/null+++ b/server/config/example.env@@ -0,0 +1,29 @@+# Copy this file to .env in the same directory in which this file is present+# This file contains the environment variables needed for Ente's cluster to run properly.+# This file is split based on services declared in Docker Compose file+#+# Service: Postgres+# This is used for storing data in database pertaining to collections, files, users, subscriptions, etc.+# These credentials are needed for accessing the database via Museum.+# Please set a strong password for accessing the database.+# Enter these values in museum.yaml file under `db`.+# This need not be defined if using external DB (i. e. no Compose service for PostgreSQL is used)+POSTGRES_USER=pguser+POSTGRES_PASSWORD=<password>+POSTGRES_DB=ente_db++# Service: MinIO+# This is used for MinIO object storage service that's shipped by default with the compose file+# to reduce need for an external S3-compatible bucket for quick testing.+# It is recommended to use an external bucket for long-term usage.+# The credentials required for accessing the object storage is documented below.+# It is not needed to configure these variables if you are using an external bucket+# Enter the user value into key and password in secret for buckets in museum.yaml under `s3` section.+MINIO_ROOT_USER=-+MINIO_ROOT_PASSWORD=<secret>++# Service: Web+# This is used for configuring public albums, API endpoints, etc.+# Replace the below endpoints to the correct subdomains of your choice.+ENTE_API_ORIGIN=http://localhost:8080+ENTE_ALBUMS_ORIGIN=https://localhost:3002diff --git a/server/config/example.yaml b/server/config/example.yamlnew file mode 100644index 0000000000..5e0f94ece1--- /dev/null+++ b/server/config/example.yaml@@ -0,0 +1,30 @@+# Copy this file to museum.yaml in the same directory in which this file is present++db:+ host: postgres+ port: 5432+ name: ente_db+ user: pguser+ password: <password>++s3:+ are_local_buckets: true+ b2-eu-cen:+ key: <key>+ secret: <secret>+ endpoint: localhost:3200+ region: eu-central-2+ bucket: b2-eu-cen+ wasabi-eu-central-2-v3:+ key: <key>+ secret: <secret>+ endpoint: localhost:3200+ region: eu-central-2+ bucket: wasabi-eu-central-2-v3+ compliance: false+ scw-eu-fr-v3:+ key: <key>+ secret: <secret>+ endpoint: localhost:3200+ region: eu-central-2+ bucket: scw-eu-fr-v3\ No newline at end of file