Setting up your instance

For this process, you will need to have already launched an instance using the steps in Launching an instance.
Image showing where the user can see the existing EC2 Instances.

You can view information about your instance in the EC2 Console Instances view. You can reach it from the EC2 Dashboard with any of these links.

Image showing the location of the Instance ID link.

Checking the box will select the instance in this view, and clicking the link will open the instance details in its own view. For this guide, we’ll click the link and open the instance details in its own view.

Image showing the EC2's Public IPv4 DNS address.

Look for Public IPv4 DNS on the Details tab. Log onto the server using this DNS address, and the keypair you selected when creating the instance.

Image showing the file path necessary to edit the settings of the pdfRest AMI.

Navigate to /opt/datalogics/pdf-utility/config/ and open the file settings.js.

Image showing the serverDomain variable that should be changed for the user.

In this file, change serverDomain to the domain for your server.

Image showing how to save the new settings.js file from inside vi.

Save the settings.js file.

Image showing how to restart the service with the pm2 command.

To apply the settings file changes, restart pm2 using this command: pm2 reload 0 --watch

Image showing how to check the status of the pdfRest service with PM2.

To check the status of pm2: pm2 status. You should see the API in the pm2 list.

Image showing the file path where PM2 logs can be found.

PM2 logs can be found at: /home/rocky/.pm2/logs/PDFCloud-out.log