Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Tighten quickstart documentation

Manav Rathi6f7c2895c5f2
diff --git a/server/docs/quickstart.md b/server/docs/quickstart.md
index f21d6a1758..da5e2102c9 100644
--- a/server/docs/quickstart.md
+++ b/server/docs/quickstart.md
@@ -1,8 +1,8 @@
# quickstart.sh
-The quickstart.sh script creates a Docker compose file that does not require cloning the repository, and uses pre-built images instead. It is meant to provide an easy way for people to get started with self hosting Ente without needing to build museum or the web app from source.
+`quickstart.sh` is the easiest way to try self-hosting Ente. It creates a ready-to-run Docker Compose setup from pre-built images, so you do not need to clone the repository or build anything yourself.
-The easiest way to run the script is to copy paste the following command into your terminal:
+Copy and paste this command into a terminal:
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente/ente/main/server/quickstart.sh)"
@@ -10,7 +10,7 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente/ente/main/server/quic
> [!TIP]
>
-> If you don't want to run via curl, you can alternatively download [quickstart.sh](https://github.com/ente/ente/blob/main/server/quickstart.sh), make it executable and run the script.
+> You can also download [quickstart.sh](https://github.com/ente/ente/blob/main/server/quickstart.sh) first, make it executable, and then run it:
>
> ```sh
> curl -o quickstart.sh https://raw.githubusercontent.com/ente/ente/main/server/quickstart.sh
@@ -18,35 +18,35 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente/ente/main/server/quic
> ./quickstart.sh
> ```
-After the Docker compose cluster starts, you can open Ente web app at http://localhost:3000. Public album links are served from http://localhost:3002.
+After the services start, open Ente Photos at http://localhost:3000. Public album links are served from http://localhost:3002.
> [!TIP]
>
-> The verification code when you try to create an account can be seen in the logs (See [self hosting docs](https://ente.com/help/self-hosting/faq/otp#verification-code) for more ways to get it)
+> Account verification codes appear in the logs. See the [self-hosting documentation](https://ente.com/help/self-hosting/faq/otp#verification-code) for other ways to retrieve them.
## Details
The only requirement the script has is for a recent-ish version of Docker.
-The script first creates a directory named `my-ente` and changes to it.
+The script creates a `my-ente` directory in the current folder and keeps the setup files there.
> [!TIP]
>
> "Ente" (pronounced _en-tay_) means "mine" in Malayalam, our Founder's mother tongue (the product literally thus means "My Photos"), so our quickstart directory name `my-ente` means "my-my".
-Then it creates a Docker compose file (`compose.yaml`) from a template, and a `museum.yaml` with fresh autogenerated credentials.
+Inside `my-ente`, it creates `compose.yaml` and `museum.yaml` with fresh autogenerated credentials.
-Finally, it starts the Docker compose cluster running the following services on 4 open ports:
+It then starts the following services. Four ports are exposed:
| Service | Port | Notes |
| -------- | ------- | ---------------------- |
| museum | `:8080` | Ente's API server |
| web | `:3000` | Ente Photos web app |
| web | `:3002` | Ente public albums app |
-| postgres | | DB |
-| minio | `:3200` | S3 |
+| postgres | | Database |
+| minio | `:3200` | Object storage |
-For each of these, it'll use the latest published Docker image.
+Docker downloads the required images automatically the first time.
You can do a quick smoke test by pinging the API:
@@ -54,25 +54,23 @@ You can do a quick smoke test by pinging the API:
curl localhost:8080/ping
```
-Or directly start using the web app by opening http://localhost:3000 in your browser.
+During the first run, the terminal continues showing logs. Press `Ctrl-C` to stop the services.
-The first time around, the cluster will keep running as long as the `quickstart.sh` script is running (you can stop it by using `Ctrl-C`).
-
-Subsequently, whenever you want to start the cluster, you can go back to the same directory and run `docker compose up` again.
+To start Ente again later, return to the same directory:
```sh
-cd /path/to/my-ente # Where you ran the quickstart script originally
+cd /path/to/my-ente
docker compose up
```
-If you want to keep it running in the background, you can pass the `-d` flag to the `docker compose up` command:
+To keep the services running after closing the terminal:
```sh
cd /path/to/my-ente
docker compose up -d
```
-And then later, to stop the cluster, you can:
+To stop the services after starting them in the background:
```sh
cd /path/to/my-ente
@@ -83,7 +81,7 @@ Apart from this `my-ente` directory, the script does not install anything else o
> [!IMPORTANT]
>
-> The `museum.yaml` contains your (unique) autogenerated museum, DB and S3 credentials, without which the data on your volumes will not be accessible.
+> Keep `museum.yaml` safe. It contains the unique credentials for your instance; without them, Ente cannot access the data stored in the volumes.
> [!CAUTION]
>
@@ -94,7 +92,7 @@ Apart from this `my-ente` directory, the script does not install anything else o
> docker compose down --volumes
> ```
>
-> **Be careful** when doing so, making sure you run the command in the correct directory as the volumes will be permanently removed, including any photos you added to your self hosted instance.
+> **Be careful** to run this command in the correct directory. It permanently removes the volumes, including photos added to your self-hosted instance.
> [!TIP]
>
@@ -102,7 +100,7 @@ Apart from this `my-ente` directory, the script does not install anything else o
### Caveat
-This sample setup is only intended to make it easy for people to get started. If you're intending to use your self hosted instance for serious purposes, we strongly recommend understanding all the moving parts, and consider if you should use an external S3 (/ DB) instead of the quickstart samples.
+This sample setup is only intended to make it easy for people to get started. If you're intending to use your self hosted instance for serious purposes, we strongly recommend understanding all the moving parts, and consider if you should use an external object storage (S3) and database instead of the quickstart samples.
> [!IMPORTANT]
>
diff --git a/server/quickstart.sh b/server/quickstart.sh
index 77f7548cf1..09bbbc5890 100755
--- a/server/quickstart.sh
+++ b/server/quickstart.sh
@@ -53,7 +53,6 @@ gen_key () { head -c 32 /dev/urandom | base64 | tr -d '\n'; }
# crypto_generichash_BYTES_MAX = 64
gen_hash () { head -c 64 /dev/urandom | base64 | tr -d '\n'; }
-# Like gen_key but sodium_base64_VARIANT_URLSAFE which converts + to -, / to _
gen_jwt_secret () { head -c 32 /dev/urandom | base64 | tr -d '\n' | tr '+/' '-_'; }
pg_pass=`gen_password`
@@ -95,7 +94,6 @@ services:
web:
image: ghcr.io/ente/web
- # Uncomment what you need to tweak.
ports:
- 3000:3000 # Photos web app
# - 3001:3001 # Accounts
@@ -107,7 +105,7 @@ services:
# - 3008:3008 # Paste
# - 3009:3009 # Locker
# - 3010:3010 # Memories
- # Modify these values to your custom subdomains, if using any
+ # Set this to your custom museum URL, if any.
environment:
ENTE_API_ORIGIN: http://localhost:8080
@@ -128,7 +126,7 @@ services:
image: minio/minio
ports:
- 3200:3200 # MinIO API
- # Uncomment to enable MinIO Web UI
+ # Uncomment to enable the MinIO web UI.
# - 3201:3201
environment:
MINIO_ROOT_USER: $minio_user
@@ -139,8 +137,6 @@ services:
post_start:
- command: |
sh -c '
- #!/bin/sh
-
while ! mc alias set h0 http://minio:3200 $minio_user $minio_pass 2>/dev/null
do
echo "Waiting for minio..."
@@ -171,13 +167,13 @@ db:
password: $pg_pass
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
+ # These defaults apply to all buckets and can be overridden per bucket.
+ # Set this to false for external buckets or buckets using 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.
+ # Set this to false for subdomain-style URLs. Keep it true for MinIO with SSL.
use_path_style_urls: true
b2-eu-cen:
- # Uncomment the below configuration to override the top-level configuration
+ # Uncomment to override the defaults for this bucket.
# are_local_buckets: true
# use_path_style_urls: true
key: $minio_user
@@ -230,13 +226,13 @@ read -r choice
if test "$choice" = y || test "$choice" = Y
then
printf "\nStarting docker compose\n"
- printf "\nAfter the cluster has started, open web app at \033[1mhttp://localhost:3000\033[0m\n"
- printf "(Verification code will be in the logs here)\n\n"
+ printf "\nAfter the services start, open web app at \033[1mhttp://localhost:3000\033[0m\n"
+ printf "Account verification codes will appear in these logs.\n\n"
docker compose up
else
- printf "\nTo start the cluster:\n"
+ printf "\nTo start the services:\n"
printf " \033[1;32m$\033[0m cd my-ente\n"
printf " \033[1;32m$\033[0m docker compose up\n"
- printf "\nAfter the cluster has started, open web app at \033[1mhttp://localhost:3000\033[0m\n"
- printf "(Verification code will be in the logs here)\n\n"
+ printf "\nAfter the services start, open web app at \033[1mhttp://localhost:3000\033[0m\n"
+ printf "Account verification codes will appear in the logs.\n\n"
fi
diff --git a/server/tools/gen-random-keys/README.md b/server/tools/gen-random-keys/README.md
index df4440379b..9b2c265c5a 100644
--- a/server/tools/gen-random-keys/README.md
+++ b/server/tools/gen-random-keys/README.md
@@ -1,8 +1,6 @@
-Generate random keys that can be used in the museum configuration file.
+# Generate museum keys
-## Details
-
-This tool can be used to generate new random values for various cryptographic secrets that should be overridden in `configuration/local.yaml` when running a new instance of museum.
+Generate random values for the cryptographic secrets required by a new museum instance:
```sh
go run tools/gen-random-keys/main.go