(1) AWS Account Permissions to create instance, security group, vpc, ect.,
(2) Registered public domain name, permissions to create DNS records
(3) Connect to the instance created (Ubuntu 22.xx later not support until Dec 2024.)
Costs:
AWS Free tier account required to register the payment card. Not required for Resend, Sendgrid account.
1 vCPU, 1 GB of RAM, 20GB of HDD for 20 users (BlueSky Github self-hosted PDS server)
Let’s start Flexavior!
Login with your privileges AWS user account. (Create AWS free tier account)
ubuntu@ip-172-31-17-73:~$ wget https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13289 (13K) [text/plain]
Saving to: ‘installer.sh’
installer.sh 100%[==================================================================================================>] 12.98K --.-KB/s in 0s
#ubuntu@ip-172-31-17-73:~$ ls
#installer.sh
#ubuntu@ip-172-31-17-73:~$ sudo nano installer.sh
ubuntu@ip-172-31-17-73:~$ sudo bash installer.sh
* Detected supported distribution Ubuntu 22.04 LTS
---------------------------------------
Add DNS Record for Public IP
---------------------------------------
From your DNS provider's control panel, create the required
DNS record with the value of your server's public IP address.
+ Any DNS name that can be resolved on the public internet will work.
+ Replace example.com below with any valid domain name you control.
+ A TTL of 600 seconds (10 minutes) is recommended.
Example DNS record:
NAME TYPE VALUE
---- ---- -----
example.com A Server's IP
*.example.com A Server's IP
**IMPORTANT**
It's recommended to wait 3-5 minutes after creating a new DNS record
before attempting to use it. This will allow time for the DNS record
to be fully updated.
Enter your public DNS address (e.g. example.com): yourpds.example.com
Enter an admin email address (e.g. you@example.com): admin@example.com
#Retrieving repo and URLs will be varied closer to you
Hit:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
!!!Omitted lines output!!!
Fetched 34.8 MB in 47s (734 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu4).
lsb-release set to manually installed.
ca-certificates is already the newest version (20240203~22.04.1).
ca-certificates set to manually installed.
gnupg is already the newest version (2.2.27-3ubuntu2.1).
gnupg set to manually installed.
openssl is already the newest version (3.0.2-0ubuntu1.18).
openssl set to manually installed.
The following additional packages will be installed:
libcurl4 libjq1 libonig5
Suggested packages:
sqlite3-doc
The following NEW packages will be installed:
jq libjq1 libonig5 sqlite3
The following packages will be upgraded:
curl libcurl4 xxd
3 upgraded, 4 newly installed, 0 to remove and 34 not upgraded.
Need to get 1661 kB of archives.
After this operation, 2960 kB of additional disk space will be used.
Get:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 xxd amd64 2:8.2.3995-1ubuntu2.21 [52.3 kB]
!!!Omitted lines output!!!
Fetched 1661 kB in 1s (1182 kB/s)
(Reading database ... 65783 files and directories currently installed.)
Preparing to unpack .../0-xxd_2%3a8.2.3995-1ubuntu2.21_amd64.deb ...
Unpacking xxd (2:8.2.3995-1ubuntu2.21) over (2:8.2.3995-1ubuntu2.18) ...
Preparing to unpack .../1-curl_7.81.0-1ubuntu1.19_amd64.deb ...
Unpacking curl (7.81.0-1ubuntu1.19) over (7.81.0-1ubuntu1.18) ...
Preparing to unpack .../2-libcurl4_7.81.0-1ubuntu1.19_amd64.deb ...
Unpacking libcurl4:amd64 (7.81.0-1ubuntu1.19) over (7.81.0-1ubuntu1.18) ...
Selecting previously unselected package libonig5:amd64.
Preparing to unpack .../3-libonig5_6.9.7.1-2build1_amd64.deb ...
Unpacking libonig5:amd64 (6.9.7.1-2build1) ...
Selecting previously unselected package libjq1:amd64.
Preparing to unpack .../4-libjq1_1.6-2.1ubuntu3_amd64.deb ...
Unpacking libjq1:amd64 (1.6-2.1ubuntu3) ...
Selecting previously unselected package jq.
Preparing to unpack .../5-jq_1.6-2.1ubuntu3_amd64.deb ...
Unpacking jq (1.6-2.1ubuntu3) ...
Selecting previously unselected package sqlite3.
Preparing to unpack .../6-sqlite3_3.37.2-2ubuntu0.3_amd64.deb ...
Unpacking sqlite3 (3.37.2-2ubuntu0.3) ...
Setting up xxd (2:8.2.3995-1ubuntu2.21) ...
Setting up libcurl4:amd64 (7.81.0-1ubuntu1.19) ...
Setting up curl (7.81.0-1ubuntu1.19) ...
Setting up libonig5:amd64 (6.9.7.1-2build1) ...
Setting up sqlite3 (3.37.2-2ubuntu0.3) ...
Setting up libjq1:amd64 (1.6-2.1ubuntu3) ...
Setting up jq (1.6-2.1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 6.8.0-1015-aws
NEEDRESTART-KEXP: 6.8.0-1015-aws
NEEDRESTART-KSTA: 1
* Installing Docker
Hit:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease
!!!Omitted lines output!!!
Fetched 90.6 kB in 1s (126 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
docker-buildx-plugin docker-ce-rootless-extras libltdl7 libslirp0 pigz slirp4netns
Suggested packages:
aufs-tools cgroupfs-mount | cgroup-lite
The following NEW packages will be installed:
containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin libltdl7 libslirp0 pigz slirp4netns
0 upgraded, 10 newly installed, 0 to remove and 34 not upgraded.
Need to get 124 MB of archives.
After this operation, 445 MB of additional disk space will be used.
Get:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB]
!!!Omitted lines output!!!
Fetched 124 MB in 2s (78.1 MB/s)
Selecting previously unselected package pigz.
(Reading database ... 65806 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.6-1_amd64.deb ...
Unpacking pigz (2.6-1) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../1-containerd.io_1.7.24-1_amd64.deb ...
Unpacking containerd.io (1.7.24-1) ...
Selecting previously unselected package docker-buildx-plugin.
Preparing to unpack .../2-docker-buildx-plugin_0.19.2-1~ubuntu.22.04~jammy_amd64.deb ...
Unpacking docker-buildx-plugin (0.19.2-1~ubuntu.22.04~jammy) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../3-docker-ce-cli_5%3a27.4.0-1~ubuntu.22.04~jammy_amd64.deb ...
Unpacking docker-ce-cli (5:27.4.0-1~ubuntu.22.04~jammy) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../4-docker-ce_5%3a27.4.0-1~ubuntu.22.04~jammy_amd64.deb ...
Unpacking docker-ce (5:27.4.0-1~ubuntu.22.04~jammy) ...
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../5-docker-ce-rootless-extras_5%3a27.4.0-1~ubuntu.22.04~jammy_amd64.deb ...
Unpacking docker-ce-rootless-extras (5:27.4.0-1~ubuntu.22.04~jammy) ...
Selecting previously unselected package docker-compose-plugin.
Preparing to unpack .../6-docker-compose-plugin_2.31.0-1~ubuntu.22.04~jammy_amd64.deb ...
Unpacking docker-compose-plugin (2.31.0-1~ubuntu.22.04~jammy) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../7-libltdl7_2.4.6-15build2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-15build2) ...
Selecting previously unselected package libslirp0:amd64.
Preparing to unpack .../8-libslirp0_4.6.1-1build1_amd64.deb ...
Unpacking libslirp0:amd64 (4.6.1-1build1) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../9-slirp4netns_1.0.1-2_amd64.deb ...
Unpacking slirp4netns (1.0.1-2) ...
Setting up docker-buildx-plugin (0.19.2-1~ubuntu.22.04~jammy) ...
Setting up containerd.io (1.7.24-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up docker-compose-plugin (2.31.0-1~ubuntu.22.04~jammy) ...
Setting up libltdl7:amd64 (2.4.6-15build2) ...
Setting up docker-ce-cli (5:27.4.0-1~ubuntu.22.04~jammy) ...
Setting up libslirp0:amd64 (4.6.1-1build1) ...
Setting up pigz (2.6-1) ...
Setting up docker-ce-rootless-extras (5:27.4.0-1~ubuntu.22.04~jammy) ...
Setting up slirp4netns (1.0.1-2) ...
Setting up docker-ce (5:27.4.0-1~ubuntu.22.04~jammy) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 6.8.0-1015-aws
NEEDRESTART-KEXP: 6.8.0-1015-aws
NEEDRESTART-KSTA: 1
* Configuring Docker daemon
* Creating data directory /pds
* Creating Caddy data directory
* Creating Caddy config directory
* Creating Caddy config file
* Downloading PDS compose file
* Starting the pds systemd service
Created symlink /etc/systemd/system/default.target.wants/pds.service → /etc/systemd/system/pds.service.
* Enabling access on TCP port 80 using ufw
* Enabling access on TCP port 443 using ufw
* Downloading pdsadmin
========================================================================
PDS installation successful!
------------------------------------------------------------------------
Check service status : sudo systemctl status pds
Watch service logs : sudo docker logs -f pds
Backup service data : /pds
PDS Admin command : pdsadmin
Required Firewall Ports
------------------------------------------------------------------------
Service Direction Port Protocol Source
------- --------- ---- -------- ----------------------
HTTP TLS verification Inbound 80 TCP Any
HTTP Control Panel Inbound 443 TCP Any
Required DNS entries
------------------------------------------------------------------------
Name Type Value
------- --------- ---------------
yourpds.example.com A Server's IP
*. yourpds.example.com A Server's IP
Detected public IP of this server: Server's IP
To see pdsadmin commands, run "pdsadmin help"
========================================================================
Create a PDS user account? (y/N):
Click y to create your PDS user account
Provide user info: email and handler name.
#Health Check https://yourpds.example.com/xrpc/_health
#WebSocket Check wss://yourpds.example.com/xrpc/com.atproto.sync.subscribeRepo?cursor=0”
Account created successfully!
-----------------------------
Handle : user.yourpds.example.com
DID : did:plc:he3usomerandomnumbersev6
Password : xxxxxxxxxxxxxxxxxxxxxxxx
Save this password, it will not be displayed again.
Provide SMTP server info | Use ‘Resend’ or ‘Sendgrid’ Email API for account email verification