### Install and Run MinIO Source: https://github.com/ente/ente/blob/main/server/RUNNING.md Install MinIO and the MinIO client, then start the local S3-compatible service. ```sh brew install minio minio-mc brew services run minio ``` -------------------------------- ### Install and Run Postgres Source: https://github.com/ente/ente/blob/main/server/RUNNING.md Install Postgres version 15 and start the service. ```sh brew install postgresql@15 ``` ```sh brew services run postgresql@15 ``` -------------------------------- ### Run Local Documentation Preview Source: https://github.com/ente/ente/blob/main/docs/README.md Clone the Ente repository, navigate to the docs directory, install dependencies, and start the development server to run a local preview of the documentation. ```sh git clone https://github.com/ente/ente cd ente/docs npm ci npm run dev ``` -------------------------------- ### Run web application Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Install dependencies and start the web development server with the endpoint configured. ```sh cd web npm ci NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 npm run dev ``` -------------------------------- ### Manual Polkit Policy Setup Script Source: https://github.com/ente/ente/blob/main/docs/docs/auth/troubleshooting/linux-system-auth.md This script downloads the Polkit policy from GitHub, verifies its SHA-256 checksum, and installs it to the appropriate system path based on whether the system is immutable. It then attempts to verify the installation by running pkaction. ```shell policy_url="https://raw.githubusercontent.com/ente/ente/main/mobile/apps/auth/assets/polkit/com.ente.auth.policy" policy_sha256="efba0409db9a0a53196fa8a7c9f4d4e874234b48287eb5242cf399f466e4c695" policy=$(mktemp) if curl -fsSL "$policy_url" -o "$policy" && printf "%s %s\n" "$policy_sha256" "$policy" | sha256sum -c -; then # Use /etc on immutable distros (read-only /usr), /usr/share on traditional ones if findmnt -n -o OPTIONS --target /usr/share/polkit-1/actions 2>/dev/null | grep -qw ro; then install_path="/etc/polkit-1/actions/com.ente.auth.policy" else install_path="/usr/share/polkit-1/actions/com.ente.auth.policy" fi sudo install -D -o root -g root -m 0644 "$policy" "$install_path" if command -v restorecon >/dev/null 2>&1; then sudo restorecon -v "$install_path" || true fi # Give polkit time to pick up the new action via inotify sleep 1 pkaction --action-id com.ente.auth.unlock --verbose else echo "Policy download or checksum verification failed. Not installing." fi rm -f "$policy" ``` -------------------------------- ### Install and run dependencies via Homebrew Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Install PostgreSQL and MinIO on macOS using Homebrew and start the services. ```sh brew install postgresql@15 minio minio-mc brew services run postgresql@15 brew services run minio ``` -------------------------------- ### Install Caddy on Debian/Ubuntu Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/administration/reverse-proxy.md Installs the Caddy web server using the apt package manager. Ensure the service is started and enabled to run on boot. ```shell sudo apt install caddy ``` ```shell sudo systemctl start caddy sudo systemctl enable caddy ``` -------------------------------- ### Install Go Source: https://github.com/ente/ente/blob/main/server/RUNNING.md Install the Go programming language using Homebrew. ```sh brew install go ``` -------------------------------- ### Installation Directory Configuration Source: https://github.com/ente/ente/blob/main/mobile/apps/auth/windows/CMakeLists.txt Sets up the installation paths for the application bundle and its dependencies. ```cmake set(BUILD_BUNDLE_DIR "$") set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") ``` -------------------------------- ### Load, enable, and start service Source: https://github.com/ente/ente/blob/main/infra/services/README.md Reload systemd configuration, enable the service to start on boot, and start it immediately. ```sh sudo systemctl daemon-reload sudo systemctl enable --now example ``` -------------------------------- ### Enable and Start PostgreSQL Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/manual.md Configures PostgreSQL to start automatically on system boot and starts the service. ```shell sudo systemctl enable postgresql sudo systemctl start postgresql ``` -------------------------------- ### Installation Rules Source: https://github.com/ente/ente/blob/main/mobile/apps/auth/linux/CMakeLists.txt Defines installation paths and rules for the application bundle and its dependencies. ```cmake include(flutter/generated_plugins.cmake) set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() install(CODE " file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") " COMPONENT Runtime) set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endforeach(bundled_library) set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) # Replace the asset directory so removed assets do not survive a build. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### Install desktop dependencies Source: https://github.com/ente/ente/blob/main/desktop/README.md Navigate to the desktop directory and install dependencies using npm. ```sh cd ../desktop npm ci ``` -------------------------------- ### Install web dependencies Source: https://github.com/ente/ente/blob/main/desktop/README.md Navigate to the web directory and install dependencies using npm. ```sh cd web npm ci ``` -------------------------------- ### Install Node and Go via Homebrew Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Use Homebrew to install the Node and Go toolchains. ```sh brew install node go ``` -------------------------------- ### Install Android Commandline Tools Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Install Android SDK components and accept licenses. ```sh brew install --cask android-commandlinetools sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0" flutter doctor --android-licenses ``` -------------------------------- ### Clone Ente Repository Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/manual.md Clone the Ente repository from GitHub to your local machine to get started with the installation. ```sh git clone https://github.com/ente/ente ``` -------------------------------- ### Download and run quickstart.sh manually Source: https://github.com/ente/ente/blob/main/server/docs/quickstart.md Downloads the script, grants execution permissions, and runs it locally. ```sh curl -o quickstart.sh https://raw.githubusercontent.com/ente/ente/main/server/quickstart.sh chmod +x quickstart.sh ./quickstart.sh ``` -------------------------------- ### Install Server Dependencies and Build Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/manual.md Navigate to the server directory, install Go dependencies using `go mod tidy`, and then build the server binary. ```sh # Change into server directory, where the source code for Museum is # present inside the repo cd ente/server # Install the needed dependencies go mod tidy ``` ```sh go build cmd/museum/main.go ``` -------------------------------- ### Run quickstart.sh via curl Source: https://github.com/ente/ente/blob/main/server/docs/quickstart.md Executes the quickstart script directly from the remote repository to set up Ente. ```sh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente/ente/main/server/quickstart.sh)" ``` -------------------------------- ### Populate configuration files Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/compose.md Copy the example configuration files to create local versions for modification. ```sh # Inside the cloned repository's directory (usually `ente`) cd server/config cp example.env .env cp example.yaml museum.yaml ``` -------------------------------- ### Generate Encryption Keys Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/config.md Use this command to generate encryption keys if you are not using the quickstart script for long-term installations. ```sh # If you have not cloned already git clone https://github.com/ente/ente # Generate the values cd ente/server go run tools/gen-random-keys/main.go ``` -------------------------------- ### Run Ente Quickstart Script Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/quickstart.md Execute this command in your terminal to automatically set up Ente. It creates a directory, prompts for container startup, and makes Ente accessible locally. ```sh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ente/ente/main/server/quickstart.sh)" ``` -------------------------------- ### Configure Service Manager for Non-Windows Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/guides/windows.md For non-Windows operating systems, use the appropriate service manager (e.g., systemd) with this command to start Ente. Adjust the path to your Ente installation. ```bash cd /path/to/ente && docker stack deploy -c docker-compose.yaml ente ``` -------------------------------- ### Create configuration files Source: https://github.com/ente/ente/blob/main/infra/copycat-db/README.md Initialize the environment, Scaleway, and rclone configuration files. ```sh sudo tee /root/copycat-db.env sudo tee /root/var/config/scw/copycat-db-config.yaml sudo tee /root/var/config/rclone/copycat-db-rclone.conf ``` -------------------------------- ### Run Ente Deployment Script with PowerShell Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/guides/windows.md Use this command to configure Windows Task Scheduler to automatically start Ente on login. Ensure the script path is correct for your installation. ```powershell -WindowStyle Hidden -ExecutionPolicy Bypass -File "D:\ente\ente_deploy.ps1" ``` -------------------------------- ### Install Go Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/installation/manual.md Installs Go using apt. Alternatively, download binaries from the official website. ```shell sudo apt update && sudo apt upgrade sudo apt install golang-go ``` -------------------------------- ### Initialize database and storage bucket Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Create the PostgreSQL user and database, and configure the MinIO bucket. ```sh psql postgres -c "CREATE USER pguser WITH PASSWORD 'pgpass'" psql postgres -c "CREATE DATABASE ente_db OWNER pguser" mc alias set local http://127.0.0.1:9000 minioadmin minioadmin mc mb local/b2-eu-cen ``` -------------------------------- ### Run Docker Compose for Ente Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/guides/tailscale.md Starts the Ente services using Docker Compose. Ensure Tailscale is installed and configured on the host machine before accessing Ente via its Tailscale domain. ```bash docker compose up -d ``` -------------------------------- ### Create a static build Source: https://github.com/ente/ente/blob/main/desktop/README.md Prepare and build the application for the current platform. ```sh npm run postinstall npm run build ``` -------------------------------- ### NAS Sync Setup with Daily Export Source: https://github.com/ente/ente/blob/main/docs/docs/photos/features/utilities/cli.md Example configuration for daily NAS synchronization using Ente CLI. This involves updating the account's export directory and scheduling the export command. ```sh /usr/local/bin/ente account update --app photos --email you@example.com --dir /nas/ente-backup 0 2 * * * /usr/local/bin/ente export ``` -------------------------------- ### Install Rust via rustup Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Install the Rust toolchain using the standard rustup installer script. ```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Start the museum server Source: https://github.com/ente/ente/blob/main/docs/docs/self-hosting/development/building-from-source.md Navigate to the server directory and run the Go application. ```sh cd server go run cmd/museum/main.go ``` -------------------------------- ### Enable and Start Prometheus Service Source: https://github.com/ente/ente/blob/main/infra/services/prometheus/README.md Reloads systemd to recognize the new service, enables it to start on boot, and starts the Prometheus service immediately. ```sh sudo systemctl daemon-reload sudo systemctl enable --now prometheus ``` -------------------------------- ### Create configuration and log directories Source: https://github.com/ente/ente/blob/main/infra/copycat-db/README.md Prepare the necessary directory structure for service configuration and logs. ```sh sudo mkdir -p /root/var/config/scw sudo mkdir -p /root/var/config/rclone sudo mkdir -p /root/var/logs ``` -------------------------------- ### Native Assets and Flutter Assets Installation Source: https://github.com/ente/ente/blob/main/mobile/apps/auth/windows/CMakeLists.txt Installs native assets and manages the Flutter asset directory by removing old assets before installing new ones. ```cmake set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) # Replace the asset directory so removed assets do not survive a build. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Build and run on the simulator Source: https://github.com/ente/ente/blob/main/apple/apps/ensu/README.md Commands to open the simulator, build the project, install the app, and launch it. ```sh open -a Simulator cd apple/apps/ensu xcodebuild -scheme Ensu -destination 'platform=iOS Simulator,name=iPhone 17' xcrun simctl install booted \ ~/Library/Developer/Xcode/DerivedData/Ensu-*/Build/Products/Debug-iphonesimulator/Ensu.app xcrun simctl launch booted io.ente.ensu ``` -------------------------------- ### Install dependencies Source: https://github.com/ente/ente/blob/main/infra/staff/README.md Install the project dependencies using npm. ```sh npm ci ```