Sentry Docker Install

Sentry’s cross-platform application monitoring helps teams in analysing the error and bugs in live applications. We internally use Sentry to track errors on our price comparison API This makes it easy for the team to analyse the error in various parts of the application and fix errors fastly. Today we will see how to set up sentry up and running on a ubuntu machine. There are official sentry docs on how to install sentry with docker, we tried the best to set it up from scratch on a vanilla machine faster.

As the readme in the onpremise repo says, all you need to do is run the./install.sh script after modifying the docker-compose.yml file. With that said, there are some important caveats. Sentry does not provide SSL out of the box.

  1. Swap Memory

  • Zend Server is the integrated application platform for PHP mobile and web apps. Zend Server provides you with a highly available PHP production environment which includes, amongst other features, a highly reliable PHP stack, application monitoring, troubleshooting, and the all-new Z-Ray.
  • Hi, I have installed sentry system-wide on ubuntu 18.04 LTS server, using pip install sentry in a virtualenv and running with postgresql. Its running and we are able to loginto the dashboard but there are many errors, like when we click on projects it says “unable to fetch all project stats” I created a django project and used its dsn in our django project which has logging on another.

We are considering a 1GB machine for the tutorial, however, it’s suggested to have at least 4GB machine so that memory issues won’t be popping up while installation.

SSH in to your machine.

We are adding a 4GB swap memory (since 1GB RAM can cause memory issues while installation). First, check if the system has configured any swap memory. You can skip this step if your machine has enough memory (At least 4GB)

sudo swapon –show

Then verify that there are no active swap utilized by the system by running,

free -h

Create a 4B swap using the following command.

sudo fallocate -l 4G /swapfile

Verify the allocation using the command.

ls -lh /swapfile

Now, apply the permissions to the swap file by running:

sudo chmod 600 /swapfile

Mark the file as swap by running the command:

sudo mkswap /swapfile

Sentry Docker Install For Chrome

Now, enable the swap by running the command:

sudo swapon /swapfile

Rerun, the command to confirm that the swap is available.

free -h

2. Installing Docker

Now, let’s install docker into the machine. Set up the docker repository by running the following.

Once the repository has been set up, let install Docker CE

Finish the docker setup by verifying the installation by running,

3. Installing Sentry on-premise

Now, clone the sentry on-premise repo using the following command.


Then cd into the folder and create a file and copy-paste the contents in the below file. Make the necessary changes in the config section on the top of the file before you begin the installation. The system.url-prefix will be the URL where the sentry will be available after installation. (Note: You need to config domain accordingly on your webserver).

cd onpremise && sudo nano installer.sh

The above script is available on the internet and credit goes to the original author. The script will ask you to set up the default credentials during the process. Please note that the whole process can take some time based on your server capacity. If the process exited, it means that your server doesn’t have the required memory to run the process, either increase the swap or consider upgrading to a better machine.

Sentry Docker Install For Mac

Sentry docker install for chrome

Once installed, you can navigate over to the following address and finish the final stages.


4. Setting up Nginx

Setting up Nginx to serve your custom domain.

Install Nginx by running the below command.

If you now navigate to your server IP address, you will be seeing the Nginx welcome page.

Add a configuration for your site.

Then paste the contents. Note: This is a bare minimum installation, add the security measures if needed.

Now, enable server blocks and restart nginx.

5. Add HTTPS using LetsEncrypt

Finally, we are adding HTTPS using Letsencrypt. Install certbot using the command.

Install Sentry Docker Compose

Once installed, generate a new HTTPS certificate using

sudo certbot –nginx -d sentry.yourdomain.com

Now, you can log in to sentry.yourdomain.com with the credentials you set up during the installation process; Now you have successfully set up sentry on-premise. If you liked our tutorial, you can read about our how-to article on Redis CSV import.

Docker Install Ubuntu

Let us know what you think about the tutorial in the comment box below.

Most Viewed Posts