😅
Bluesky Sosial on Ubuntu22.04
Bluesky Sosial
Run ATProtocol server by The Bluesky Team on Ubuntu22.04 for Nodejs beginner like me.
atproto
git clone https://github.com/bluesky-social/atproto.git
cd atproto
make
Helper Commands:
help Print info about all commands
build Compile all modules
test Run all tests
run-dev-env Run a "development environment" shell
run-pds Run PDS locally
lint Run style checks and verify syntax
fmt Run syntax re-formatting
deps Installs dependent libs using 'yarn install'
nvm-setup Use NVM to install and activate node+yarn
Nodejs
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install 18
npm install --global yarn
echo 'export PATH="$NVM_DIR/versions/node/v18.15.0/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Postgresql
cat packages/pds/example.dev.env
DB_POSTGRES_URL="postgres://bsky:yksb@localhost/pds_dev"
DEBUG_MODE=1
LOG_ENABLED="true"
LOG_LEVEL=debug
LOG_DESTINATION=1
AVAILABLE_USER_DOMAINS=".test,.dev.bsky.dev"
sudo apt update && sudo apt upgrade -y
sudo apt install postgresql postgresql-contrib -y
sudo -i -u postgres createuser --interactive
Enter name of role to add: bsky
Shall the new role be a superuser? (y/n) y
sudo -i -u postgres psql -c "alter user bsky with password 'yksb';"
sudo -i -u postgres createdb pds_dev
- delete
sudo -i -u postgres dropdb pds_dev
Run
make deps
make run-pds
if [ ! -f "packages/pds/.dev.env" ]; then cp packages/pds/example.dev.env packages/pds/.dev.env; fi
cd packages/pds; ENV=dev yarn run start | yarn exec pino-pretty
yarn exec v1.22.19
yarn run v1.22.19
$ node dist/bin.js
[08:17:17.995] INFO (app-view/8665): repo subscription disabled
🌞 ATP Data server is running at http://localhost:2583
Caution: use another terminal when making run-dev-env.
make run-dev-env
cd packages/dev-env; yarn run start
yarn run v1.22.19
$ node dist/cli.js
██████╗
██╔═══██╗
██║██╗██║
██║██║██║
╚█║████╔╝
╚╝╚═══╝ protocol
[ v0.0.1 | created by Bluesky ]
Initializing...
[2582] 👤 DID Placeholder server started http://localhost:2582
[2584] 🌞 Personal Data server started http://localhost:2584
Test environment generated.
Type .hel
App
Search "Bluesky Sosial" on App Store.
Install | Open |
---|---|
Create a new Account
Caution: Hosting provider IP address is that of run-pds.
Hosting provider | Email & Password | user handle |
---|---|---|
Test
Home | Post | Profile |
---|---|---|
- Watch log of running run-pds
[10:10:05.710] INFO (pds/9545): request completed
req: {
"id": 46,
"method": "GET",
"url": "/xrpc/com.atproto.repo.listRecords?collection=app..
:
}
Discussion
上記は端末落とすと停止してしまうが、KingYoSunさんにAWSでの構築方法を教えていただいた。
コードをみると確かにAWS使うこと前提のようだ。
他にやってくれている方がいらっしゃった。
記事ありがとうございます!
bsky.socialなど他のサーバーと連携するにはどうすればいいですか?
KingYoSunさんの記事にありますが、
という訳で現状はXRPCで連携できません。そのうちできるようになると思います。
そうですね、まだ仕様が固まってない状態ですね
ありがとうございます!