Today’s society moves fast. We’re consistently bombarded with news and social media posts and, even with FOMO (Fear Of Missing Out), it’s easy to get overwhelmed with everything going on in our lives and forget important dates and events.
Now that we’re going out and doing more in the world again, attending more gatherings, we’re meeting new people, and more stuff is going on in our daily lives, so sometimes it’s easy to forget details about people we’ve just met or even about people we’ve known forever.
Monica makes keeping track of all this MUCH easier. It is an open-source personal CRM.
Monica helps you organize the social interactions with your loved ones.
Let’s take a look at getting an instance of Monica’s personal CRM set up in Docker on Linode.
Prerequisites for Monica in Docker
First things first, you’ll need a Docker server set up. Linode has made that process very simple and you can set one up for just a few bucks a month and can add a private IP address (for free) and backups for just a couple bucks more per month.
Another thing you’ll need is a domain name, which you can buy from almost anywhere online for a wide range of prices depending on where you make your purchase. Be sure to point to the domain’s DNS settings to point to Linode. You can find more information about that here.
You’ll also want a reverse proxy set up on your Docker server so that you can do things like route traffic and manage SSLs on your server. I made a video about the process of setting up a Docker server with Portainer and a reverse proxy called Nginx Proxy Manager that you can check out here in the first blog post and video from this series
Once you’ve got your Docker server set up, you can begin the process of setting up your Monica instance on that server.
There are 2 primary ways you can do this:
- In the command line via SSH.
- In Portainer via the Portainer dashboard.
We’re going to take a look at how to do this in Portainer so that we can have a user interface to work with.
Head over to http://your-server-ip-address:9000 and get logged into Portainer with the credentials we set up in our previous post/video.
On the left side of the screen, we’re going to click the “Stacks” link and then, on the next page, click the “+ Add stack” button.
This will bring up a page where you’ll enter the name of the stack. Below that you can then copy and paste the following:
This Docker compose file / stack tells the system to download the latest official Monica image to the Docker server, name the container “monica”, attach it to the “nginxproxymanager_default” network, mount it to the directory “home/docker/monica”, and make it available on the docker server’s port 6875.
You can change the path of where you’d like to store the Monica data if you’d like. Just make sure that the folder has the correct permissions to be written to.
Be sure to change the database passwords for security.
Also, the “APP_KEY” should be changed to a different long, random string of characters.
Once you’re happy with the settings here, we can deploy the container by clicking the button that says “Deploy the stack”.
This will start the process of downloading and deploying Monica on your server. You’ll know that the container has been deployed once the page reloads and you see all your running containers.
Now you can go to http://your-server-ip-address:8456 and you should be able to see the login screen for Monica.
At this point, you could log in to the site and get started, but we want this to be accessible from a subdomain, so let’s get that taken care of now.
Setting up a domain and SSL
Head back over to your Linode dashboard and go to “Domains”. Then find the domain that you added to your account. Click it and then look for the CNAME section of the domain management.
Add a CNAME to your domain by entering a hostname entry for what you’d like your subdomain to be. In the example video, I entered “monica” (without the quotes). Below that, I entered the @ symbol in the “Alias to” box and then clicked “Save”.
Now that you have that done, we can head over to Nginx Proxy Manager and set up our SSL and domain.
Now you can go to http://your-server-ip-address:81 and you should be able to see the login screen for Nginx Proxy Manager.
The default credentials for Nginx Proxy Manager are:
Email: [email protected] Password: changeme
Enter those credentials (or yours if you’ve updated them) to log in to your Nginx Proxy Manager instance.
Click on the tab at the top of the page that says “SSL Certificates” and then click on the “Add SSL Certificate” button near the top right of the page.
Next, click the “Let’s Encrypt” option.
On the pop-up window that appears, enter the full URL of the domain you’d like secure and press the “Enter” key on your keyboard.
In this example, you would enter https://monica.yourdomain.com.
Once you’ve entered your URL, click the “Test Server Reachability” button right below that. If you get an error message, be sure to correct the issue and try again. If no errors are returned, make sure the email address on the page is correct, then read and agree to the Let’s Encrypt Terms of Service and click the “Save” button.
It may take a minute or two for the system to generate and install the key, but when it’s done, the page will reload and you’ll be able to see all of the available SSLs in Nginx Proxy Manager.
Now that we have our SSL set up on our system, we can click the “Hosts” tab across the top of the page. Then click the “Proxy Hosts” option that shows up in the sub-menu.
Locate the “Add Proxy Host” button near the top right of the page and click it.
A new window will pop up and we’re going to fill in some options to configure our domain.
Enter the domain or subdomain you just created the SSL for.
Leave the Scheme as HTTP.
Enter the IP address of your container. This can be found in Portainer:
For the “Forward Port” textbox, enter the container port. In this case, it’s 80. The 8456 that we see in the “Published Ports” section of the image above is what we’ll call the Docker port. We want the port on the container side of things so we’ll use the number on the right side of the semi-colon.
Click the options for “Cache Assets,” “Block Common Exploits,” and “Websocket Support.”
Now click the “SSL” tab on the top of the pop-up window.
You’ll see a dropdown that says “SSL Certificate” and, below that, “None.”
Click “None” and then select the SSL you created in the previous steps.
Now check the 4 options that are below that, then read and agree to the Let’s Encrypt TOS and then click Save.
After a moment, the page will reload and you should see your new entry on the Proxy Hosts page of Nginx Proxy Manager.
Now you can head over to your new URL in your browser.
You should be taken to a login page that looks like this:
Fill out the registration form with your information, check the box about the TOS, and click the “Register” button.
Once you’re logged in, you’ll be able to start creating or importing your contacts. Before you do that, though, be sure to go into the settings icon (the gear) in the top right and adjust the settings to your needs. Pay special attention to the “Personalization” tab on the left side of the screen so that you have the data fields for your setup that are just what you need.
You can always come back and change/update them later as you need, so don’t worry about getting it right the first time you log in.
Start Adding Contacts
Now that you have your Monica instance up and running, you can now start keeping better track of your daily interactions, relationships, and more. You never know who you’ll impress by remembering an anniversary, birthday, or any other special event!
Alternatively, you may try cloud-based CRM if not ready to install and manage one by yourself or need more features.