···1FROM node:20.11-alpine3.18 as build
23-RUN npm install -g pnpm
45# Move files into the image and install
6WORKDIR /app
7COPY ./service ./
08RUN pnpm install --production --frozen-lockfile > /dev/null
910# Uses assets from build stage to reduce build size
···1FROM node:20.11-alpine3.18 as build
23+RUN corepack enable
45# Move files into the image and install
6WORKDIR /app
7COPY ./service ./
8+RUN corepack prepare --activate
9RUN pnpm install --production --frozen-lockfile > /dev/null
1011# Uses assets from build stage to reduce build size
+41-1
README.md
···214PDS_EMAIL_FROM_ADDRESS=admin@your.domain
215```
216217-If the username and/or password contain special characters, the special characters will need to be [percent encoded](https://en.wikipedia.org/wiki/Percent-encoding). For some email services, the username will contain an extra `@` symbol that will also need to be percent encoded. For example, the URL `user&name@oci:p@ssword@smtphost:465` after percent encoding for the username and password fields would become `user%26name%40oci:p%40ssword@smtphost:465`.
0000000000218219_Note: Your PDS will need to be restarted with those variables. This varies depending on your setup. If you followed this installation guide, run `systemctl restart pds`. You might need to restart the server or recreate the container, depending on what you are using._
000000000000000000000000000000220221### Updating your PDS
222
···214PDS_EMAIL_FROM_ADDRESS=admin@your.domain
215```
216217+If you prefer to use a standard SMTP server (a local one or from your email provider), put your account's username and password in the URL:
218+219+```
220+PDS_EMAIL_SMTP_URL=smtps://username:password@smtp.example.com/
221+```
222+223+Alternatively, if you're running a local sendmail-compatible mail service like Postfix or Exim on the same host, you can configure the PDS to use the sendmail transport by using such URL:
224+225+```
226+PDS_EMAIL_SMTP_URL=smtp:///?sendmail=true
227+```
228229_Note: Your PDS will need to be restarted with those variables. This varies depending on your setup. If you followed this installation guide, run `systemctl restart pds`. You might need to restart the server or recreate the container, depending on what you are using._
230+231+#### Common SMTP issues
232+233+If you find that your test messages using cURL or other sources go out correctly, but you are not receiving emails from your PDS, you may need to URL encode your username and password on `/pds/pds.env` and restart the PDS service.
234+235+If the username and/or password contain special characters, the special characters will need to be [percent encoded](https://en.wikipedia.org/wiki/Percent-encoding). For some email services, the username will contain an extra `@` symbol that will also need to be percent encoded. For example, the URL `user&name@oci:p@ssword@smtphost:465` after percent encoding for the username and password fields would become `user%26name%40oci:p%40ssword@smtphost:465`.
236+237+If you are migrating an account, Bluesky's UI will ask you to confirm your email address. The confirmation code email is meant to come from your PDS. If you are encountering issues with SMTP and want to confirm the address before solving it, you can find the confirmation code on the `email_token` table on `accounts.sqlite`.
238+239+### Logging
240+241+By default, logs from the PDS are printed to `stdout` and end up in Docker's log. You can browse them by running:
242+243+```
244+[sudo] docker logs pds
245+```
246+247+Note: these logs are not persisted, so they will be lost after server reboot.
248+249+Alternatively, you can configure the logs to be printed to a file by setting `LOG_DESTINATION`:
250+251+```
252+LOG_DESTINATION=/pds/pds.log
253+```
254+255+You can also change the minimum level of logs to be printed (default: `info`):
256+257+```
258+LOG_LEVEL=debug
259+```
260261### Updating your PDS
262
+1-7
installer.sh
···31 openssl
32 sqlite3
33 xxd
034"
35# Docker packages.
36REQUIRED_DOCKER_PACKAGES="
···214 fi
215216 # Admin email
217- if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
218- read -p "Enter an admin email address (e.g. you@example.com): " PDS_ADMIN_EMAIL
219- fi
220- if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
221- usage "No admin email specified"
222- fi
223-224 if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
225 read -p "Enter an admin email address (e.g. you@example.com): " PDS_ADMIN_EMAIL
226 fi
···31 openssl
32 sqlite3
33 xxd
34+ jq
35"
36# Docker packages.
37REQUIRED_DOCKER_PACKAGES="
···215 fi
216217 # Admin email
0000000218 if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
219 read -p "Enter an admin email address (e.g. you@example.com): " PDS_ADMIN_EMAIL
220 fi
+2-1
service/package.json
···3 "private": true,
4 "version": "0.0.0",
5 "description": "Service entrypoint for atproto personal data server",
06 "main": "index.js",
7 "license": "MIT",
8 "dependencies": {
9- "@atproto/pds": "0.4.74"
10 }
11}