HestiaCP with Cloudflare - Web and Email setup on Oracle Cloud

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we're working with oracle cloud's free tier and we are setting up hestia's control panel so i really like this control panel this time we're going to be using cloudflare for our content delivery network and our dns so there's a few extra steps a few extra commands but don't worry all the commands are over on my blog ideas.com iu so you can just copy and paste as we run through this tutorial about three weeks ago i did a very similar tutorial on hestia with oracle this time i'm using cloudflare but that time i just used namecheap so this one is probably similar but i recommend watching this one as well because i show the detailed steps in setting up the email so i've got email working here through cloudflare but i'm using a smtp relay so i'm using send in blue the other one that's good is mail jet but i really like sending blue so if you want to check out the exact steps for setting up send in blue then check out that previous video but anyway this is all working very well so if all this sounds interesting then keep watching [Music] all right first thing we'll do from our oracle cloud dashboard you can see i'm using a free tier account here on oracle cloud we're going to create a vm instance from our dashboard let's give it a name i'm going to call it hestia cloudflare so sdscf for this demonstration you can name it whatever you want obviously change our image to ubuntu 2004 so change the image there and we choose canonical ubuntu right there select that one and the default shape is the amd micro it'll work just fine on amd micro but the better one to choose here is ampere ampere you can actually increase the ram and the processors so select that one you can actually increase this one here up to four cpus and 24 gigabytes of ram i don't need that much for this demo i'm just going to use the one cpu for this demonstration if you're having trouble actually getting four cpu sometimes they're out of capacity just try one i'm going to try one today and select that in so i've got uh the standard a1 flex with ampere canon ubuntu the other thing you can do if you find yourself out of capacity you can actually change your region sometimes because i've got um i'm using phoenix as my region there's one two and three you can choose from here i'll try with number one at the moment and see if i can get that to load up next thing we need is a ssh you can paste um an ssh key in here i like to use putty to do my ssh keys so in windows you can use puttygen that comes with putty and you can create a key just by hovering your mouse in that gray space there that creates an ssh key we can go ahead and save that key so we can save that key as oh we don't need a password you can add a password if you like but if you're on a private computer you don't really need one so i'll call that idea spot for my private key and i'll just call my idea spot pub my dispot pub for the public key there so those are saved i can just go ahead and copy this key make sure you highlight it all and copy it into our oracle cloud dashboard here so paste that in where it says ssh keys paste public keys so that looks all good and we can go ahead and create this server now so right now it'll say orange it's provisioning we have to wait for our ip address to be provided so just be patient here and then after a little while this is going to be green but the first thing we want is our ip address so after a few seconds we'll get our public ip address we're going to use this and we're going to point our dns in cloudflare over to it so i've got my site already added to cloudflare i'm going to use idea spot site for this demo here you can add a site to cloudflare if you like and that's fairly straightforward but i've already got this one added here we're going to head over to dns and we're going to start adding some records in so first one we're going to use is at for root and i'm going to paste that ip address in there now we can actually leave that one proxied and we're going to add another one as well for cname um there we go and that's www idea spot site idea spot site cool and then we want one for our hestia control panel so hcp i'm going to use you can use whatever you like just make sure you keep track of what you're using for your control panel i'll use hcp for today and that looks good and then we need some mail records here so i'm going to call this mail um on the a record there another one for webmail again on our a record that's a type a and there we go we also need a mx record so mx record and that's going to be at for root and that goes through to mail idea spot site so whatever your domain is put mail at the front and dot so you've got a mail sub domain there priority is going to be 10. so that looks all good now with our mail and webmail we can't actually proxy those a records on cloudflare's free plan so we actually have to change these to just be dns only so change those to dns only for mail and for webmail that looks all good all right so that'll be enough for now we can go ahead and start connecting to our instance i think this instance is up and running sure enough it's green now so we can actually take this ip address and we can connect to our new instance so using posse here our username is going to be ubuntu at our ip address that's the ip address there i want to save this as hestia cf there we go and we're going to need that ssh key that we generated earlier so go to ssh there and auth and let's go ahead and find that key that we made there we go and we can go back to session and let's just save that on awesome now we should be able to go ahead and open this session click yes there and we are connecting to our new vps there we go so all the installed commands you'll find them over on my ideaspot blog i'll put the link in the description there but ideas.com hey you can head over there and the commands to install uh our hestia panel are right here so first thing we do is change to sudo there we go and then we get our install script paste that in there you can right click to paste things into putty so there's our install script is ready now the next bit you'll need to customize a bit i'll zoom in a bit so it's a bit more obvious here so the next bit is the actual install so you need to change the email address and change this example password to something for yourself and put in your own domain name here with the sub domain that you've chosen for hestia's control panel so i've used using hcp so the actual command i'm going to run today is my own email at gmail.com ids.class and password and hcp idea spot site for my domain there so that's the command i'm going to use in putty right now paste that in with right click and this will take about 10-15 minutes so it's gonna wait for a minute but yeah just be patient i might actually just skip ahead because it doesn't require any input after you've pasted that in it's going to install hestia so let's just come back in just a second you'll actually get a message there that says it takes 10 to 15 minutes so yeah just be patient obviously all right so that looks like it's finished up okay it does say you must restart the system before continuing um what we might do before we do the reboot is we can actually add the cloudflare certificate authority as well so i'm just going to w get that cloudflare file here so again that's all my blog and we're just going to rename that because it's a pem file at the moment we want to rename it as a crt certificate and then all we do is move that to our certificates folder with that command there and then we update our certificate authority certificates so this should yeah we've got one added certificate so that looks all good now we can actually reboot so just type reboot in here and that should be all good awesome so after about 30 seconds we should be able to reconnect so i might just restart my session here with um with putty there we go we're back in i'm going to go back as sudo again and sorry sudo su dash there we go now we need to change our port so we are going to change our v change this port to 2083 because 2083 is allowed on clear flow the default uh 8083 is not allowed on cloudflare so we'll change it to 2083 and sure enough this should work cool that looks like it's okay now while we're talking about ports the the ports that we're going to need to open in oracle's firewall are right here so these are the list you can get them on my blog obviously they're separated by commas so we can just copy them into our virtual cloud network here so in our instance we get a virtual cloud network there then under subnet there go to your default security list and we want to add ingress rules so this is where we're going to put our destination port so that's the list of ports that we are going to use for this service so and then our source crdr is 0.0.0.0 0. so tcp is okay and description i'll just put his hdr and let's add the ingress rules there so that looks all good we should have port 22 already by default and now we've got all our ports that we need to finish this project at this point it should actually be possible to connect to our hestia panel now so if we copy our ip address onto a new tab here i'm going to go to our ip address colon 2083 that's our new hestia port we're going to get a ssl warning here let's go through advanced and proceed to our actual hestia panel that looks all good password is going to be admin i mean username is going to be admin password is going to be whatever we use when we installed hestia so my password was this guy here so make sure you have kept that safe i want to copy that in there we go now what i'd like to do is actually install the cloudflare ssl on this service so if we go to actual the gear icon there we click configure and you'll find ssl here now these certificates we're going to replace this with cloudflare certificates so to do that we go into our cloudflare dash we under ssl we go to origin server here and we create a certificate and click create there all this is on default you'll notice that that certificate is valid for 15 years so that's very long you don't have to worry about automatic renewals every 90 days or anything like that that's going to be valid for a long time so i'm going to copy this certificate here and delete out that one in hestia replace it with the cloud third one again private key same thing replace that private key with our cloudflare one we're gonna save that in now hopefully this all goes through okay i noticed that the page doesn't always reload properly when that when you try this step so go ahead and click reload again here and click continue and advance go through that ssl warning again hopefully we get the proper page loading up now it's just a little weird thing that happens when you do that step there can changes have been saved so that looks fine so now rather than using this ip address to access that pattern we can make a new tab here and go to hcp idea spot site on port 2083 and we should get a cloudflare certificate working here so if i look at this connection is secure their certificate is valid and that's a cloudflare certificate so that's cool using cloudflare certificates gives you a little bit more performance and a little bit more security using that cloudflare proxy as well so it's nice to have all that set up properly we can log in as admin here again and we can use that password again same password as when we installed hestia obviously there we go we can start adding websites now so go ahead and add a website here click web add a web domain here and we have to add a default user so add a user here i'm going to call mine alex there we go so just fill that out username name email strong password the rest of that can be default save that in awesome now we can actually log in as our new user so i'll log in as alex there we can see i'm logged in as alex i can add a web domain now and in my case i'm going to be adding ideaspot.site and save that in that looks all good we can go back we can see that we don't have ssl installed so we can actually go to our edit settings here and we can enable ssl this is where we put our cloudflare certificate in again so again grab that certificate and grab that key there we go save that in so that looks all good we can probably access ideaspot site now idea spot site and there we go we've got our construction page ready here this should be a cloudflare certificate again looks all good awesome from here you can basically install apps as well so go ahead install wordpress or drupal or netcloud or whatever you're interested in and have fun now the next step for mail let's go to mail here we can add a mail domain as well let's go ahead and add that on idea spot site and add that on now if we go to our mail domain here we can go ahead and select the edit pencil there we can enable ssl now in this case we want to use let's encrypt because we're not um proxying through cloudflare here and it's not possible to proxy the email in the free plan of cloudflare unfortunately so we can use let's encrypt instead that's going to be fine we can actually save that now make sure that you've obviously got those uh dns records set up before you do this so make sure you've got your mail and webmail on there dns only pointing to your ip address before you try that step so this does take a second to issue that ssl so it'll be ticking away let's encrypt us take a little while but that does look okay so we can actually get back here and now we can go ahead and add an email account as well so yeah name strong password and that is going to be alex idea spot site all your email hosting details are here as well in case you want to use imap but let's go ahead and the webmail url is going to be there as well so let's save that in so that looks all good we've got a mail account alex ideaspot site the other thing you should really do is use an smtp relay so back on mail let's go to our settings here and let's use the smtp relay so we're going to put the host port username and password i've done this in the previous hestia tutorial idea so go ahead and check that one i'll put that in the description as well but basically i like to use uh send in blue to do this this is free to use you can do up to 300 emails a day on the free tier there and um i'll put a link in the description if you want to sign up to send in blue but um all you need is your settings from smtp and api in your dashboard if you send in blue so i'll just go ahead and copy these into a hester dashboard so that's the host so just fill that in yeah the details are there and your password is that big long key thing so put all those in and save that in so that looks all good again that video previously was called this one hestia on oracle free tier where i do the full sending blue setup so it involves putting all those text records from sending blue to actually validate your domain on send in blue but again you can do that fairly easily so this looks all good we can head over to webmail id spot site now and we've seen we've got a login for our webmail we can log in there we go and we can go ahead and try composing a message i want to send a quick message through to gmail so that's arrived in my gmail just fine here and we'll try sending one over to our webmail as well so alex ideaspot.site let's try and send one across and let's go ahead and check in our inbox here all right that took about 10 seconds but we did receive that message just fine from gmail as well so this is all working just fine but yeah that pretty much wraps it up let me know what you think in the comments i think uh if you want a simpler solution just use a regular dns like namecheap or godaddy like i used in the previous video i put the previous video up here as well so you can see the full details about how i configured and authenticated the domain on sendinblue for setting mail but that's basically all we need
Info
Channel: IdeaSpot
Views: 46,568
Rating: undefined out of 5
Keywords:
Id: BK7qyPa-VmI
Channel Id: undefined
Length: 16min 35sec (995 seconds)
Published: Mon Mar 28 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.