This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:ente [2026/09/21 02:50] – oemb1905 | computing:ente [2026/09/21 03:13] (current) – oemb1905 | ||
|---|---|---|---|
| Line 34: | Line 34: | ||
| * legacy.gnulinux.pics | * legacy.gnulinux.pics | ||
| - | ## 1. Base system | ||
| Setup base system, | Setup base system, | ||
| Line 48: | Line 47: | ||
| </ | </ | ||
| - | ## 2. Go, Rust, Node | + | Now, Go, Rust, and Node setup: |
| < | < | ||
| sudo apt install -y golang-go rustup nodejs npm | sudo apt install -y golang-go rustup nodejs npm | ||
| Line 58: | Line 58: | ||
| </ | </ | ||
| - | Later: `apt upgrade` for Go/Node, `rustup update` for Rust. | + | Setup PostgreSQL |
| - | + | ||
| - | ### 3. PostgreSQL | + | |
| - | + | ||
| - | Create | + | |
| | | ||
| - | ```sql | + | < |
| CREATE USER ente WITH ENCRYPTED PASSWORD ' | CREATE USER ente WITH ENCRYPTED PASSWORD ' | ||
| CREATE DATABASE ente_db OWNER ente; | CREATE DATABASE ente_db OWNER ente; | ||
| GRANT ALL PRIVILEGES ON DATABASE ente_db TO ente; | GRANT ALL PRIVILEGES ON DATABASE ente_db TO ente; | ||
| \q | \q | ||
| - | ``` | + | </ |
| - | Next, lock access: | + | Next, lock access |
| - | ```bash | + | < |
| echo ' | echo ' | ||
| echo ' | echo ' | ||
| sudo systemctl reload postgresql | sudo systemctl reload postgresql | ||
| PGPASSWORD=' | PGPASSWORD=' | ||
| - | ``` | + | </ |
| - | ## 4. Museum binary + yaml config | + | |
| - | Run the go setup bits and migrate the example yaml config to production so we can edit params: | + | |
| - | ```bash | + | Edit museum.yaml and configure it, build its web apps, start it, and create unit: |
| + | |||
| + | < | ||
| cd / | cd / | ||
| go mod tidy | go mod tidy | ||
| Line 88: | Line 84: | ||
| go run tools/ | go run tools/ | ||
| cp config/ | cp config/ | ||
| - | ``` | + | </ |
| - | Edit ''/ | + | Edit ''/ |
| - | ```bash | + | < |
| sudo tee / | sudo tee / | ||
| [Unit] | [Unit] | ||
| Line 111: | Line 107: | ||
| sudo systemctl enable --now ente-museum | sudo systemctl enable --now ente-museum | ||
| curl -sS http:// | curl -sS http:// | ||
| - | ``` | + | </ |
| - | ## 5. Web app building and migrating content from repo | + | |
| - | ```bash | + | Build the Web apps and migrating content from repo |
| + | |||
| + | < | ||
| cd / | cd / | ||
| npm ci | npm ci | ||
| Line 137: | Line 134: | ||
| sudo cp -a apps/ | sudo cp -a apps/ | ||
| sudo chown -R caddy:caddy / | sudo chown -R caddy:caddy / | ||
| - | ``` | + | </ |
| - | ## 6. Caddy reverse proxy, acme certs, | + | Setup Caddy reverse proxy / load balancer, acme certs, |
| - | nano `/ | + | < |
| - | + | ||
| - | Then, | + | |
| - | + | ||
| - | ```caddy | + | |
| { | { | ||
| email admin@gnulinux.pics | email admin@gnulinux.pics | ||
| Line 218: | Line 211: | ||
| reverse_proxy 127.0.0.1: | reverse_proxy 127.0.0.1: | ||
| } | } | ||
| - | ``` | + | </ |
| Verify after making config, then restart service, debug as needed: | Verify after making config, then restart service, debug as needed: | ||
| - | ```bash | + | < |
| sudo caddy validate --config / | sudo caddy validate --config / | ||
| sudo systemctl enable --now caddy | sudo systemctl enable --now caddy | ||
| Line 229: | Line 222: | ||
| curl -sSI https:// | curl -sSI https:// | ||
| curl -sS https:// | curl -sS https:// | ||
| - | ``` | + | </ |
| - | End point works now, go to url in browser | + | End point works now, go to url in browser |
| - | ## 7. First user | + | - Open https:// |
| - | 1. Open https:// | + | |
| - | 2. OTP: `journalctl -u ente-museum -n 200 --no-pager` | + | |
| - | 3. User id: | + | |
| - | ```bash | + | |
| - | You need to locate the id# by searching logs for your email in close proximity. Or, make a one-liner: | + | You need to locate the id# by searching logs for your email in close proximity |
| + | |||
| + | journalctl -u ente-museum --no-pager | grep -F -A 80 ' | ||
| - | journalctl -u ente-museum --no-pager | grep -F -A 80 ' | ||
| - | ``` | ||
| Once that's done, go edit '' | Once that's done, go edit '' | ||
| - | ```yaml | + | < |
| internal: | internal: | ||
| admins: | admins: | ||
| - USER_ID | - USER_ID | ||
| trusted-client-ip-header: | trusted-client-ip-header: | ||
| - | ``` | + | </ |
| Restart service, | Restart service, | ||
| - | ```bash | + | |
| - | sudo systemctl restart ente-museum | + | |
| - | ``` | + | |
| How to edit admin user to give them more storage: | How to edit admin user to give them more storage: | ||
| - | ```bash | + | < |
| PGPASSWORD=' | PGPASSWORD=' | ||
| # 100 250 500 750 → same, change 25 | # 100 250 500 750 → same, change 25 | ||
| # 1TB = 1024 1.5TB = 1536 2TB = 2048 | # 1TB = 1024 1.5TB = 1536 2TB = 2048 | ||
| - | ``` | + | </ |
| ## 8. Garage (needed before uploads work) | ## 8. Garage (needed before uploads work) | ||
| Warning: If you rerun layout/ | Warning: If you rerun layout/ | ||
| - | ```bash | + | < |
| sudo mkdir -p / | sudo mkdir -p / | ||
| curl -fL -o /tmp/garage https:// | curl -fL -o /tmp/garage https:// | ||
| sudo install -m 0755 /tmp/garage / | sudo install -m 0755 /tmp/garage / | ||
| garage --version | garage --version | ||
| + | </ | ||
| - | Create config | + | Create config .toml file and start garage service: |
| + | < | ||
| sudo tee / | sudo tee / | ||
| metadata_dir = "/ | metadata_dir = "/ | ||
| Line 292: | Line 284: | ||
| admin_token = " | admin_token = " | ||
| EOF | EOF | ||
| + | </ | ||
| Create systemd unit for garage to monitor and restart service: | Create systemd unit for garage to monitor and restart service: | ||
| + | < | ||
| sudo tee / | sudo tee / | ||
| [Unit] | [Unit] | ||
| Line 310: | Line 304: | ||
| sudo systemctl enable --now garage | sudo systemctl enable --now garage | ||
| sudo systemctl status garage --no-pager | sudo systemctl status garage --no-pager | ||
| - | ``` | + | </ |
| Create bucket on the same host and name it / give perms for Ente's default s3-compatible endpoint: | Create bucket on the same host and name it / give perms for Ente's default s3-compatible endpoint: | ||
| - | ```bash | + | < |
| garage -c / | garage -c / | ||
| NODE=$(garage -c / | NODE=$(garage -c / | ||
| Line 323: | Line 317: | ||
| garage -c / | garage -c / | ||
| garage -c / | garage -c / | ||
| - | ``` | + | </ |
| - | Once the bucket is built, add the creds it spit out into `/ | + | Once the bucket is built, add the creds it spit out into '' |
| - | ```yaml | + | < |
| s3: | s3: | ||
| are_local_buckets: | are_local_buckets: | ||
| Line 337: | Line 331: | ||
| region: garage | region: garage | ||
| bucket: b2-eu-cen | bucket: b2-eu-cen | ||
| - | ``` | + | </ |
| Restart the service | Restart the service | ||
| - | ```bash | + | |
| - | sudo systemctl restart ente-museum | + | |
| - | ``` | + | |
| - | ### Draft Upgrade Garage Steps | + | Draft Upgrade Garage Steps |
| - | ```bash | + | < |
| VER=v2.4.1 | VER=v2.4.1 | ||
| ARCH=x86_64-unknown-linux-musl | ARCH=x86_64-unknown-linux-musl | ||
| Line 358: | Line 350: | ||
| garage -c / | garage -c / | ||
| curl -sS https:// | curl -sS https:// | ||
| - | ``` | + | </ |
| Potential steps if garage upgrade fails: | Potential steps if garage upgrade fails: | ||
| - | ```bash | + | < |
| sudo systemctl stop garage | sudo systemctl stop garage | ||
| sudo cp / | sudo cp / | ||
| sudo systemctl start garage | sudo systemctl start garage | ||
| - | ``` | + | </ |
| - | Do not layout/ | + | Do not layout/ |
| - | ## 9. museum.yaml example config layout for base setup | + | < |
| - | + | ||
| - | ```yaml | + | |
| db: | db: | ||
| host: 127.0.0.1 | host: 127.0.0.1 | ||
| Line 413: | Line 403: | ||
| email: SMTP_FROM | email: SMTP_FROM | ||
| sender-name: | sender-name: | ||
| - | ``` | + | </ |
| - | ## 10. Draft update sequence | + | Draft update sequence |
| - | ```bash | + | < |
| sudo apt update && sudo apt upgrade | sudo apt update && sudo apt upgrade | ||
| rustup update | rustup update | ||
| Line 447: | Line 437: | ||
| sudo systemctl reload caddy | sudo systemctl reload caddy | ||
| curl -sS https:// | curl -sS https:// | ||
| - | ``` | + | </ |
| Store secrets properly | Store secrets properly | ||
| - | --- // | + | --- // |