fix: add smtp troubleshooting

This commit is contained in:
Mythie
2023-06-17 13:08:15 +10:00
parent f279b41b89
commit 723339f812

View File

@ -63,7 +63,7 @@ Signing documents digitally is fast, easy and should be best practice for every
## Community and Next Steps 🎯 ## Community and Next Steps 🎯
The current project goal is to <b>[release a production ready version](https://github.com/documenso/documenso/milestone/1)</b> for self-hosting as soon as possible. If you want to help making that happen you can: We're currently working on a redesign of the application including a revamp of the codebase so Documenso can be more intuitive to use and robust to develop upon.
- Check out the first source code release in this repository and test it - Check out the first source code release in this repository and test it
- Tell us what you think in the current [Discussions](https://github.com/documenso/documenso/discussions) - Tell us what you think in the current [Discussions](https://github.com/documenso/documenso/discussions)
@ -137,23 +137,25 @@ Follow these steps to setup documenso on you local machine:
```sh ```sh
git clone https://github.com/documenso/documenso git clone https://github.com/documenso/documenso
``` ```
- Run <code>npm i</code> in root directory - Run `npm i` in root directory
- Rename <code>.env.example</code> to <code>.env</code> - Rename `.env.example` to `.env`
- Set DATABASE_URL value in .env file - Set DATABASE_URL value in .env file
- You can use the provided test database url (may be wiped at any point) - You can use the provided test database url (may be wiped at any point)
- Or setup a local postgres sql instance (recommended) - Or setup a local postgres sql instance (recommended)
- Create the database scheme by running <code>db-migrate:dev</code> - Create the database scheme by running `db-migrate:dev`
- Setup your mail provider - Setup your mail provider
- Set <code>SENDGRID_API_KEY</code> value in .env file - Set `SENDGRID_API_KEY` value in .env file
- You need a SendGrid account, which you can create [here](https://signup.sendgrid.com/). - You need a SendGrid account, which you can create [here](https://signup.sendgrid.com/).
- Documenso uses [Nodemailer](https://nodemailer.com/about/) so you can easily use your own SMTP server by setting the <code>SMTP\_\* variables</code> in your .env - Documenso uses [Nodemailer](https://nodemailer.com/about/) so you can easily use your own SMTP server by setting the `SMTP
- Run <code>npm run dev</code> root directory to start \_
* variables` in your .env
- Run `npm run dev` root directory to start
- Register a new user at http://localhost:3000/signup - Register a new user at http://localhost:3000/signup
--- ---
- Optional: Seed the database using <code>npm run db-seed</code> to create a test user and document - Optional: Seed the database using `npm run db-seed` to create a test user and document
- Optional: Upload and sign <code>apps/web/resources/example.pdf</code> manually to test your setup - Optional: Upload and sign `apps/web/resources/example.pdf` manually to test your setup
- Optional: Create your own signing certificate - Optional: Create your own signing certificate
- A demo certificate is provided in `/app/web/resources/certificate.p12` - A demo certificate is provided in `/app/web/resources/certificate.p12`
@ -161,7 +163,7 @@ Follow these steps to setup documenso on you local machine:
## Updating ## Updating
- If you pull the newest version from main, using <code>git pull</code>, it may be necessary to regenerate your database client - If you pull the newest version from main, using `git pull`, it may be necessary to regenerate your database client
- You can do this by running the generate command in `/packages/prisma`: - You can do this by running the generate command in `/packages/prisma`:
```sh ```sh
npx prisma generate npx prisma generate
@ -172,16 +174,22 @@ Follow these steps to setup documenso on you local machine:
For the digital signature of your documents you need a signing certificate in .p12 format (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one: For the digital signature of your documents you need a signing certificate in .p12 format (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one:
1. Generate a private key using the OpenSSL command. You can run the following command to generate a 2048-bit RSA key:\ 1. Generate a private key using the OpenSSL command. You can run the following command to generate a 2048-bit RSA key:
<code>openssl genrsa -out private.key 2048</code>
`openssl genrsa -out private.key 2048`
2. Generate a self-signed certificate using the private key. You can run the following command to generate a self-signed certificate:
`openssl req -new -x509 -key private.key -out certificate.crt -days 365`
2. Generate a self-signed certificate using the private key. You can run the following command to generate a self-signed certificate:\
<code>openssl req -new -x509 -key private.key -out certificate.crt -days 365</code> \
This will prompt you to enter some information, such as the Common Name (CN) for the certificate. Make sure you enter the correct information. The -days parameter sets the number of days for which the certificate is valid. This will prompt you to enter some information, such as the Common Name (CN) for the certificate. Make sure you enter the correct information. The -days parameter sets the number of days for which the certificate is valid.
3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following command to do this: \
<code>openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt</code> 3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following command to do this:
`openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt`
4. You will be prompted to enter a password for the p12 file. Choose a strong password and remember it, as you will need it to use the certificate (**can be empty for dev certificates**) 4. You will be prompted to enter a password for the p12 file. Choose a strong password and remember it, as you will need it to use the certificate (**can be empty for dev certificates**)
5. Place the certificate <code>/apps/web/resources/certificate.p12</code> 5. Place the certificate `/apps/web/resources/certificate.p12`
# Docker # Docker
@ -195,10 +203,16 @@ Want to create a production ready docker image? Follow these steps:
# Deploying - Coming Soon™ # Deploying - Coming Soon™
- Docker support - Docker support
- One-Click-Deploy on Render.com Deploy - One-Click-Deploy on Render.com
# Troubleshooting # Troubleshooting
## I'm not receiving any emails when using the developer quickstart
When using the developer quickstart an [Inbucket](https://inbucket.org/) server will be spun up in a docker container that will store all outgoing email locally for you to view.
The Web UI can be found at http://localhost:9000 while the SMTP port will be on localhost:2500.
## Support IPv6 ## Support IPv6
In case you are deploying to a cluster that uses only IPv6. You can use a custom command to pass a parameter to the NextJS start command In case you are deploying to a cluster that uses only IPv6. You can use a custom command to pass a parameter to the NextJS start command