Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Ente サーバーのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Ente サーバー
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:ファイル共有]] {{Related articles start}} {{Related|AppArmor}} {{Related|Certbot}} {{Related|MinIO}} {{Related|Nginx}} {{Related|PostgreSQL}} {{Related articles end}} [https://ente.io Ente サーバー] は、Ente (モバイル) クライアントに暗号化されたデータの塊を保存・提供するサーバー部分です。クライアントは暗号化されたデータを送受信し、それが Ente サーバーに届き、ローカルの [[MinIO]] オブジェクト ストレージ サービスを通じて保存・読み取りが行われます。 例えば、'''Ente''' フォト クライアントを使用すると、クライアントは写真を暗号化し、それらはサーバーに保存されます。後に、クライアントは暗号化された写真を検索し、ローカルで復号できます ('''エンドツーエンド暗号化''')。クライアント、もしくはクライアントが写真を共有した相手のみが暗号鍵を持っているため、データを復号して実際に写真を見ることができるのはその人たちだけであり、サーバーはその鍵の情報を持っていないため見ることができません。 == インストール == {{AUR|ente-server-git}} パッケージは、デフォルトで提供される Docker 化された '''Ente''' サーバーとは異なり、セルフホスティング用に設計されています。Docker 化またはホスティングソリューションが必要な場合は、[https://ente.io/ ente.io] を参照してください。 まず、{{AUR|ente-server-git}} パッケージを[[インストール]]してください。 セルフホストのサーバー スペースは容量が限られていることが多いため、{{AUR|ente-server-git}} パッケージは、古くてリンクされていない Ente サーバー [[MinIO]] オブジェクトをより迅速にクリーンアップするように変更されています。デフォルトの Ente サーバーは通常 45 日ごとにオブジェクトをクリーンアップしますが、このパッケージではその期間が 5 分ごとに短縮されています。 '''Ente''' サーバーを稼働させるには、[[PostgreSQL]] データベース (Ente オブジェクトのメタデータやユーザーデータの保存用) と [[MinIO]] バケット (暗号化されたオブジェクトデータの保存用) が必要です。また、'''Ente''' サーバーにアクセスするための HTTPS プロキシとして [[Nginx]] の使用が推奨されます。最後に、''ente-cli'' ツールを使うと、Ente サーバーのアカウントの容量制限や有効期限の更新が簡単に行えます。 これらの必要なコンポーネントをインストールするには、オプションの依存関係としてリストされている[[パッケージ]]をインストールすることが推奨されます。同じホストにインストールする場合は、依存パッケージとしてインストールするのが望ましいです。例えば、これらのパッケージをインストールする際、[[pacman]] の場合は {{ic|--asdeps}} オプションを使用し、または {{AUR|yay}} でインストールすることができます。 参考までに、以下の[[package|パッケージ]]がオプションの依存関係としてリストされています。 * {{ic|minio}} * {{ic|minio-client}} * {{ic|nginx}} * {{ic|postgresql}} == 設定 == === MinIO のセットアップ === 設定ファイルを以下のように[[テキスト編集|編集]]してください: {{hc|/etc/minio/minio.conf|2= MINIO_VOLUMES="/srv/minio/data" MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD='<nowiki/>''YOUR-STRONG-MINIO-ROOT-PASSWORD''<nowiki/>' MINIO_OPTS="--address ''your_public_domain.tld'':3200 --console-address 127.0.0.1:3201" }} {{ic|minio.service}} を[[起動/有効化]]します。 ''mcli'' コマンドを使って (minio ユーザーとして) [[MinIO]] ente-server バケットを作成します: # cd /srv/minio/data [minio]$ mcli mb -p ente-server === PostgreSQL setup === Initialize the database as the postgres user: [postgres]$ initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data' --data-checksums --auth=scram-sha-256 --pwprompt Configure to only listen on a [https://man.archlinux.org/man/unix.7.en AF_UNIX] socket: {{hc|/var/lib/postgres/data/postgresql.conf|2= listen_addresses = <nowiki>''</nowiki> # AF_UNIX Socket only }} Restrict socket access to [[PostgreSQL]] user or group by [[edit]]ing {{ic|postgresql.service}}: {{hc|/etc/systemd/system/postgresql.d/socket-access-restriction.conf|2= [Service] RuntimeDirectoryMode=750 }} Add {{ic|ente}} to the {{ic|postgres}} [[user group]], then [[start/enable]]{{ic|postgresql.service}}. Create [[PostgreSQL]] database user and a database owned by this user (specify new password twice, then specify postgres password to store new account): [postgres]$ createuser -P ente Then specify postgres password to create new database: [postgres]$ createdb -T template0 -O ente -E unicode ente-server === Running ente-server === Add [[MinIO]] bucket details: {{hc|/etc/ente-server/local.yaml| b2-eu-cen: key: minio secret: "''YOUR-STRONG-MINIO-ROOT-PASSWORD''" endpoint: ''your_public_domain.tld'':3200 region: eu-central-2 bucket: ente-server }} Add [[PostgreSQL]] details: {{hc|/etc/ente-server/local.yaml| db: host: /run/postgresql port: 5432 name: ente-server user: ente password: "''YOUR-STRONG-ENTE-DATABASE-USER-PASSWORD''" }} Generate new secret key values using the ''ente-server-gen-random-keys'' command and use these values as a replacement of the default values in the {{ic|/etc/ente-server/local.yaml}} configuration file. [[Edit]] {{ic|ente-server.service}} to allow it to access to the IP address of ''your_public_domain.tld'' (by default the service only allows access from and to localhost): {{bc| [Service] IPAddressAllow{{=}}''IP_address_of_your_public_domain.tld'' }} [[Enable/start]] {{ic|ente-server.service}}. === Configuring Nginx proxy === Copy the example [[Nginx]] config and the accompanying HTTP(S) security header config files to the [[Nginx]] configuration directory: # cp -v /usr/lib/ente-server/ente-server-nginx.conf /etc/nginx/ # cp -v /usr/lib/ente-server/http*security_headers.conf /etc/nginx/ Edit this example config, and replace ''your_public_domain.tld'' with your actual public domain name Request a letsencrypt ceritifacte (or a SSL certificate from another provider) if not already done so: # certbot certonly --email ''your_email'' --agree-tos --preferred-challenge http --webroot -w /var/lib/letsencrypt -d ''your_public_domain.tld'' Append an {{ic|include}} statement to the [[Nginx]] {{ic|http}} config to include the ''ente-server'' config: {{hc|/etc/nginx/nginx.conf| http { include /etc/nginx/ente-server-nginx.conf } }} Fix permissions: # chmod 644 /etc/nginx/ente-server-nginx.conf # chmod 644 /etc/nginx/http*security_headers.conf [[Restart]] {{ic|nginx.service}} to apply the changes. === Configuring ente-server and ente-cli === {{Style|Last section to adjust.|section=Cleanup}} * Install {{ic|ente-cli}} on the client: ** [[Install]] the {{AUR|ente-cli-bin}} package * Add {{ic|ente-cli}} config on the client: {{bc|$ mkdir -p ~/.ente/export }} {{hc|~/.ente/config.yaml| endpoint: api: "''<nowiki>https://your_public_domain.tld</nowiki>''" >}} * Add a user account via the photos mobile app or web app on the client, using a custom endpoint: ** In the photos mobile app: *** Click 7 times on the main screen to enable developers mode *** Define your custom '''Ente''' server API endpoint: {{bc| URL: ''<nowiki>https://your_public_domain.tld</nowiki>''}} ** In the web app on the client: {{bc| $ git clone https://github.com/ente-io/ente.git cd ente/web git submodule update --init --recursive yarn install NEXT_PUBLIC_ENTE_ENDPOINT{{=}}''<nowiki>https://your_public_domain.tld</nowiki>'' yarn dev:photos}} * Follow the photos app or web app (''http://localhost:3000'') instructions to create a new user * Obtain the OTP code: ** Via email: *** Configure the {{ic|smtp}} section in {{ic|/etc/ente-server/local.yaml}} *** Make sure the configure [https://man.archlinux.org/man/smtp.1.en SMTP] server is working *** Wait for the mail to arrive and copy the OTP code ** Via the ente-server log: *** {{bc|# journalctl -u ente-server {{!}} grep SendEmailOTT {{!}} tail -n 1}} * Obtain the new users account ID: {{bc| # psql -U ente ente-server -c 'select user_id from users order by user_id desc limit 1;'}} * Configure this user as the admin: {{hc|/etc/ente-server/local.yaml| internal: admin: [''ADD_USER_ID_HERE'']}} * [[Restart]] {{ic|ente-server.service}} to activate the new admin privileges * Configure this admin within {{ic|ente-cli}} on the client: {{bc| $ ente account add photos ~/.ente/export ''email_address_of_admin_account'' ''password_of_admin_account'' }} === Increasing user storage and account expiry limit === * Use ''ente-cli'' to increase storage limit with 100 TB and expiry with 100 years: {{bc| ente admin update-subscription -u "''user@domain.tld''"}} === (Optional) Copy and apply AppArmor profile === An [[AppArmor]] profile has been provided for those that wish to limit the access the '''ente-server''' binary has using [[AppArmor]]. Copy and apply this profile as follows (assuming that [[AppArmor]] has already been installed and enabled): {{bc| # install -Dvm600 -o root -g root /usr/lib/ente-server/usr.bin.ente-server -t /etc/apparmor.d/ # aa-enforce /usr/bin/ente-server}} === (Optional) Configure Firewall === If a host firewall like iptables or nftables has been enabled and configured, make sure the following is allowed: * Traffic on {{ic|localhost}} * Traffic from your '''Ente''' (mobile) client to TCP port {{ic|443}} to reach [[Nginx]] * Traffic from your '''Ente''' (mobile) client to TCP port {{ic|3200}} to reach the [[MinIO]] API port == Files == The {{AUR|ente-server-git}} package contains the {{man|1|ente-server|url=}} [[man page]] that lists and explains all files that are installed by this package. == See also == * Upstream Repository: [https://github.com/ente-io/ente/tree/main/server ente.io Ente Server Repository]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
Ente サーバー
に戻る。
検索
検索
Ente サーバーのソースを表示
話題を追加