Having a good CRM is a no brainer. SugarCRM is an excellent SalesForce alternative if you're looking to save money.
Running SugarCRM on a Raspberry Pi costs less than $5 a year, and best of all, you own the data.
When I was freelancing, I used SugarCRM to manage accounts, contacts and relevant information through the engagement as it has all the features that both freelancers like myself and outside sales people need for collecting and retaining customer information.
SugarCRM comes two ways:
- there is an enterprise version that you could pay a lot of money for.
- there is a free community supported version. <-- We're using this one!
When it comes to looking for a good CRM that's perfect for just a one-man-show, I found that the community version offered more features than I needed, but had exactly what I wanted too.
SugarCRM, like other CRMs offer account and contact management with the ability to upload documents, keep notes and track collected information about a client, but with a major plus:
The Self Hosted SugarCRM Community Edition is Free.
Back when I used it, I didn't use the advanced features such as mail campaigns or the collaboration tools available, but they are there in case you decide you want to use them.
Perfect For Freelancers
Being a freelancer myself back then, it was more important than ever to have a centralized place for all customer and account records that included a history of what I'd done, and the vital information about that client in case I needed to refer to it at a moment's notice.
Freelancers also don't have the big budgets that large corporations have, so getting SalesForce (in any meaningful way) is out of the question due to price. I personally didn't like having to pay for a service month after month just to retain my customer's information either, so the Raspberry Pi running SugarCRM was the perfect way to go.
Less Than $5 A Year To Run 24/7/365!
At the time, I was running Sugar CRM on aRaspberry Pi Model B (512MB RAM), and was powering it with a 1.0A Android USB wall charger. It worked well for my needs, and even with close to 75 accounts and tons of information about each one loaded in, it still ran great (Albeit slower than getting a "real" server). I never really needed speed. 1.5 - 2 second page load times didn't bother me much. I was just glad I wasn't paying $50 a month or more for a CRM.
Tip: Page load times are shown in the footer of each SugarCRM page as "Server response time: X.XX seconds."
2016 Tutorial: Installing A Self Hosted SugarCRM On A Raspberry Pi
Right now I still run SugarCRM, and it sits on a Raspberry Pi Zero.
The speed is comparable to that old Pi Model B that I used to run the CRM on, and page load times are about the same. The biggest reason that I'm using a Raspberry Pi Zero is that it's only $5 for the computer, and I have all the extra components needed to setup and run the Zero. If you aren't familiar with Raspberry Pi's, the Pi Zero isn't going to be the best model to learn on (see bottom of this article for more details why).
Additionally, after you get all the extra parts that you need, your price is about the same, if not a little more than just buying a Pi 3, model B that offers four processor cores and 1GB RAM memory (4 times the power).
What You Need To Create A SugarCRM Raspberry Pi 3
We are going to be using the Raspberry Pi 3 for this tutorial. I chose the Pi 3 for it's increased power and embedded wi-fi module (Wi-Fi was not included on previous Pi mainboards).
You will also want to have the following:
- Keyboard & Mouse
- 8GB MicroSD Card or larger (up to 128GB)
- Raspberry Pi Case to protect your Pi
- HDMI cable for your monitor
- A Monitor of course that has HDMI inputs
- HDMI to VGA Adapter if your monitor doesn't have HDMI
- At least a 2.1A USB Charger and MicroUSB Cable
Rather than try to buy all the parts separately, I just got the CanaKit Raspberry Pi 3 Starter Kit. It comes with everything that's needed to get started other than keyboard, mouse and monitor (which most people have in their houses or at work anyway).
The CanaKit Pi comes with a 32GB Class 10 MicroSD card that has the NOOBS operating system pre-installed so you don't even have to take the time to install that. Just plug everything in and power the Pi 3 up!
NOTE: While there are ways to do the initial installation and setup without a keyboard, mouse and monitor, those techniques are more difficult and not for the faint at heart. I will stick to the easiest method here by doing the initial configurations with a mouse and keyboard.
Raspberry Pi 3: First Boot
The first time you boot up the pi, you will be greeted by a splash screen with the Raspberry logo and a small window that says "Resizing FAT partition". The Raspberry Pi is essentially setting up the space needed on the MicroSD card automatically. Just wait for this to complete.
Once the resizing step is complete, you'll see the NOOBS install window pop up with the "Raspbian [RECOMMENDED]" line next to a check box. You may or may not see other operating systems below the Raspbian line, but it doesn't matter because we're selecting Raspbian anyway.
Once selected, click the Install button on the top left to install the operating system.
The initial installation will use up about 4GB of disk space, so if you have an 8GB card, you'll have just under 4GB left for file uploads -- not much space.
This is why I highly suggest using a 32GB card at the very minimum.
The Raspberry Pi runs most 128GB brand name MicroSD cards, and even some of those cheap generic Chinese MicroSD card found on Wish, BangGood and other online outlets.
The installation process can take up to an hour, so just go do something else and come back to check on it in a while. You won't need to put in any other information.
Next Steps: Raspberry Pi Configuration
Once the installation completes, you'll be greeted with a nice desktop. At this point, the Raspberry Pi 3 is a small computer that can be used for light web browsing and other stuff.
Connect To Wi-Fi and Get The Raspberry Pi's IP Address
On the top right, you'll see the Wi-Fi icon.
Click on that icon once and wait for the wireless networks to appear after the Pi finishes searching. Select yours and enter the password if you have one set (you did set one, right?).
Now hover over the wi-fi icon again without clicking on anything. You will see your Raspberry Pi's IP address (will look something like 192.168.1.2 or perhaps 10.1.1.2). Write this down.
Perform Initial Configurations
From the raspberry pi icon in the upper left, you'll see preferences, and in the flyout menu, there's Raspberry Pi Configuration. Select that.
A window will open with four tabs at the top. You will start in the "system" tab.
Click the "change password" box and change the password for the current user "pi" (you automatically log in a pi).
You can change the hostname if you wish, but it is not necessary.
You can choose to boot to either the desktop (what you're in right now) or just the command line (advanced users).
Select "login as Pi" if you want to automatically have the Raspberry Pi log in for you (if not, you'll be prompted for username and password).
Now, go over to the "Interfaces" tab and enable SSH (command line access)
Finally, go over to the Localisation tab and set the locale, timezone, keyboard and Wi-Fi country.
Save by clicking the "save" button on the bottom in the box.
The Pi will ask you to reboot.
Go ahead and reboot now.
Introduction To The Terminal
Once the Raspberry Pi 3 comes back online, you will need to open the terminal to do the next part. The terminal allows you to input text commands to do things like install the software needed to run SugarCRM.
Look up towards the upper left of your screen and find the icon that looks like a computer monitor and click that. A black screen will come up with a line that says something like this:
This is the command line, and you'll see a small grey rectangle to the right of the dollar sign. The terminal is now awaiting your input.
NOTE: the latter part after the at sign (@) may be different depending on if you changed your hostname in the raspberry pi configurations above.
Updating the Raspberry Pi 3
The first command that you'll want to run is this:
sudo apt-get update && sudo apt-get upgrade -y
Simply put, you're updating the software already on the Raspberry Pi. It's much the same as doing windows updates ( *Shudders* ).
This process can take 20-30 minutes so it's a good time to refill your coffee cup.
You'll want to keep checking back on this because there are points in the update where it asks you questions about the installation. For beginners, just type "Y" for each of these questions to accept changes.
You'll know the process is done with you see this line again:
Installing The Server Software
Now it's time to install the webserver software needed to run SugarCRM. This process is pretty simple, and for you, it's just cut and paste for the most part.
sudo apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-mysql memcached mysql-server mysql-client -y
IMPORTANT: During this installation process, you'll be asked to enter a new password for the MySQL Database user, "root". This password should be different from the password for the "pi" user. Write this password down as you'll need it during the SugarCRM installation.
When the installation is complete, you'll see the prompt again:
Your webserver is now installed, and if you go to the IP address that you wrote down in a browser window, you'll see the apache2 default page.
Installing SugarCRM On The Raspberry Pi
Now it's time to install SugarCRM. You should still have the command line open for this process.
On the command line type this and hit enter:
Now remove the default HTML file:
sudo rm index.html
Check to make sure that there are no other files or folders inside the HTML folder:
If there are, you remove folders with this command:
sudo rm -rv folder-name
and files this way:
sudo rm filename.extention
Once the folder is clear, it's time to download and install sugarCRM. Open the Chrome browser and go tohttps://www.sugarcrm.com/download-sugarcrm-community-edition-free-b
Fill out the registration form and download the installer file. Make sure it downloads to the Downloads folder for the following commands to work.
Move the file to the html folder:
sudo mv /home/pi/Downloads/SugarCE-6.5.24.zip /var/www/html
NOTE: The filename SugarCE-6.5.24.zip may be different on your download. Check your zip file for the correct filename! In this tutorial, I will refer to the download as "SugarCE-6.5.24.zip" because it's the latest copy at the time.
Next, you want to unzip the file.
sudo unzip SugarCE-6.5.24.zip
You will see a bunch of text fly up on your terminal console as the file unzips. When it finishes (under 1 minute), it will have effectively placed all the files into a folder called SugarCE-Full-6.5.24 (where the numbers are the release version) within the HTML folder.
You have to move the files out of the SugarCE-Full-6.5.24 folder and into the HTML folder with this command:
sudo mv /var/www/html/SugarCE-Full-6.5.24/* /var/www/html/
Again, the folder name might be different for you, so make sure you're using the right folder name and not just copying my commands blindly.
At this point, all the files are in place and ready to go, however... You need to create the database where SugarCRM stores data. Don't worry... This is really simple and easy.
Log In To MySQL and Create The Database
Run the two commands below:
mysql -u root -p
MySQL will ask you for a password. Remember, when you installed the webserver, I told you to write down the database password? This is the password that it wants.
Next, create the database:
create database crm;
where "crm" is the actual database name (you can change this if you want).
Exit MySQL and back to the command line:
MySQL will confirm the exit by printing "bye" on the screen, and you'll find yourself back at the command prompt:
At this point, all your command line setups are completed. It's time to do the SugarCRM installation in the browser.
Open chrome browser if it's not already open.
There are two ways to get to the installer. The first is to type in
http://localhost/install.php and the second is to type in the IP address:
I have always used the latter, and just typed in the IP address.
You should be greeted with a splash page where you can select your language (English is already selected by default) and then click the red "next" button in the lower right.
The next page will go over the installation and prepare to do an initial system check to make sure everything is good prior to install. If you've followed this tutorial exactly, everything will check out, so just click next.
On the next page, you must accept the community edition license agreement, so click next.
Select "Typical Installation" on the next page and click next.
MySQL Database details need to be filled out. The database name in this tutorial is "crm" as we setup when we created the database above. If you changed your database name, it would be whatever that is.
The hostname is "localhost"
The database administrator username is "root"
Database password is the password created when you installed MySQL and wrote down.
There is a dropdown box to the right in the center of the install window. Make sure that "Define user to create..." is selected.
** a note about using the root user for database connections: Since we're running SugarCRM on a Raspberry Pi and it is not a full production webserver, using the root user is acceptable, however, if you wish make this installation accessible from the internet, a different username and password with privileges to only the CRM database should be created for security purposes.
The SugarCRM database Username and Password can be created by you. You do not need to write this username and password down. It is just the user that connects the SugarCRM MySQL database.
You can populate your installation with demo data if you wish, but I don't because I'd end up just deleting it anyway.
Now it's time to add the Administrator Username and Password. This is the username you'll use to log into SugarCRM, and gives you full access. Choose carefully, and make sure to remember the username and password.
Finally, on the last screen, at the bottom, there is a line that reads "To setup crontab..." The line below that looks something like:
* * * * * cd /var/www/sugarcrm; php -f cron.php > /dev/null 2>&1
copy this line and go back over to the terminal, and type this in your command line:
sudo crontab -e
The terminal will ask you which editor you want to use to edit cron. Select "Nano", or option #2.
In the file, move the cursor all the way to the bottom and paste the line into the file. Usually a right click and paste works, but if you cant, then type the line in manually exactly as it's shown in the browser.
When complete, hit CTRL+x and then Y to save the file.
Now go back to the browser and go to
http://<Raspberry Pi's IP Address>/
You should be greeted by a login screen where you'd put your administrator username and password in to access the dashboard.
Once you get to the dashboard, everything is working, so you can delete the install.php file.
Go back to the terminal and run the following command:
sudo rm /var/www/html/install.php
This removes the file, and your setup is 100% complete.
Using Sugar CRM for Freelance Work
So as I mentioned, I used SugarCRM for freelancing, so there's a lot of stuff here that you just will not need. There really is only a few really important parts to the CRM that you need.
Under the sales tab, found right below the logo on the upper left, there is a sub menu that has Home, Accounts, Contacts, etc...
The process of creating your client accounts is a bit backwards: You need to create the contact first, and then the account, even though the tabs show accounts first. Remember, this is just how I did it for freelance work, and isn't exactly how SugarCRM's user manual says to do it.
Contacts - Contacts are the people that you call and email. If it's just a single person that has contracted you to work for them, I put their contact information under both contacts and also as the Account.
When you fill out the contact information, notice that on the left side there is a field for "account name". You associate an contact with an account by clicking the arrow and either creating the account or selecting it from the list below in the pop up window.
Accounts - These are your clients that have signed agreements for you to work for them. The Company or Individual's information goes here when you create a new client.
This might be confusing at first, but you'll notice that the fields in "Accounts" when creating a new account are more geared for business information, such as web address, billing address, shipping address, and such.
If the person that has contracted you doesn't have a business, like they're just a friend of a friend, all you put into the account creation page is just their first and last name into the name field as that's all that's really required. Put the rest of the contact info into the contact tab under a new contact.
Here's the process if you're getting confused.
Lets say that Donald Duck is an inventor that needs a website. He is not associated with a company, organization or business of any kind, and he's paying me out of his own pocket.
- I would first go to contacts, and create a new contact.
- I would enter Donald Duck's name, address, phone, email and other relevant information in the new contact form.
- I would then select the arrow next to the Account Name field (on the left below Department).
- A pop up window opens where I can fill out data for a new account that the contact will be associated with.
- I click the "Create Account" button found right below the search and clear buttons on the left side, and fill out Donald Duck's name on the "Name" line since he doesn't have a company name.
- I click the save button, and you'll see Donald Duck's account name appear in the account list. click on that.
- The window will close and you'll see that Donald Duck's account name shows up under "account name" now.
- When you save the contact, they will be associated with the Account.
- Now, from the Sales tab, select "Accounts" and then click on a specific account in the list of accounts.
- You'll see all the relevant account information on the page, and if you scroll down, you'll find the "History" section where you can create a new note or upload attachments.
- To add tasks (to do's), Go to the activities section, and you'll see the button for "Create Task"
- You'll also find the Contact person (Donald Duck in my case) under the "Contacts" section. Clicking their name brings up their phone, email and other info.
It's possible to use the system for emails if you enable IMAP mail transport from the command line:
By enabling this, SugarCRM will be able to send and receive emails from an account that you designate in the "Activites" tab under "Emails".
You can reach the full email configuration page by going to
http://<Raspberry Pi IP Address>/index.php?module=EmailMan&action=config while logged in, or clicking the Admin link in the far upper right, and then on the administrator dashboard, go down to the "Email" section and click "Email Settings".
When you've entered the mail information, click done, and the box will disappear.
When Mail is enabled, it is also possible to setup meetings right in SugarCRM from the "Meetings" link under "Activities". When you set up a meeting, anyone that you add to the meeting will be automatically emailed with a meeting request.
Backing Up Your Data
Backing up your data is crucial. No one wants to lose all their customer data, and with SugarCRM, the back up process is a two part process of backing up the files and then the database.
From the administrator dashboard, go to "System" and select "Backups". You'll be greeted by the SugarCRM's backup panel. You have to put in a directory where backups will be saved, and the filename.
The best way to do this is to enter the following in the Directory field:
and create a meaningful file name for the backup and append ".zip" to the end of the filename. I always did a year, month, day naming convention: 01012016.zip, for example.
This will place your backup right in the HTML folder.
To download your backup to another computer, on that computer go to
http://<Raspberry Pi IP Address>/<name of backup>.zip, so if I named my backup 01012016.zip, then the URL would look like this:
Provided that you put in the URL correctly, the file will download like any other file you download through your web browser.
Now it's time to backup the database. Run these series of commands:
mysqldump -u root -p<passwordhere> crm > crm.sql
In the above example, "crm" represents the database name. If your database name is different, obviously, put that name in.
Also, for the -p<passwordhere> part, use your mysql database password that your wrote down, so if my password was "password123" (which it's not :D ), then the entire line would read as follows:
mysqldump -u root -ppassword123 crm > crm.sql
What we did was make sure we were in the HTML folder first. Then we backed up the database with the mysqldump command.
Finally to download the database, from another computer do the same thing as you did for downloading the backup file above:
http://<Raspberry Pi IP Address>/<name of backup>.sql, so since I named my backup "crm.sql", then the URL would look like this:
Provided that you put in the URL correctly, the file will download like any other file you download through your web browser.
Closing Notes About This Project
** Designed for Internal Home Network Use **
As I said before, the SugarCRM / Raspberry Pi solution is really only meant for a single person freelancer that doesn't really have more than 100 - 150 clients. While the Raspberry Pi 3 will do well with even 1000 - 2000 clients, it again isn't really mean to be a full production-use SugarCRM solution used by an agency or small business.
I did not go into how to access the SugarCRM Dashboard from the internet because it opens up your client data to possible security intrusions, and I did not go into security in this article to keep things simple for beginning users.
Having the Raspberry Pi on your home network is fairly secure. If you're really worried about the safety of your client data, then power off the Pi when not in use.
Raspberry Pi Reliability
The Raspberry Pi is a very reliable computer. With no moving parts, the chances of failure are extremely low. In fact, you'd be more likely to see the Pi go down due to a power outage than an actual part on the Pi fail.
On that note, I currently have one Raspberry Pi Model B+ (running as a webserver) that has an uptime of 694 days now (almost 2 years at the time of this writing) without fail. It sits on an APC ES550 UPS power supply and is the only thing on the backup power supply that has the backup power. (everything else on the UPS is connected to the surge protection only side) With the extremely low power consumption of the Raspberry Pi, it's possible (by doing calculations) that the Backup could keep the Pi running for over 30 days alone, although I've never had the guts to actually test it.
Additionally, the Raspberry Pi doesn't get hot, so you don't need a fan to keep it cool. You will notice that it gets warm, but not hot to the touch. If you get the CanaKit that I got, you'll find two heat sinks in the box that attach to both the main processor and the GPU (graphic processor) to assist with keeping the unit cool (but they're really not necessary for this purpose). Heat is one of the biggest factors for hardware failure, and since the board really doesn't get hot, you run a very low risk of parts burning out or the mainboard suffering some kind of critical hardware failure.
Dual Use Computer
While we set this Raspberry Pi up to be a webserver for you to access from another computer in your house or office, I intentionally left the desktop software intact so that you could also use the Pi as a lightweight desktop. You'll notice that there is LibreOffice installed, which gives you a Microsoft Office like office suite and if you're board, there's MinecraftPE installed under the Games menu.
The best part is that your pi can run the desktop and the webserver at the same time, so you can let your pesky kid can play minecraft while you access client information and get work done ;D .
Is SugarCRM Overkill For A Freelancer?
Given all that SugarCRM can do, running it as essentially a contact database might seem a bit like overkill.
This is how I feel about it: I own my own client data. No one else sees it. It's not out there on the internet. I'm not sharing it with Google, Hubspot or Salesforce (check out their TOS if you don't believe me). To me, that's vitally important. Your hard earned client data is yours and those clients shouldn't be approached by your CRM company as potential leads.
Second, SugarCRM is a bit more than a contact database in reality. With a centralized spot where I keep notes, files as well as other essential client data, it had become one of the most useful tools for client engagement. SugarCRM really helped to keep all my records together and in once place. Neatly filed under each account too!
SugarCRM Can Run On A Raspberry Pi Zero
The Raspberry Pi Zero is a $5 version of the Pi. It's very basic and requires moderately advanced skills to setup as a SugarCRM webserver. While the installation process is the same, the hardware on the Pi isn't as beginner friendly as on the Raspberry Pi 3.
First off, there's no Wi-Fi built in so you'll need a USB dongle. Second, the USB ports are MicroUSB form factors, so you'll need an adapter. On top of that, there's only one USB port too. Both the USB port and the Power ports are MicroUSB size, so you'll need an OTG adapter for the USB port.
Additionally, there is no Ethernet, so you need a self-powered USB hub to plug a Wi-Fi dongle into along with mouse and keyboard. Lastly, the HDMI port is a mini HDMI size, not full HDMI size so you need an adapter for that.
Obviously, if you don't have access to all of these to begin with, it's more cost effective and easier to just buy a RPi 3. Since I do however, have all those items available, I created a SugarCRM instance on the Pi Zero, and when complete, I removed keyboard, mouse, USB Hub and HDMI. The Raspberry Pi Zero just has the Wi-Fi dongle attached along with power, and chugs along happily with about 120MB of memory while running SugarCRM.
There isn't a substantial difference in power consumption between the two Pi's, so that's really not a factor. What is, however, is the size. The Pi Zero is extremely small so I just put it out of the way and don't really have to think about it further.