Setting up your instance
For this process, you will need to have already launched an instance using the steps in Launching an instance.

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.

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.

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

The following command will start the server with the default settings:
docker run -d -p 80:3000 --restart always \

(If the Docker daemon is not running, run sudo systemctl start docker before starting the server.)

Run docker ps to view the running container and get its randomly generated name.

docker stop <container_name> will stop the server.

docker rm <container_name> will remove the container.

To configure your server, you can add optional variables to the docker run command with the -e flag. Use any of the following:

  • PDFREST_SERVER_DOMAIN: Your server domain.
  • REDIRECT_ROOT_URL: the URL to redirect users to if they attempt to navigate to the server domain.
  • REMOVE_ORIGINAL_PROCESSED: Defines whether original processed files are removed.
  • REMOVE_ORIGINAL_PROCESSED_DELAY: How long files should remain.
  • MAX_PROCESS_TIME: Cap on processing time.
  • MAX_UPLOAD_SIZE: Cap on file upload size.

To view server logs, run docker container logs <container_name>.