by ryanmjacobs · 6y ago · 0 comments
I also host a Discourse forum. It's pretty snappy for being in my closet (https://forum.webfpga.com) Beats paying DigitalOcean $15/month ($180/year!) for a machine with 2vCPU + 2 GB RAM (the minimum for Discourse).
I think more people should consider self-hosting, especially if it's not critical. It makes the Internet more diverse for sure.
ipfs resolve -r /ipns/notryan.com
> Error: context deadline exceeded
I tried the ipns multihash too: ipfs resolve -r /ipns/QmZaQZyPXjyXWB2FZUUXV9Ft5qciCDMX6CPP2FmiuPSyAq
> Error: context deadline exceeded
You may not be forwarding your swarm address port, 4001 by default, to your laptop.
I'm pretty new to ipfs so take this with a grain of salt.edit: It's worth noting that I can access other ipfs content using my gateway :)
edit2: I also noticed you're hardcoding the local gateway port to 8080 for your header background image. This port is configurable, mine is set to 5080.
The blue banner was just a hack where the referenced jpeg loads if available. It's a call to url("http://127.0.0.1:8080/ipfs/QmX63Pan72CB2vMhNiFMKxKgEhmffbkgE..."); which is a Monet painting I like.
Basically, if you've got IPFS you'll see a bar. If not, you'll see nothing. Did that at least work? If you had `ipfs daemon` running in the background on port 8080, you should've seen something.
Also how many people do you think are not running on port 8080? It's annoying for sure as a dev, when every program decides it wants its local web server to be 8080.
ISPs there are usually monopolies or duopolies so you run the risk of having to buy slower/pricier service, or being totally offline, if one shuts you off.
Thanks to restrictive firewalls, much incoming and outgoing traffic to services is tunneled over HTTP/HTTPS and uses the standard 80/443 ports. There are also legitimate reasons to have 80/443 open such as access to security systems, your home router, etc. They can't block incoming 80 or 443 without breaking a lot of things, so they won't. It's not the 90's anymore.
You really have to worry more about hitting your 1TB Comcast bandwidth cap.
The guy has less than 1Mbps upload bandwidth.
It does, however, have a policy against 'excessive usage', which is left conpletelt undefined and they have a policy of 'Acceptable Content' which is equally vague and ill-defined.
So I guess they do have recourse if i started hosting a pornsite and it became popular, but that's about it.
In my benchmarks I have found that a laptop with 4th gen i5 beats a $80/month Azure VM. You are paying thoufh the nose for redundancy and stuff
Scaleway and OVH also have cheap bare metal offers if you don't like to share.
Also, despite living in the US, I like that my server is in in Paris. It’s EU and sounds super posh. Ha
Good times. I did a writeup 5 years ago how it looked like: https://blog.haschek.at/2015-my-company-just-turned-10.html (down at "Our Hardware")
Cool project by the way! I'm thinking doing the same with a Rpy..
(Of course, as many people will tell me, this already exists. But sometimes, it's okay to do things for the sake of learning... come on, HN)
I'd like to imagine that my content is not DDOS-worthy though :)
Also, with IPv6 you have plenty of IPs...
The DNS timeout is set relatively low, 5 minutes. I used Google Cloud DNS because it’s scalable, cheap (the setup costs under $2/month for low traffic) and has a great API and command line tool. Just took a half day of tinkering to get it all set up and most days I forget it’s there. (I should probably set up monitoring, but it’s fine most days...)
If using CloudFlare, it’s possible you could push your dynamic IP to CF as a DNS host. Haven’t looked into it yet.
And of course there’s the DynDNS approach but most of those approaches seemed more complicated or costly these days. I also use gcloud to update the DNS for LetsEncrypt roughly once a month, so it does double duty. The language for the gcloud DNS CLI tool is a bit technical but try it, test it out, and it’ll start to make more sense by example: https://cloud.google.com/sdk/gcloud/reference/dns
For a bit more security, the apps I’m running are in their own virtual machines and I’ve tried to enable default auto updates everywhere. I keep telling myself I’ll set up something more complicated to create a continuous deployment pipeline with test cases and automatic rollback but I haven’t yet gotten around to it. (Though it would be fun to set up my own virtual PPP server at some point for running test scenarios, etc.)
since i'm using mac, you may need to change ipconfig command to hostname -i/-I)
DO_INT={internal_record_id}
DO_EXT={external_record_id}
DO_BASE=https://api.digitalocean.com/v2/domains/{yourdomain}
DO_TOKEN={your_token}
DO_TYPE=content-type:application/json
*/15 */1 * * * (set -o pipefail; /usr/sbin/ipconfig getifaddr en0 | curl -sX PUT -H "${DO_TYPE}" -H "Authorization: Bearer ${DO_TOKEN}" "${DO_BASE}/records/${DO_INT}" -d "{ \"data\": \"$(cat)\" }" | tee /tmp/ip.int;) &>/dev/null
*/15 */1 * * * (set -o pipefail; curl -sf wtfismyip.com/text | curl -sX PUT -H "${DO_TYPE}" -H "Authorization: Bearer ${DO_TOKEN}" "${DO_BASE}/records/${DO_EXT}" -d "{ \"data\": \"$(cat)\" }" | tee /tmp/ip.ext;) &>/dev/nullMy previous ISP, Comcast, required a business plan, statics were $5/month, and they even changed the static IP on me, once. (They issued the same IP to another customer. I complained, and they told me I had to rotate.) Did have IPv6, though.
A couple of thoughts though for Dynamic IP:
- I have my DNS on cloudflare, and I make a script that runs ever minute to checkif my ip changed, and if it did, than update the DNS (this was on a Cloud server and I didn't buy a static IP). - I also use pfSense, and it updates dynamic DNS as well.
I once had an ISP with a 3600 hour lease on a dynamic IP. For small things like game servers or short-term file hosting it may as well have been static, but the bi-annual IP change was usually pretty jarring.