···11FROM node:20.11-alpine3.18 as build
2233-RUN npm install -g pnpm
33+RUN corepack enable
4455# Move files into the image and install
66WORKDIR /app
77COPY ./service ./
88+RUN corepack prepare --activate
89RUN pnpm install --production --frozen-lockfile > /dev/null
9101011# Uses assets from build stage to reduce build size
+41-1
README.md
···214214PDS_EMAIL_FROM_ADDRESS=admin@your.domain
215215```
216216217217-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`.
217217+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:
218218+219219+```
220220+PDS_EMAIL_SMTP_URL=smtps://username:password@smtp.example.com/
221221+```
222222+223223+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:
224224+225225+```
226226+PDS_EMAIL_SMTP_URL=smtp:///?sendmail=true
227227+```
218228219229_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._
230230+231231+#### Common SMTP issues
232232+233233+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.
234234+235235+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`.
236236+237237+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`.
238238+239239+### Logging
240240+241241+By default, logs from the PDS are printed to `stdout` and end up in Docker's log. You can browse them by running:
242242+243243+```
244244+[sudo] docker logs pds
245245+```
246246+247247+Note: these logs are not persisted, so they will be lost after server reboot.
248248+249249+Alternatively, you can configure the logs to be printed to a file by setting `LOG_DESTINATION`:
250250+251251+```
252252+LOG_DESTINATION=/pds/pds.log
253253+```
254254+255255+You can also change the minimum level of logs to be printed (default: `info`):
256256+257257+```
258258+LOG_LEVEL=debug
259259+```
220260221261### Updating your PDS
222262
+1-7
installer.sh
···3131 openssl
3232 sqlite3
3333 xxd
3434+ jq
3435"
3536# Docker packages.
3637REQUIRED_DOCKER_PACKAGES="
···214215 fi
215216216217 # Admin email
217217- if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
218218- read -p "Enter an admin email address (e.g. you@example.com): " PDS_ADMIN_EMAIL
219219- fi
220220- if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
221221- usage "No admin email specified"
222222- fi
223223-224218 if [[ -z "${PDS_ADMIN_EMAIL}" ]]; then
225219 read -p "Enter an admin email address (e.g. you@example.com): " PDS_ADMIN_EMAIL
226220 fi