 So you can get mastered on running and reclaim cloud right now We do not have a marketplace one-click installer or an installer at all So this is going to be a bit of a manual process But this is for those who do want to play with it and reclaim cloud We are investigating the possibilities of a one-click installer So keep that in mind, but for the sake of this Tutorial how to etc There's a couple of things we want to do before we even get into the installation of mastodon And so this will take you through some of the requirements You want to kind of have before you go down that road? So Let's get started. I am going to Shrink and then we're going to look at some of those requirements. First of all This is the installing from source guide from mastodon it's on their official docs page And For the sake of this video, we're going to be looking at two different bits of it preparing your machine And we'll do some of what's in here, but not all of it. So this is basically Getting your server up and running and ready and then installing the code from mastodon so those are the two pieces and I'm going to start by saying this is specific to reclaim cloud. You can do this in other places Obviously, but this is for those who want to play with mastodon on reclaim cloud So in that spirit here is the reclaim cloud interface This is my personal account. And so what I'm going to do is I am going to start a new environment and I am going to install this on a vps. So this is a VPS I am going to use debian 11.5 because we've tested it and that does work And I am going to click next And then it's going to ask me for some information Like and then a couple of things I want to do here Is I'm going to make it a little bit bigger. I'm going to make it like a four gig server, which is what they recommend I've seen recommendations as I've been reading around And four gigs is probably a good Instance and keep in mind. This is a server that you can run your personal Mastodon on but by and large if you're running a server, you're probably going to want to run it for a broader community Otherwise, you're going to join in Someone else's community. So this is really for an instance if you're dead set on self hosting your own mastodon Or you want to create a community for others? So Usually as you create a community from others those resources for the server are going to grow and grow so Again, this gives you an idea of how much it could cost monthly based on that, but really this is just um An example of what's possible and here you want to make sure you have an ip4 So the server instance does debian 11.5 does need An ip address and then I am going to Call it I have a domain that I'll be using but I'm going to be calling this social ds 106 um I already have a server set up for ds 106. This is really just a test server That I have a separate domain for so I can go through the entire process So we have the vps debian 11.5. We made sure that the ip4 was on We also made sure that we had up to four gigabytes for this server And then finally we named the environment and then we chose our region And so you can see here depending upon where you are you may want to choose a region closest to you And then after that it's pretty much all we'll do in reclaim cloud for now Because there's a whole bunch of other things we have to set up. So I'm going to create this create and um At some point This should start creating the environment. There it is. It's creating. We'll come back to this. So Put a pin in that we'll be back The next step is what domain? So one of the things about macedown you want to keep in mind is that when you set up an environment or a server You don't want to change the domain post facto. You don't want to go back and say oh actually I really wanted this domain. So there is some prep you have to do before you actually go through the installation process And I'm going to take you through that prep right now First is choose a domain and make sure you can access the dns records because you're going to have to update them So for the sake of this video, I'm using cloud flare. You can do the same thing In c panels dns config for a domain. Um, they're fairly similar I have my domains managed in cloud flare for a variety of reasons d-dos protection Playing with some of their load balancing Um distributing images to r2 or other objects So there's a bunch of reasons but use no reason you have to use cloud flare I recommend you play with it, but you can use c panels dns as well. So there you go um the domain I am going to be setting up one is this one ds 106 dot social In terms of domain names, you can pretty much use anything. You can use a sub domain like social dot ds ds 106 dot us which is one I'm using for the actual master don for ds 106 This is one I bought as a test I'll be redirecting it to the main ds 106 server But for the sake of this we can start fresh and I'll show you exactly what you need to be to do So in order to get a domain into cloud flare You need to add the domain and then point the name servers from wherever it's registered to cloud flare And so that's a separate process fairly easy But that is not documented here Once you are set up you'll have an overview of your Um visitors you can see fresh domain nothing the tab you're really interested in right here is dns We're going to go and we're going to add a series of dns settings to this So we now have cloud flare. We have an account. We have pointed our name servers. You can see mine here I've already done this and now I'm ready to add records. So boom. That's cloud flare. We're kind of set up Let's jump and we're going to come back to this Um because the next thing we need to do as you can see there's a lot of prep to get master done set up The next thing we need to do is we need to have a transactional email service Um, and that's what's behind me right now. This is mailgun. There are others like send grid Um, there are a bunch of different transactional emails. You may decide to set up your own smtp server You could do that I have had a lot of luck with mailgun. It's worked pretty well for me. So I stick with it It's also very affordable. So I am going to Use mailgun in this, um, how to as the demonstration so I am going to set up a new Domain in mailgun and this is kind of Worth looking at for a second because I have several domains. Bob about social social.ds 106 A lot of these are using transactional email service, whether it's ghost Mastodon discourse a lot of these next generation apps need transactional email because they're often not built into the app So I am going to add a new domain here and you guessed it that new domain is going to be ds 106 dot social And this is going to allow me to send email from that domain What I have to do though is I have to link this domain on mailgun with the domains dns settings on cloud flare So I'm going to take you through that now First things first the domain region for the sake of this video. I'm going to put it in the us It can be eu That's really based on Where you are and what works well for you in terms of gdpr, etc and At that point it said, okay, we got the domain. We know where you want the smtp server to live Now here are your dns settings and this is important because this is actually the settings That you're going to take from mailgun and put in those dns settings for cloud flare. So without further ado Let's do that. I'm going to copy this value The first record is a text record and it's for ds 106 dot social And I am going to go back over here. I'm going to add a record and you guessed it It's going to be a text record. So I'm going to search for that I'm going to put the value in Which is this include colon mailgun.org and then this is for ds 106 dot social And after that I can Simply save that record that is one of at least four, but maybe five records. You'll be adding from mailgun So we're going to add another record It's also going to be a text record and then I'm going to go back to mailgun and find that record for you Here it is I'm going to copy it and then this is the first part of the record. We'll come back for that This is this So that's all that content and then this name the required name is right here Which often refers to as the host name So we're going to do that And that now has the text record for this name with this content Again, save it. That's our second record We're going to add a third record, but this time it's not going to be a text record It's going to be an mx record or a mail exchange record And so we're going to go back here. Here are our mx records I'm going to copy this value. I now know the priority is 10 and the host name again is ds 106 dot social So I'm going to go in I'm going to put the priority as 10 I'm going to put the server as mx a dot mailgun dot org And finally I'm going to do this as ds 106 dot social And we're good. That's three The final necessarily required record Is this other mx record? It's basically mx b so you have mx a dot mailgun dot org and now mx b dot mailgun dot org And it has all the same Settings it just changes from mx a to mx b The time to live and again, I want to make sure the record is not an a record but an mx record Learned from my mistakes The priority is 10 and then this should be mx b There we go. Okay, so I can now save this record and I have the four required records Let's go back to mailgun. I have the two text records I have the two mx records And finally if you wanted you could add a c name record To your dns, which will allow you to track the opening and closing Um, I'm going to do this. I don't necessarily like to track people's opening closing I'm not overly concerned about that. But if you wanted to I would go to type c name hostname email dot ds 106 dot social and then this value So again, just to show you how you would do it You would go to add a record you look for the c name This again is email Sorry email dot ds 106 dot social And then the target is mailgun dot org This should all be set and we're going to save it Right and I'm going to just check my records on that c name And I am correct. Okay. So all my records for Mailgun are set. I've added them to cloud flare. Now. It's just a matter of them verify now. This could take a while I found though That it doesn't with cloud flare and mailgun It can almost be instantaneous Uh, I'm probably setting myself up for a failure here But let's just try and verify these dns settings and see if they're found actually three Of four of them have already been found I'm sure this fourth one will be but let me just check the values to make sure I didn't mess anything up and I didn't so it's just really a matter of verifying it yet again And I imagine it will be found here shortly And at that point Yeah It's set up. So literally this is all in real time within seconds You have your transactional email service in this case to mailgun all set up Excellent. So we're getting there There is something else though. I want to point to and these are things you're going to need So you're going to want as we get towards the actual installation of mastodon to write some of this stuff down And save it. So here are our domain settings Just to give you a sense. This can be confusing You have this sending right and then you can actually control which domain you see So for example, I want to go to this domain And once you do you want to go down here to domain settings And once you click on that it will give you the specific domain settings for that domain And in this event You'll see the dns records. These are the ones I just added all verified And then beyond that and this is really where it gets important And this is the information you need to set up mastodon Are these smtp credentials? So you're going to need this login postmaster at ds106.social for you It will be postmaster at whatever domain you're using You're going to want to reset this password to something you'll remember Or actually no, it's not true. You won't remember it. They'll give it to you and it's a long secure password So copy it and paste it so you're ready to use it on the install. It will look something like this Are you sure you want to reset it? I am sure and then down here it will say, okay, copy it So what I do is I copy that password and then I find a Blank document. This is my process And I'm going to copy paste it in there. You'll see this eventually. I'm not going to use this server So I'm not too concerned about you seeing any of my passwords during this tutorial Keep that in mind though. You're going to need to copy them. You're going to need to keep them safe The other thing here is this smtp mailgun.org. You will need that It will be default but copy it just in case because that's Important information and then the other one is we're going to use port 587 But both smtp.mailgun.org Will be default in the mastodon setup as will 587 If you are using the eu server the smtp Mailgun.org will be different. So keep that in mind. So I have my username postmaster at I have at ds 106.social the full thing. I have my password. I have my smtp server Hostname and I have the port. I'm good. I have now everything I need from mailgun to make mastodon work So at this point We are at a stage where we have our domain We have that domain setup in cloud flare We have the dns settings for that domain set up with mailgun so that we can send transactional email Which is email for resetting passwords emails for new accounts. All of that email will be managed to mailgun now Finally We want to deal with Offloading media. So this is the final piece of the setup. This is the one I struggled the most with So i'll just give you a heads up there But I think and let me get here Push this down. I'm going to probably Be invisible now because I'm going to take you through aws's s3 Which is what I used to get this all set up So I'm going to remove myself here And then now you should see aws's Main dashboard Couple of things on this. Why are we doing this? This is basically to take any media You or your users on your server upload and offload it off the server You'll find that media can quickly accumulate Space is not infinite on reclaim cloud. So we highly recommend you use a service like s3 or Wasabi is another one I've heard back blaze is another one that people have talked about particularly taylor here at reclaim And I've tried cloud flare r2 And digital ocean spaces and I know for sure cloud flare r2 does not work yet because it doesn't have a full s3 spec I don't know about digital spaces, but I've had no luck with it So for the time being I am sticking with s3 because I know it works. So um wasabi I haven't tested back blaze. I have not tested But I do and can confirm that s3 works. So that's why I'm using it here Otherwise I would avoid it like the plague. Okay so Now that we have s3 working or now that we have s3. We're in our dashboard I'm going to show you how to set up an account And um, I really hope this helps you because this was where I kind of Had some issues as we might say, okay Two things you're going to need out of s3. You're i'm out of the aws console You're going to need the i am which is kind of basically user and policy management for any of the services We're going to create a user in i am And then we're going to create a bucket in s3 and we're going to basically take the Users information the i am and the s3 Or the policy information and we're going to apply it to a particular bucket and I'll show you that in a second So let's look at i am i am is a place where you have users and create users I am not uh aws s3. I am not Overly fluent in this area. So I do very basic and this is my advice. He was going to be very basic There might be people out there who have better advice. Please take it This is basic advice to get your s3 bucket up and running. So please keep that in mind Um, I'm going to go to users. You see I have other users that are part of other buckets Which is mainly what I've used uh amazon's aws 4 and I'm going to add a new user And that user's name is going to be bava No, it's going to be ds 106 social Okay And I am going to make sure I get an access key. That's what I want I have the username and it's this access key and secret access key that I will need For the mastodon setup. Keep it in mind Next permissions This You know, this will kind of vary based on your familiarity with S3 but what I have found is I need permissions for full access So you need amazon s3 full access. I have a bucket that already has that So I can just click on that existing bucket and it will apply it Or you can attach existing policies from another space. You can search for a policy But you really want amazon s3 full access to that bucket That's the permissions you want and there's other places to do that But for the sake of this, we're going to go on to tags. I am not using tags This is really just a test for me. You could put this in as a way to search for tags And then you'll notice that it's taking the policy this amazon s3 full access From my existing policy if you don't have one you can create one which is amazon s3 full access And then now I'm going to create this user And as it creates the user it does two important things. It gives me my access key id again I'm going to copy and paste that Just like I did with the smtp information So you'll see the smtp information above and then now this is going to be my aws info And this I can go here. This is mailgun And the one thing I didn't include in mailgun was the post master at ds106.social So there's that and that's all that information. Here's my aws. This is my access key And then I'm going to also get my secret key and again I will not be using this server after I do it. This is something you shouldn't be sharing As an fyi. But again, this is I've done this on several occasions So this is not a server I'll be using it's really just a test server And then finally there's my access key My secret access key to be clear I'm going to grab that And then I am going to go over to bb edit and I'm going to paste that in there Perfect. Those are the two bits of information we're going to need so that aws is s3 can communicate with our server All right at that point Let me go back here And say we're great. That's I am that's what we've needed it for The next piece we need to do is to go into s3. So we've done this. We've created a user with that access policy Now we go into s3 and we're going to create a new bucket And the bucket is going to also be called ds106.social I don't have anything like that yet. That's right. So I'm going to create a new bucket It's going to be called ds106.social Up can I spell yes The region you can decide where you want it This region and that's the default often is us east dot Hash one or dash one so us dash east dash one And then I could copy settings from an existing bucket You probably don't have an existing bucket or you may so you could do that The issue I had on my last go around was I needed to do acls acls enabled And then bucket owner preferred, but that was it the other thing I want to do is I want to make sure that I leave all access open and I acknowledge that I'm doing because this is going to be a public bucket So I have my bucket name my region I have acls enabled I have bucket owner preferred. That's fine. I have all of this unchecked I've acknowledged that I'm crazy and leaving it open and then I'm going to create the bucket And at this point we should have a new bucket called ds106 social. That's it right amongst the others And if I go to it I'm going to have the objects. There's nothing in it yet Though when there is the objects will be listed here my properties So I have us east which is information. I am going to need so again I'm going to go back To my editor and put some of this stuff in there because it will come up again I'm going to need this this amazon resource name So let me go back here and I'm not going to need it for mastodon necessarily I'm going to need it for the policy I set up for this bucket So stay tuned. That's coming in a second And then um, this tells me my creation date all of this information And then All of here now we're almost done. There is one more thing we have to do This is we have to create a policy for the bucket And this threw me off a little bit because you got to write some json or copy some json. I'm not writing json That's for sure copy some json And I found the easiest way to do this was with a tool called the aws policy generator It's at aws policy gen dot s3 dot amazon aws.com. You can find it here And I found that you can create a whole bunch of different policies for us. It's going to be s3 bucket We're going to allow and the principle is going to be basically A wild card or an asterisk, which means pretty much Any user you have in your account and we're going to give that user access to all actions And then this is where we need that amazon resource name that I copied So I'm going to go back here. I'm going to copy it again from my handy dandy Notepad or bb edit And then I'm going to go back to safari. I'm going to paste this in there and I'm going to add this statement Once I've done this, I have a statement for pretty much any user That I have in my aws account is allowing to access and basically full access To that bucket. I am now going to generate that policy and this is the json Basically block I need to add so I'm going to got it. I'm going to close And the last bit Is me adding that block policy And at the point I do add this you'll know it's right because it will basically say This block is public, right? So this access is public. They give you a big like be careful So I now know that the permissions are correct I have the properties I need which are namely the aws Key the secret access key the region And the bucket name again the bucket name is ds 106 social And I should have and let me just double check here Everything I have the keys. I'll put the bucket name as ds 106 social And at this point I am pretty much set In terms of both mail gun aws And cloud flare which we'll return to right now. So I'm going to come back here You're going to be able to see me again There I am And I'm going to actually return to The dns here because there's one more record we have to add For the dns and that can only be added after the server is fully set up And so if you look here and reclaim cloud, we're finally back there social DS 106 has been set up and if I click here under this node It also has a public IP address. So if I copy that public IP address I now am going to paste it Into an a record And that's going to be the main. So let me try this again That's going to be the main ds 106 social Server and so this is now pointing that domain name to the server so it will work And I'm going to click save Yes So at this point We pretty much have all the records we need We have the vps spun up. It has not been Installed mason down has not been installed yet. We have All of our mail gun settings dns settings in cloud flare. We have mail gun working And we have aws bucket set up. So at this point We have done all the pre config We can do I think the one last thing arguably we can do is we could do an update of app for the server and get all of the Things update, but I think we're going to do that in the second part Of this Series which is actually installing masted on the server So this was kind of like the pre game how you get your server set up and ready to go Um, and then once you have everything we talked about in this video You're ready for the next one, which is let's get masted on installed up and running Okay, so we'll see you in the next video. Good luck. If you have any questions Just leave a comment. Let us know big fan