Introducing Twenty CRM: The Open-Source Salesforce Alternative
Hey everybody, welcome back to Jim's Garage. Just a quick video today to demonstrate a product I think that some of you might be interested in. It's called Twenty and it's trying to go toe-to-toe by creating a free open-source alternative to the behemoth that is Salesforce. Good on you guys.
So, in this video, I'm going to talk a little bit about what this product is. I am no CRM expert, so don't expect that from me, but I will show you how to set this up and some of the features this got, as well as a brief overview of the actual interface itself. If you're a small medium enterprise, perhaps this is the perfect kickstart for your business. It's going to give you all of the tools that you would normally have to pay a lot of money for, and hopefully it'll boost your productivity. Let's have a quick overview, then we'll jump into the configuration, and then onto the deployment and checking this thing out.
Website Tour: Features, Pricing, and Deployment Options
So, hopping over to their website, they're touting themselves as the number one open-source CRM, which is probably true. There's over 32,000 GitHub stars on this, so there's a lot of people following this project. If we have a quick scroll down, we can see some of the features here. We've got the ability to import, customize, and automate workflows. Plus, all of the features also of this CRM that you'll see in bigger CRM like Pipeline and Salesforce. The ability to have tasks, Kanban views, notes, all of that sort of stuff. The real beauty here obviously lies in the power of open-source. So you're able to deploy this on your own infrastructure without having to worry about licensing fees etc.
I will need to check the finer details just around the licensing for this but I believe it's open license so there aren't any costs to incur. There might be a paid model in the future but I believe they've committed to providing this open source for the future. So if we do have a quick look at the pricing, you can see that this is a hosted solution. They have both the pro and the organization license. So the instructions I'll be using for this video are taken from this part here, the developers. Then we're going to do the self-hosting. Now you can install this without Docker. You could do that by going to the local setup. And it's just like installing any other product. You can use Windows Subsystem for Linux or you can put this on Linux or macOS. I'm going to do the Docker version. So, this is the guide that I'll be using here.
Docker Deployment Strategy and File Overview
And I'm going to hop over to VS Code now because there's a few things that I want to configure for my instance and you might as well. Now, I will be using a reverse proxy for mine so we get all the goodness of SSL certificates and proper URLs in the browser etc. But you can just follow the instructions on here to set it up kind of with an IP and a port. I'll also call that out in a moment in the docker compose file which bits you would want to remove if you want that setup.
So let's hop over now into VS Code. Let's have a look through the options and the setup parameters. Now I'm going to be doing quite a vanilla deployment, but there are a myriad of options in here. We'll have a look at some of those that come in the default environment variables, but also do check out all of the documentation here because there's a wealth of stuff here under the hood. You might want to take advantage of it. Now thankfully there's only a couple of files we really need to have a look at here. We've got the docker compose file itself and this docker compose file takes advantage of a .env file. So we'll have a look through the compose file first and then we'll have a look at the environment variables and you can see some of the options that we have available to us.
Dissecting the Docker Compose File
So this actual product is made of four containers. We've got the server which is here and this is the bit that we are reverse proxying. You can see that here. I'll go through this in detail in a moment. We've then got the worker which basically the server will plug into the worker. It does the work. And then below that we've got the database where we get the persistent storage of everything we put into this. Also user accounts etc. And then we've got Redis which is a key memory values. So for speeding this up if you're doing this at scale. We do have some Docker volumes. You can obviously bind mount if you want but I'm using volumes to make this easier. And a couple of networks. So let's have a quick look and go through this. We're using the version tag of latest here.
We've got this server local data volume where everything's going to be stored. And I've left the port in here so that you can access this still through the IP in the port. And if you just want to use that for getting this up and running and you don't want to use a reverse proxy, you just need to delete down here these labels for the proxy and delete the proxy network, that should be fine. So by default, this is going to run on port 3000. And then we get on to these environment variables here. So essentially really we're just creating some variables for the database itself and what that looks like. And as you'll note here these brackets here with the dollar sign these are environment variables. So I've just generated this long string here for the database password and similarly the app secret as well for this app the kind of web token and that will go here. You can use this command here the openssl rand -base64 32 for that.
So for example, if I just pull up the terminal and if I just paste this value in, we'll get a string like that. You can also as well because the Postgres password up here that can't have slashes in like down here. So the easiest way to get around that is just to change this base64 to just a hex and that should now give you again a long token that doesn't have the slashes in which are illegal characters.
Configuring Environment Variables for Deployment
Now, you will notice in here as well a number of things which are just left out. That's because I've got this set up as basically a vanilla install. So, if you were using something like S3 storage, which is awesome to see that that's natively supported for more of a cloud-based deployment, you can put in your details here.
Now, going back to the Docker Compose file, you'll also see that some of those variables are actually referenced here and they're commented out. Now, for the ones that aren't commented out, strictly speaking, you should probably comment these out if you're not using them like that, for example. But if it does come up with a zero value, it will just throw a warning when you try to spin this container up. But it should work. After that, really, we're just specifying the server URL here, the Redis URL, and these are just the other containers that are in this stack.
If we scroll further down, we do have a health check for this container, which is great. And I've just created two networks. There's the Twenty network which all of these containers reside upon. And then there's a proxy network because we're going to proxy the front end which is that little demonstration I gave at the start of the video that was using my locally deployed instance and what we'll get into a moment when we actually go and deploy this. So here I'm basically just saying that we'll be able to reach this on 20.jimsgarage.co.uk.
If you've never set up Traefik before, please go and follow my video and that should get you up and running in no time. That uses Let's Encrypt so you don't even have to pay for the certificate that you're going to be using. So, all of this is free and open source, which is awesome. Next, we get on to the worker. And again, there's nothing really to write home about here. We're specifying the same volume that we did in the previous one. There's some commands for when this actually starts up. And then we're referencing basically the same container. So, we're referencing the database, the actual server, that's the one we just went through, and also that container as well, which is going to help to sort of scale this up with multiple users, improve performance because it's going to be writing to that in memory, not to the disk.
Again, we could comment this out because I'm not using S3 storage. I'm just using local storage. Here we are referencing this app secret which is in here. This one here.
And then we've got a load of other stuff as well where we can tie this in with different authentication clients which is again is awesome to see. So we can use things like Google or Microsoft or all of that sort of stuff. And we can also tie into SMTP for emails. Obviously, if you're going to be using this in the business, you may well just want to tie back to an established authentication provider or maybe you want to use something locally hosted. I don't know, something like Keycloak, for example. And you also probably want to set up something like email because a lot of the benefits of this software are the team collaboration. And you can set up things like notifying people via email when there are tasks to be completed. The documentation for setting up emails is available on their website, but again, it really is just as simple as grabbing your SMTP credentials and plugging those in here. I won't go through that in this video just because it's a pretty standard setup. If you've done it once, you've done it a million times.
Finalizing the Database, Redis, and Network Configuration
Next, we get on to the database. And again, this is pretty straightforward. We're just creating a volume for the data. We're creating the user and password. And we've referenced those to the other containers so they can actually gain access to this database, can create the initial tables but then they can also subsequently access it to retrieve that data that's being saved to it.
Finally, we've got Redis again that just sits on that network and this will be referenced from the other containers so it can take advantage of the speed. We've defined the volumes down here and then we've created the networks. We've said that the proxy is external true. That's because if you follow that other video I mentioned we create the network when we create that container. So in terms of this stack it's external. We're not creating it in this stack. It was made externally. So for now, let's fire up the terminal and then we'll get this installed for the first time.
Deploying and Verifying the Twenty CRM Stack
To do that, I've just navigated to this location where I've got the compose and the environment variables. And I'm just going to hit return. That should go away. You can see here actually those warnings. So if you do want to, you can just delete those or comment them out.
It's pulling the containers now. And hopefully we should have this up and running any moment. Now do remember if you are going to be using the proxy labels up here. So you are setting this to a domain. For example, I've put 20.jimsgarage.co.uk. I have added that to my local DNS resolver which is Pi-hole. If you don't know what Pi-hole is, again I've got a video you can check that out. You could obviously stick this in your host file or also on your firewall, whatever you're using as your local DNS resolver.
So now that's pretty much completed. We're just waiting on the database to actually establish and then pass the health check. And now that it's passed the health check, the server is actually going to start up and connect to it. So I'm going to hop over now quickly into Portainer. Just have a quick look what this looks like and see if the logs all check out. So here you can see that we've got the Twenty those four containers here that's in that Twenty stack. They're mostly created and starting. So if I have a quick look at the database that looks fine, ready to accept connections. Redis is up and running as well. Ready to accept connections. The server is now healthy green and the worker is running. All of these logs look fine as well. So with any luck, we should now be able to hop into the browser and go to that 20.jimsgarage.co.uk and we should reach the login page for the first time.
First-Time Setup: Creating Your Workspace and Admin Account
So going to that URL, we should get the first login. The first thing it's going to do is ask us to create an account. This is basically the administration account. So putting in my email address, we're going to hit continue. Then it's going to ask us for a password. So go ahead, create a password and then we can sign up.
You can now add things like a logo for your business and you can obviously name your organization. And once you've done that, you want to hit continue. It's then going to start creating your workspace in the background. That's kind of what you can see here. And now we get to create the profile. So this is for you, the first user that's logging in. So I'll put in my details and then click continue.
This is asking us whether we want to share this with our team. Obviously, you make the decision that's right for you. I'm just going to share everything and assume we're working in the same team where everyone can see everything. Then it's going to ask you if you want to go and invite people, which is great, or you can generate and copy an invitation link, which you could then paste to somebody and they could access it. So, for example, you'll get the URL here, and then it'll be some unique code for a one-time activation. So now we're going to hit finish and we should get into the video you saw at the beginning of this video which is just the demo accounts that are created in here.
Touring the Main CRM Interface: Opportunities, Tasks, and Notes
Now I'm not a CRM expert. I loathe sales but this looks pretty similar to some of the features that I've seen in things like Pipeline and Salesforce. So to anyone who's used to a CRM hopefully some of these things look familiar. We can go through we can see the people in our team. We can see the people we've got assigned to things that we're trying to pursue, different clients, etc. We've got opportunities down here. So, we can add new opportunities for, I don't know, let's put in Apple, and then we're going to try and get Apple in here. We'll have some company details, who's the point of contact. We'll have a bunch of tasks we want to put in here, like, I don't know, go and meet them, try and pitch a deal, those sorts of things. And we might want to then continue tracking that through to sort of execution, closing of deals, etc. We can add some notes and we can even put some supporting files in here which is awesome especially when you consider that you're going to be able to share this with your team members and all of that sort of stuff. So if we click that we can then create that and we can open it and then hopefully we can see different stages now. So we've got a new stage here and as we move on we can put that in. So for screening meeting proposal and then hopefully by the end of it you win the business and they become a customer.
Then you can also have tasks. And so if you had multiple tasks all throughout your different opportunities here, you should be able to see all of your tasks. We can add a task here. And I think we can also assign it to different people as well, which is pretty awesome. Then we can obviously filter things by what stage the task is at. And we can also see which tasks are assigned to you as a user, which will be great if you're just sort of logging in and you want to see what's been assigned to you.
Automating Your Business with Custom Workflows
We've got some notes as well. And we can create notes here. And we can also see other ones that have been assigned. And then we get on to things like the workflows where we can see workflows for different things that we're working on at the moment. So this one for example, the quick lead, we can launch it to a quick lead form, create a company, create a person, and we can create our own workflows as well to create new ones.
That's pretty powerful because creating your own workflows bespoke to your business and the actions that you guys do is really powerful. You can actually see runs as well here. That's all of them. And you can also, if we go back, we can test a workflow out. So if you're creating a new workflow, you can then just go ahead and test it out. Here you can click test and then you'll see basically launch manually, quick lead form, and then work through that.
Administration: Settings, User Roles, and the Data Model
A quick look at the settings and we basically get on to what your profile is. You can change the user experience for what this looks like, i.e. what the settings are. You can then configure your accounts and your email addresses and sync up your calendars. And then we've got some general things for the workspace, the different members and the invitation via link. We can also manage members here as well, which is important and give them different roles within the application itself. You can see the roles that are down here.
So I'm currently an admin. You'd obviously want probably a couple of admins or at least one. You have to have one. And then you can create different roles and you can even create new roles, which is really important. And then you can basically drill this down, give people the access rights that they require to do their job. We've got the data model here, which again is really powerful. And what's impressive about this is we can actually add different objects in here. And all of this is pinned upon a API in the background, which you can also access. So if you're a developer out there looking to develop applications and workflows into this CRM tool, you can go and do that. And there's documentation on the website how to do that.
Advanced Features: Integrations, Security, and APIs
Another great feature if you're going to be running this is obviously integrations into existing products. So for example, if you're using Slack, you can post to Slack, you can create a person in cal.com, you can use Mailchimp, Tally and other things. And you can also request some integrations if you want by putting an issue onto the GitHub page.
Now in security, we've got single sign on. So we can provide identity providers in here. We've also got approved domains for access. So who can basically access this a bit like a whitelist? And then we've got authentication and invite by link. So I don't think there's actually any multifactor authentication on this at the moment, but if you had say a single sign on provider, you could obviously embed multifactor authentication into the single sign on provider and then that use that here.
I mentioned the APIs before here. So you can basically create a REST API here. Not going to go into that in this video, but if you would like to see more on that, maybe that's a topic we can look at. There are also some web hooks as well for asynchronous events. So getting notified of when things happen.
Final Thoughts and Conclusion
Other than that really we've got the admin panel and we can configure some variables of what this actually is. So the bit like the docker variables we set up at the start and that's pretty much it. I think this is awesome. This has just released onto version 1.0 and I'm really keen to see how this actually lifts off. So congrats to Twenty on their 1.0 release. This is no way affiliated or sponsored by them. I just thought this looked like a cool project and I thought there's going to be people out there that will really be able to take advantage of this, especially if they're trying to support a new fledgling business. Let me know if this is something that you have been using, whether you think this is actually comparable to something big like Salesforce, does it have many of the core features, etc. And also tell me how you're actually going to integrate this.
Anyway, as always, if you've liked this video, please give it a thumbs up, hit that subscribe, and I'll see you on the next one. Take care everybody.