Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Self hosting is pointless these days. There are so many cloud services which do it for you at little/no cost. Who wants to manually manage webserver daemons and SSL certs? Nobody.
-
hacker17657y@globalvariable you could always use Let's Encrypt for your SSL! I do agree with your point, though.
-
h4xx3r16967y@jaread @globalvariable because later on I would like to host a webservice with mvc and data collection in a database. But if I can't get past the normal site exposure to the web, I fail on the later.
-
jaread2147y@thepra Then use Heroku or Elastic Beanstalk or something. If you can't figure out how to set up a simple http server, you probably don't have a good grasp of networking and/or linux, and your site would get owned in no time at all by script kiddies (and you'd never even know about it).
-
C0D4669027yJust spin up a DigitalOcean account.
$5/ month and it takes all your worries away from having a self hosted and unless you know what your doing highly vulnerable server.
Throw let’s encrypt on and you now have renewable ssl for $0.
Most expensive part of the whole setup is your domain name. -
h4xx3r16967y@C0D4 I would like to learn and understand the independent way of implementing webservices. I do already have a payed domain+host+db and a github website. I would like to be outside of any service provider.
-
joas18917yDo you have your own public IP-address? At least in here, ISPs offer it as an extra service (usually inexpensive) but for hard line it might even come by default, at least used to. I couldn't find anything to test if you are behind a NAT except this: https://ip.bieringer.de/cgn-test.ht... . Looks like a good mesure to test it, though couldn't do it on my phone for some reason.
-
h4xx3r16967y@joas nope, all of Italian carriers offer dynamic ip out of the box, that's why I link my modem to no-ip, so it can receive from the modern the dynamic IP. Thanks for the link, let's try...
-
joas18917ySo in NAT, one IP is routed to multiple IPs, like in your home router. That kind of routing blocks incoming traffic unless forwarding is defined to sub IP. Remember we are talking in ISP level not local network. You can buy a service from ISP to bypass their NAT and have your own IP where your network is found, not anyone elses. This doesn't mean your IP doesn't change, it probably does but not as frequently as with NAT. I think static IPs are no longer given to individuals, because IPv4 is running out of IP-addresses. There's where dynamic DNS comes handy.
-
h4xx3r16967y@joas this public IP looks the same as the one given on whatsmyip.org , I don't think I'm under NAT
-
h4xx3r16967y@C0D4 thanks. From I've tried and seen, the path isn't the easiest. But I'm kind of a hard head, I'll bang my head around a problem until I achieve something working the way I want 😅
-
C0D4669027y@thepra
If you can get port forwarding on your router to go from external to local ip + port 80 / 443 ( depends on router, usually called virtual hosts / port forwarding setup ) you will be able to forward requests through to local server.
Once you have that working (unless your behind a NAT) you will need to look at DynDNS or similar to redirect a domain through to your external ip.
Then go jump on as many sites as possible to learn about securing your server and network. -
h4xx3r16967y@C0D4 http://79.45.16.145/
I've installed a lightweight webserver for Windows, as you can check, on that ip address you'll find the default page of that webserver. Can you confirm? -
h4xx3r16967y@C0D4 @joas
It's a relief knowing that I'm not blocked. Now I can start trying to make it work with nginx on the raspberrypi. In which I failed last time >_> -
Balzy267y@thepra
Living in Italy and got the same ISP. As far as I know Telecom Italia always provide you with a public IP address, though not static. Your router is always reachable from the outer world. You just have to configure port forwarding properly.
I see you got the thing done, congrats! I run a self hosted server myself and that's the way you learn ;)
Now that your server is reachable from outside LAN you should also be concerned with security. -
Once I self hosted a site using xamp and some commands in CMD. It actually worked outside my local network. Anyone who wanted to access my website had to use my ip and it was dynamic so it kept changing but this was nearly 4 years ago when I was going school. Can't remember the commands now. But I did it by following a tutorial. Use Google, if you can't find it means you gotta dig deep down.
-
@ebourgess what's he supposed to elaborate on? I see everything answered accordingly lol
-
moort43077y@thepra doing it yourself first is a rite the passage.
I usually hook the device that is hosting up to the dns instead of the router. -
endor56667yLucky you, I have Fastweb, and they're absolute shit because the router is not directly exposed to the internet, but goes through their subnetwork first, meaning that I can't directly expose a site to the internet :(
-
h4xx3r16967y@endor I can understand you, in another location I have fastweb too, and even if I got a public IP, I didn't made it work outside of localhost
-
endor56667y@thepra yeah, from what I've gathered you'd have to set up a reverse NAT in that case, otherwise you're only exposing your router to their internal network
-
Balzy267yIf I understood what @moortuvivens meant, I've done the same with my self hosted website. I've got a domain registered with Namecheap and use ddclient, running on the same raspberry hosting the website, to update the DNS field. I had to set very short TTL in order to avoid caching.
@endor
I know you can ask for a public IP for free, a friend of mine did it a year ago in order to reach his home network with SSH and host web services. -
Crazed20367yI own a website with its own domain hosted through digital ocean. It's not that hard honestly. Ssh into the server (Ubuntu 16.04), set up projects , smtp necessary private files, spin up project (I use more + pm2), set up A and CNAME on digital ocean, set up digital ocean name servers on domain provider, wait. It took a while to understand what exactly was going on, and I don't 100% still (I am noob), but hey it's running and I feel like that's nifty.
-
Crazed20367yI think I did have to find a command online and go set up the server file thing and give it my domain name so it'll run on port 80, that part was a huge hassle and I have no idea how or why it worked but it did.
Related Rants
!rant
How to self host a website?
Seriously, through many guides out there, I was never been able to see my site (hosted on a raspberrypi with nginx) outside the local network. I always tried to link my router to no-ip without success outside my localhost, the port 80 is already open for the raspberrypi. I live in Italy, can it be that the local ISPs obstacle the creation of such homemade website hosts?
undefined
lost
self hosting