Create Your Mail Server and Website with CyberPanel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey guys welcome back to the channel and to a new video so some days ago i told you that i was gonna move my mail server to linux and this is what i could do yesterday because my domain is finally free and i could move it to another registrar which allows me to set private dns so i'm going to show you in this video how you can do that as well if you want to do that and also how you can install wordpress so that you can have the mail server and the website on the same linux so let's get going here and switch over to my desktop and as you can see here i have two linux one is the one with cyber panel and the other one is the one which has next cloud so what i'm gonna show you in this video it's gonna depend of course also on your registrar so you need to have a registrar which allows you to set personal or custom dns for example i have one domain by godaddy which allows me to do that i think they are called custom host names by namecheap is also possible my bluehost is also possible by other registrars i don't know for example my previous registrar which is a swiss registrar was not allowing me to do that so that's why i had to move it to a registrar which allows me to set private or custom dns and so this is how i did it so here only node you have two choices you have two ways to install cyber panel one is to go to the marketplace and then select the app here from the list which is here cyber panel and then you can scroll down here and select the image now cyber panel will work on centos 8 and centos 7 or ubuntu 2004 and 1804 lts so you can choose one of these images here and then select the region and then select the little plan that you want to use you can select for example the first one here for five dollars it's going to give you 25 gigabytes and for a personal website and a small mail server this should be actually enough and then you can set a label here for the linux and also a password for the root user for ssh access and then you can click create lynode and after that you'll need to wait between 10 and 15 minutes before the installation is finished because it needs to provision the lee note first and then install cyber panel on top of it so this is one way and it's probably the easiest way to do it the way i did it though is slightly different because i want to install actually cyber panel manually so what i did i went to create and then lean out and then i selected actually for the list here i selected ubuntu 24 lts and then selected a region in my case i went for frankfurt because it's the closest one to me and i selected the node here the smallest plan available and i will leave the label here as it is and i will set here my root password for ssh access and i don't need for now backups and private ip and then you click create lynode now i did it this way because i wanted to make sure to download actually cyberpanel directly from the cyber panel website to have the latest image available i'm not sure if renault actually is offering the latest image but just i wanted to be sure and so i downloaded basically cyber panel manually so you can see here we are assigned already the ipv4 address and the ipv6 address and we're going to need these afterwards to set up our name servers by linux but before doing that let's wait for the linux here to boot up and we will need to first upgrade or update better set our server to make sure that we have the latest packages we will need to create a user for the server which is going to be used mostly for serv for server maintenance because to install cyber panel you need to be actually a root user and we're going to change also some files on the server before rebooting and then we're going to install cyber panel now it's going to take a moment here to boot up and there you go you can see now the linux is up and running so i'm going to copy this command here which is the ssh command for the root user i'm going to switch to my terminal so let me paste in the command here and hit enter and i can type in yes and enter the sudo password and then hit enter and we should be logging in into our server there you go we are now in ubuntu 24. so first thing first let's update our system so apt update to check for updates i think we have something like 30 packages or something like that when i updated actually the server yesterday so it shouldn't be much different today and you can see that we have 28 packages so let's upgrade the system so apt dist dash upgrade and hit enter so it's going to take a moment here accept the defaults now it's going to take maybe one or two minutes to upgrade the packages so i'll pause the video here guys and i'll be back with you once it's done so here we go the upgrade is now finished so we have still a couple of things to take care of first let's create a user for the system we're gonna use this user probably mainly for server maintenance when it's needed so let's type in add user and i'm going to create a user with my name here and enter a new password and retype it i can enter here my full name and then for the rest i'm going to accept the defaults here there you go so the next step would be also to change our hostname because localhost is not really descriptive so let's do this by typing in host name ctl and then set dash hostname and i'm going to call my machine af links because it's the domain that i'm going to use for this demo and i'm going to change also the hosts files so nano slash etc slash hosts and i'm gonna go down one line here and paste in what i copied the mb4 from lynode i'm just gonna remove here the ssh part and leave the ip here and enter as a domain here ef links y because that's the domain i will use for this demo then i can save and exit and before rebooting the server we can actually already install cyberpanel because we will have to reboot it afterwards anyway so let me go back to the browser here and let me switch over here to the cyber panel website which i will leave a link to it in the video description below and we need to basically here copy one command and that's the one where it says install cyber panel not the enterprise version but the first one here so we're just gonna copy this here and then go back to our terminal and paste that in and then hit enter now it's going to download the first package and it's going to check of course again for upgrades but we will need to restart the system afterwards anyway and now we are asked what we want to do so we want to install cyber panel so that's option number one and we want to install cyber panel with open light speed that's the free version so i'm going to type in one again here and we want to install the full service so i'm just going to accept the default and do you want to use remote mysql no because the sql will be on this server so i'm just gonna default here by no and i'm gonna press enter here to continue with the latest version and by default the admin password is one two three four five six seven which is not really secure so we need to set one so i'm gonna press s here and then set a new password and retype it and we want to install the memcached extension and back end yes and the same goes also for redis you might have seen this also when we installed next cloud and do you want to use watchdogs so i'm not going to mess up with watchdog so i'm just going to accept the default here by hitting y and hit enter so now it's going to take some time because we need to install the whole cyber panel this is usually taking about 10 minutes so in the meantime what we can do we can actually set up our registrar so let me go back to my linux panel which is right here and let me copy here the ipv4 address now the registrar i'm using for this demo is namecheap i have another test domain on godaddy but for this one i'm going to use namecheap so let me switch over there and as you can see i have my domain here it's called dflinks.xyz i have also my other two domains here and i have some other test domains by godaddy if you want to test these things out you can buy an xyz domain for one dollar which is extremely cheap and you know you can test these things out before you're going to do it on a domain that you're using so as i said before this is going to depend of course a lot from your registrar so you need to have a registrar which allows you to set custom dns or personal dns it depends really on the register how it's called by godaddy as i said before is called custom hostname by namecheap it's called customdns so what we're going to do here we're going to click manage and then we're going to go to advanced dns we need to check here the name server now if i click search you can see i have already some name servers that i set up manually before and it's called ns1 eflinx.xyz and ns2 eflinx.xyz and they point to a domain to have ip actually so what i need to do in my case i need to actually replace this ip with the one that i just copied from lynode and i'm going to do the same here for the second server if you don't have anything in here you just go to custom name servers here and then click add name server and you're going to call it ns1 and ns2 and then add the ipv4 address as i did now then once you have done that we can click here the green check marks and it's going to take a couple of seconds before the changes are going to take effect and there you go this is done then after this we need to go back here to the domain to the main domain page and it's going to be the same also in another registrar and you need to set here the custom dns so the custom dns is going to be ns1 eflinx.xyz these are going to be the records that we're going to put also in our cyber panel afterwards so this is all there is to it here in namecheap or to your registrar so we can switch over again to our terminal and see how the installation is going and you can see it's still ongoing so this is gonna take still good five six minutes so i'm gonna pause the video here guys and i'll be back with you once it's finished here you go guys the installation is now done cyber panel is now installed and it's telling us a few informations here how we can access it you can see here we can access it through our ip and 1890 ports which is the default port for cyber panel and it's telling us to open eventually these ports on the firewall now it's telling also here to restart the server so let me actually do this by typing in y and hit enter and while it's rebooting actually let me also tell you that if you're planning to have a mail server here only node uh you have to actually contact the customer support once you set up your mail server because by default the smtp ports only node are actually blocked so if you're planning to send email you should set up your mail server and after that contact the customer support and tell them that you would like to send email through your mail server so that they will open the ports for you i had to do this as well it took literally not more than 30 minutes to get this done so you'll have to know this otherwise you won't be able to send any mail once you set up cyberpanel if you don't contact the customer support so let's go back to our lynode here and you can see now it's up and running so what we can do here we can copy our address and open up a new tab here and we can paste this in and call it 90 and hit enter so we have a warning here that's fine because we don't have a secure connection so we can just click advanced here and accept the risk and if everything went well we should be greeted by cyber panel and here we are so let's type in here admin and the password we gave to the admin user during the installation and now we are logging into cyber panel and there you go we are now in cyber panel so we have still something to configure here so let's go ahead and do that the first thing absolute first thing we need to do is to create a website doesn't mean necessarily wordpress we just need to have a website so that we can then create the dns zone for this domain so let's go ahead and do that let's go to websites here and then create website now the package is the only one we have here in cyber panel it's this one right here where it says packages i'm going to show you this in a second because there are some things you need to change so i'm going to select the default package which is the only one the owner is the admin user it's the only one i have now the domain name that i want to use here is eflinx.xyz that's the one we saw before the admin address is admin at ef linux.com and for the php version here i'm going to select 7.4 because i want to make sure that the plugins on wordpress are going to be compatible with php and then i'm going to select here dkim support now these checkboxes here are not correctly scaled it doesn't matter we have ssl which i'm not going to check yet because we don't have the domain yet on and i checked here dkim support which is going to help us set up our mail server and the other two i will let them empty because the mail server is gonna be created automatically anywhere afterwards so then just create website and it's gonna take a second to do this it's gonna create also the dns records and after this is done we are going to be able to create also our dns zone so this is done so we can go now to dns here and create a name server so the domain name as we know already it's eflinx.x the first name server is the one that we define in our registrar which was in my case ns1.eflinx.xyz the ip address is the one we copied before from hourly node then the second name server the backup name server is ns2.eflinx dot xyz and the ip address is of course the same and then we can click create name server and there you go our name servers are now created so what we can do now we can actually install wordpress on our website so let's go back to websites here and list websites now let's go to manage here let's go it's going to open up a new panel where we can scroll down but before i do that let me actually show you one thing here you can see what's happening so disk usage we have one megabyte used of a thousand megabytes so one gigabyte allowed you might ask why is actually one gigabyte delete is 25 gigs this is actually goes back to the default package that we saw before and that's the one right here so if i click on packages and if i click list packages you will see i have only one package here which is called default now i can edit this package or click modify package here it doesn't matter and you can see why so the disk space on this package is limited to 1000 megabytes so if you want to change this let's say i want to make it for example 20 gigabytes i can type in here 20 000 there you go and for the bandwidth maybe i go for 30 thousand this is gonna depend of course also on your linux plan and then click save and there you go then if we go again to our websites and i'm gonna click again or let me check maybe i have already their website open somewhere i think it's this one right here and if i click again manage you can see now we have the disk usage and bandwidth are now correctly selected so we can go down now we can scroll down here and install wordpress and ls cache so we need to give a title to the site so i'm going to call my eflinks.xyz the login user this is for the wordpress installation is going to be my name you can choose of course whichever you want and for the admin address i'm going to use admin at ef linux.com and for the path i'm going to leave it empty so i'm just going to click install now and this is going to install wordpress on our website so let's see it's going to take a moment to do that and then we can try and see if the dns actually propagated already we might be able to um visit the website with our domain name if not we'll probably have to wait but i think it's going to be fine it's going to depend of course also on your uh isp so let's go ahead and see what happens so let's open up a new tab here and type in here dot eflinks.xyz and hit enter and as you can see it's already working so we have our wordpress here installation which is working fine the only thing is that we don't have ssl installed so the connection is not secure but we are gonna change this right now so let's go back here to the cyber panel and go to ssl and let's click to manage ssl and let's select our website here and click issue ssl so this is going to take also a couple of seconds and this ssl is specifically going to be installed for our domain on wordpress it has nothing to do with the mail server which we still have to configure and it has also nothing to do with the cyber panel website because for that we need to actually install an extra ssl certificate so that when you log into cyber panel from anywhere in on the internet you will have a secure access so you can see now the ssl has been installed so let's go back to our website here and let's try to reload this and see what happens and you can see nothing happens and that's because by default it's going to go to http but if i would have to change this to https colon slash you can see the padlock is working so let's go back here to our cyber panel and let's close this up and go back to wordpress here we need to go back to websites and list websites and manage and what we need to do here we need to go to rewrite rules here and select the template for force http to https and then click save rewrite rules which is going to take also here a couple of seconds not a big deal then after we have done that we can go back to our website and we can actually this time just put in eflinx dot xyz and hit enter and you can see it goes directly to https so now we have a fully working wordpress website now let's take care of our server but first let me close some of these tabs here because i have too many tabs open in cyberpanel so let's go to email and create email now let's create here let's select our website and create our email so i'm gonna type in here my name and select a password for this user and click create email so it's gonna take a second here and now i have my personal email created on my mail server however it's still not working correctly because we haven't set up yet ssl for the mail server so let's do that let's go to ssl and then mail server ssl select our website here and then click issue ssl now again this is going to take a moment it's going to create the ssl for the mail server explicitly and that of course is going to take care of several problems for authentication when you're sending emails over the internet now this is now done we have an ssl issued by let's encrypt so let's go back to emails and list emails we might have an error here so let's click the domain and you can see here what happens so it says your ssl for email is not configured properly because we are using a self-signed certificate so we can change this very easily by clicking here fixed now and it's going to take a second to do that and here you can see already the data for your mail server so you're going to need these if you want to use um a mail client like thunderbird like evolution outlook apple mail or any email client that supports imap and there you go it's now done now before i proceed let me go back shortly to linold because there is something we need to take care of if we go under network here we need to take care of reverse dns down here so we need to have this set to make sure that the domain is verified especially when we are sending emails so let's click here edit rdns and change this to ef links dot x y z and then click save so this is now done so we can go back to our cyber panel and let's go to email and let's go to access webmail so we have a webmaid client here called rain loop so i'm going to enter here my address here and the password i selected and then hit enter and you can see we are logging in just fine this is the web client for rail loop for my email address so let's go ahead here and send a message so i'm gonna click here new message and type in here one of my gmail addresses that i almost never use and i'm gonna type in here test from the mail server and here i'm going to type in hello from cyberpanel maybe correct the typo here and then click send there you go so i'm going to check this on my address monitor here you will probably not see anything but i'm gonna make sure that it's appearing and then i'm gonna reply back from there directly and i can see tests here from the mail server hello from cp so i'm gonna answer back here and i'm going to i'm going to say here thanks and click send so let's try to refresh our server here and as you can see we have the mail here coming back so thanks this is coming from my gmail address as you can see so the mail server is working fine now let me actually also show you something else that you need to be aware of if you especially if you're working with wordpress afterwards so let me go back here to the cyber panel right here so you want to go down here to php and then edit php configs because by default we have a very little php configuration so if you choose 7.4 you can see the memory limit it's 128 which is too small so we need to change this to 512. the upload max file size at least bump it up to 200 because if you are trying to upload plugins or photos to your blog this might be a little bit too little and also for the post mag size i'm gonna go for 80. these are my values at least you can of course change it to whatever you like and then click save changes and eventually then restart also php once this is done so one last thing we need to do here before we wrap up this video is to actually install our hostname ssl let me show you what it is so if you see here we are logged in still in cyberpanel using our ip but that's not good so let's log out from here and let's type in in here ef links dot xyz colon 1890 because we want to log in with our new domain here and then hit enter now you can see we get still the warning and you might say why we installed already ssl yes we installed ssl but that was ssl for our website not for cyber panel so let me click here advanced and accept and i'll type in again my admin user and my password so what we need to do here we need to go to ssl again and this time we use the hostname ssl so let's click this select our website not the mail server but the website and then click issue ssl now this is going to make sure that the ssl is going to be issued for the domain and the cyber panel so that means you will be able to log in into your cyber panel from anywhere in the world using an internet connection and you will have a secure connection so there you go the ssl is now issued so let's see let's try to reload our page and as you can see now we are logged in with the padlock so we can enter our cyber panel securely so these are the differences between the three ssl certificates the manage ssl for your website hostname ssl for your cyber panel and the mail server ssl is for your mail server so this is all there is to it for installing cyber panel only node using then wordpress and the mail server now if you try this out let me know in the comments below how it's working for you and if you have any question let me also know in the comments below as you know i will try to answer you as soon as i can and if you want to support my work you can do so by becoming a patreon as you probably already know i'm doing a live webinar with my patreons once a month where we focus on one topic about linux and if you want you can also donate via paypal to my website as well thank you so much for watching the video guys and i'll see you very very soon in the next one
Info
Channel: EF - Linux Made Simple
Views: 16,215
Rating: undefined out of 5
Keywords: Linux, Arch Linux, Software, Training, how to install, install arch linux, install linux, tech tips, it tips, linux tips, UEFI, linux help, install, cyberpanel, wordpress, mail server
Id: WxshIQPl0Ug
Channel Id: undefined
Length: 25min 54sec (1554 seconds)
Published: Tue Mar 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.