ente/server/docs/quickstart.md
2025-03-21 20:26:04 +05:30

144 lines
4.7 KiB
Markdown

# 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.
The easiest way to run the script is to copy paste the following command into
your terminal:
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente-io/ente/main/server/quickstart.sh)"
```
> [!TIP]
>
> If you don't want to run via curl, you can alternatively download
> [quickstart.sh](https://github.com/ente-io/ente/blob/main/server/quickstart.sh),
> `chmod +x` it and then run it with `./quickstart.sh`.
After the Docker compose cluster starts, you can open the Ente web app at
http://localhost:3000.
> [!TIP]
>
> The verification code when you try to create an account can be seen in the
> logs (See [self hosting
> docs](https://help.ente.io/self-hosting/faq/otp#verification-code) for more
> ways to get it)
## 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.
> [!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.
Finally, it start the Docker compose cluster running the following services on 3
open ports:
| Service | Port | Notes |
| ----------- | -------- | ----------------------- |
| museum | `:8080` | Ente's API server |
| web | `:3000` | Ente Photos web app |
| postgres | | DB |
| minio | `:3200` | S3 |
For each of these, it'll use the latest published Docker image.
You can do a quick smoke test by pinging the API:
```sh
curl localhost:8080/ping
```
Or directly start using the web app by opening http://localhost:3000 in your
browser.
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.
```sh
cd /path/to/my-ente # Where you ran the quickstart script originally
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:
```sh
cd /path/to/my-ente
docker compose up -d
```
And then later, to stop the cluster, you can:
```sh
cd /path/to/my-ente
docker compose down
```
Apart from this `my-ente` directory, the script does not install anything else
on your system. Settings and credentials are saved in `my-ente`, while other
persistent data is saved in volumes managed by Docker.
> [!IMPORTANT]
>
> The `museum.yaml` contains your (unique) autogenerated museum, DB and S3
> credentials, without which the data on your volumes will not be accessible.
> [!CAUTION]
>
> If you delete the `my-ente` folder, the volumes will still persist. So if you
> want to recreate everything from scratch, you can clear these volumes by
>
> ```sh
> cd /path/to/my-ente
> 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.
> [!TIP]
>
> If you're getting errors like `pq: password authentication failed` when
> starting museum, one possibility is that you're recreating the `my-ente`
> folder but still have leftover volumes (`my-ente_postgres-data` and
> `my-ente_minio-data` from a previous attempt).
### 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.
> [!IMPORTANT]
>
> Keep a plaintext backup of your photos until you are sure of what you are
> doing and have a [backup
> strategy](https://help.ente.io/self-hosting/faq/backup) worked out.
## Next steps
See **[help.ente.io/self-hosting](https://help.ente.io/self-hosting)** for
guides on connecting to your self hosted instance [using your mobile
app](https://help.ente.io/self-hosting/guides/custom-server/), modifying your
setup to allow
[uploading](https://help.ente.io/self-hosting/guides/configuring-s3) from your
mobile app, and other customizations.