Setup a Ubuntu server in AWS EC2
- Sign up for a free AWS account.
- Login to AWS Console.
- Select the region closest to you. Mine defaulted to Ohio.
- Search for “EC2”.
- Choose
Launch Instance
. - Give your instance a name, like “pds”.
- Under “Application and OS Images” choose
Ubuntu
. - Under “Amazon Machine Image (AMI)” choose
Ubuntu 22.04
(per current version of PDS README) - Under “Architecture” choose
64-bit (x86)
to stay in the free tier. - Under “Instance type” choose
t2.micro
- Under “Key pair (login)” click on Create new key pair
- Give your key pair a name, like “pds-login”.
- Choose ED25519 for the key pair type.
- Choose
.pem
if you are on a Linux, macOS, or Windows with OpenSSH. If you use PuTTY on Windows, choose.ppk
- Click
Create key pair
- Save the file on your machine for later use.
- Keep
Allow SSH traffic from
checked. - Check
Allow HTTPS traffic from the internet
. - Check
Allow HTTP traffic from the internet
. - Under “Configure storage” change the number of GiB to
20
(per current version of PDS README) - Click
Launch Instance
Setting up DNS
I have a domain (tpaulshippy.com) that is already hosted elsewhere. I would like my pds server to be at pds.tpaulshippy.com so I opened my web host and entered the following settings:
A Records
- Domain name: pds.tpaulshippy.com
IP Address: 35.90.227.79 (the Public IPv4 address of my EC2 instance)
TTL: 3600 - Domain name: *.pds.tpaulshippy.com
IP Address: 35.90.227.79 (the Public IPv4 address of my EC2 instance)
TTL: 3600
Connecting to the instance
- Login to AWS Console.
- Search for “EC2”.
- Choose
Instances
- Click on your instance ID.
- Click
Connect
. - Click
SSH client
. - Follow the instructions listed. Here’s how I do it on my mac:
- Open a terminal.
- Type
cd
followed by a space. - Type the directory on your machine where you placed the
.pem
file saved earlier. - Press return.
- Type
chmod 400 "pds-login.pem"
- Press return.
- Type
ssh -i "pds-login.pem" ubuntu@
- Paste the Public DNS name of the instance (ends in
.compute.amazonaws.com
) - Press return.
- You should see a message that starts with Welcome to Ubuntu
Installer on Ubuntu 20.04
- Connect to the instance with SSH as specified above.
- Run the following command to download the installer:
wget https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh
- Run the following command to run the installer:
sudo bash installer.sh
- Enter your domain. I put in “pds.tpaulshippy.com”. Press return.
- Enter an email address. Press return.
- Wait for the installation…
- Setup the initial user as instructed. Save the password and use it to login.
Check installation
Connect to your server
https://github.com/bluesky-social/pds?tab=readme-ov-file#using-the-bluesky-app-with-your-pds
Notes
My web host did not easily allow me to add the *.pds.tpaulshippy.com DNS entry. So when I connected to my server, it showed “Invalid Handle” as my profile. But I could still browse around and see content.
I ended up switching my name servers to my domain registrar which does support wildcards on subdomains. After quite a bit of waiting for DNS propogation, I got it working.