66 lines
2.6 KiB
Markdown
66 lines
2.6 KiB
Markdown
# atproto(at protocol)
|
|
|
|
```sh
|
|
$ curl -sL syu.is/xrpc/_health
|
|
{"version":"0.4.65"}
|
|
```
|
|
|
|
- @
|
|
- [at]mosphere
|
|
- at://domain
|
|
|
|
## link
|
|
|
|
- https://github.com/bluesky-social/atproto
|
|
- https://github.com/itaru2622/bluesky-selfhost-env
|
|
- https://github.com/bluesky-social/atproto/discussions/2026
|
|
|
|
## self-host
|
|
|
|
現在、`bsky`, `bsync`のpatchを当てないと動きません。また、`social-app`はアバターが表示されません。動かないものは [itaru2622/bluesky-selfhost-env](https://github.com/itaru2622/bluesky-selfhost-env) を使用すると良いでしょう。
|
|
|
|
- bsky = appview
|
|
- ozone = mod
|
|
|
|
|name|service|patch|
|
|
|---|---|---|
|
|
|pds|https://github.com/bluesky-social/atproto/blob/main/services/pds/Dockerfile||
|
|
|bsky|https://github.com/bluesky-social/atproto/blob/main/services/bsky/Dockerfile|[itaru2622/bluesky-atproto-bsky](https://hub.docker.com/r/itaru2622/bluesky-atproto-bsky)|
|
|
|bsync|https://github.com/bluesky-social/atproto/blob/main/services/bsync/Dockerfile||
|
|
|ozone|https://github.com/bluesky-social/atproto/blob/main/services/ozone/Dockerfile||
|
|
|plc|https://github.com/did-method-plc/did-method-plc/tree/main/packages/server||
|
|
|bgs|https://github.com/bluesky-social/indigo/tree/main/cmd/bigsky||
|
|
|feed|https://github.com/bluesky-social/feed-generator||
|
|
|web|https://github.com/bluesky-social/social-app|[itaru2622/bluesky-social-app](https://hub.docker.com/r/itaru2622/bluesky-social-app)|
|
|
|
|
```sh
|
|
# BSKY_IMG_URI_ENDPOINT, BSKY_BLOB_CACHE_LOC
|
|
# avatar link example
|
|
1. https://appview.${host}/img/avatar/plain/${did}/${cid}@jpeg
|
|
2. https://${host}/xrpc/com.atproto.sync.getBlob?did=${did}&cid=${cid}
|
|
```
|
|
|
|
docker composeはportsを書かなければ公開されません。内部間のみ有効になります。公開するもののみportsをつけましょう。
|
|
|
|
## api
|
|
|
|
```sh
|
|
# create account
|
|
$ url=https://${pds}/xrpc/com.atproto.server.createAccount
|
|
$ json="{\"email\": \"$email\", \"handle\": \"$handle\", \"password\": \"$password\"}"
|
|
$ curl -X POST -H "Content-Type: application/json" -d $json -sL $url
|
|
```
|
|
|
|
3文字以下の名前を使用するには`src/pds/handle`を変更します。また、social-app(web client)からは3文字以下のアカウントを作成できません。apiから作成してください。
|
|
|
|
- [/atproto/packages/pds/src/handle/index.ts](https://github.com/bluesky-social/atproto/blame/d4d5a6edba972c0e9976289bde8bc0b42ff547ca/packages/pds/src/handle/index.ts#L86-L88)
|
|
|
|
```sh
|
|
# invite code
|
|
admin_password=xxx
|
|
url=https://$host/xrpc/com.atproto.server.createInviteCode
|
|
json="{\"useCount\":1}"
|
|
curl -X POST -u admin:${admin_password} -H "Content-Type: application/json" -d "$json" -sL $url
|
|
```
|
|
|