Essentials: static hosting, custom domains, html, css, js Nice to have: php, FTP, markdown support
Am I missing out on AWS, Github, Digital Ocean, Heroku?
What are the pros and cons?
Becuase people usually ask why S3 over Github pages I'll answer it up front. Github pages is too limited in terms of what you can do with custom jekyll plugins and code.
Nice thing for S3 though is you could cloudfront it if you wanted to for some reason. And it's in your control.
I literally wholesale copy-pasted the Rakefile in http://ixti.net/software/2013/01/28/using-jekyll-plugins-on-... in order to set this up, it was very easy thanks to that great article - all you have to do is run `rake publish` at the command line, and your site builds locally and the finished product is deployed to your github pages repo.
Here's the workflow I currently use if the OP wants something with less moving parts. I just use s3_website from the command line. It will even create the s3/cloudfront configuration completely automatically.
gem install s3_website
; set up s3_website.yml and AWS environment variables
s3_website cfg apply ; this creates and configures the S3 bucket and cloudfront configuration
s3_website push ; push to S3, invalidate cloudfront cachesI've yet to use it on mine and curious if I should start essentially.
For basic blogs/sites github pages are free and fast. For all custom static sites I run a local Jekyll setup with multiple plugins and push the _site folder to Github for free hosting.
For how many visitors?
ZERO ADVERTISEMENTS, even for the free plan. Supports only static hosting, is free for 100mb websites with bandwidth of 50GB per month, or five dollars per month for 10,000mb with 2TB and a number of other extra features.
EDIT: As mentioned by detaro, custom domain only supported in the paid plan, see https://neocities.org/supporter
Works really well with creative coding frameworks like p5js or Twine, for fun, fast little sketches you just want to thrown online and share with others:
Also, they really care about resurrecting the ideals of the old internet:
https://blog.neocities.org/its-time-for-the-permanent-web.ht...
> ZERO ADVERTISEMENTS, even for the free plan. Supports only static hosting, is free for 100mb websites with bandwidth of 50GB per month, or five dollars per month for 10,000mb with 2TB and a number of other extra features
Haven't announced yet, but these numbers are all increasing soon. Well, except for the advertising one. I'm literally in the datacenter right now working on it.
(BTW, the list on https://blog.neocities.org/ seems outdated - it doesn't mention that SSL article for example)
> Well, except for the advertising one.
What about the five dollars per month one?
If I'm understanding what you're trying to do, this isn't on our end. Neocities currently doesn't prevent sites from making API calls to other servers - that's on your HTTP server's side, you control that.
Occasionally I get requests to allow HTML hosted on Neocities to make API calls directly to Neocities itself - which would be OK for things like basic stats lookup, but for things like file uploading/deleting/editing this is dangerous, because it would allow attackers to write scripts to hack people's accounts that can be executed by their own browsers. This is called a CSRF attack, and that's why we prevent people from doing that.
If you want to get fancy you can even attach it to your domain root (example.com vs www.example.com) using Route53. Which is impossible with many static hosts. Although that requires a hosted Route53 zone which at $2 might very well be 100x your hosting costs.
I use Jenkins to generate the website itself.
Edit: Only downside is if your traffic spikes you have no control over the cost. There is no upper bounds. With that said, it would take a tremendous amount of traffic to balloon the costs to anything worth worrying about. And at least you can be sure your website will actually stay up.
Yeah, until someone decides they don't like you and downloads a few terabytes of data over and over. It costs about average $0.09 per GB from CloudFront out to the world, and add in the costs from S3 to Cloudfront itself.
I had a $200 bill one month due to that, and the next month went with CloudFlare (no usage based billing) and github.
> Only downside is if your traffic spikes you have no control over the cost. There is no upper bounds. With that said, it would take a tremendous amount of traffic to balloon the costs to anything worth worrying about. And at least you can be sure your website will actually stay up.
However, proper use of cache headers can help with that since Cloudfront respects them and won't hit S3 again if the header isn't expired. So at least that helps.
The scenario you described is my nightmare scenario.
Also, Cloudfront now has a WAF (Web Application Firewall) that can help with this. Although it too has some costs.
Edit:
Another alternative that is pretty straight forward although non-zero work is to set up a CloudWatch alarm on your monthly bill and when it gets to high make an API call to shut off the cloudfront distribution (cloudwatch can trigger SNS which can trigger Lambda which can make the API call).
It's a PITA but worth it to save hundreds.
Edit: thanks for the replies. I had a feeling AWS was more a "parts" bin rather than anything approaching a ready-to-go hosting + CMS, but thought I'd check.
If you want a CMS you need to either install it on a server (via Amazon EC2) or use a serverless product like AWS Lambda (which lets you run functions on demand.
But with a static site generator you will usually run and test your site locally before it generates static .html files and pushes to S3. But S3 just hosts static content. The only thing it can do that approaches anything dynamic are redirects. You can also lock down permissions by role but you wouldn't want to do that for a public static site.
I don't think it's what you're looking for in this case.
But, they also offer plenty of free (and good) "ready made and pre configured" packages for people to use (for exampe wordpress, bitbucket etc.). You can search them here https://aws.amazon.com/marketplace/
checkout webpagetest -> https://www.webpagetest.org/result/161123_0R_8RDY/
and feel free to check my 3 web sites:
- http://www.it-wars.com - http://www.louer-hendaye.com - http://www.nodejs-news.com
Init : 2 RaspberryPi + electric plugs : 2x 30$ + 2 x6$ Monthly bill: electricity : about nothing DSL : 30$
Enjoy!
On my DSL router I forward all port:80/tcp traffic to my haproxy raspi.
Deploying over S3 sounds like a bunch of hassle to me. Can you deploy atomically? Can you rollback?
The PITA is that you need Cloudfront to handle SSL and if you're not using Route53 automating the upgrade process is more complex than it should be.
> Can you deploy atomically?
Hm, I'm not sure what atomically means in this context, S3 supports 'sync' so you basically can write a bash/ruby/python script to handle deployment (I use a rake task).
> Can you rollback?
Yes, I use git (gitlab) to keep track of changes, so rolling back is not a problem.
I'm not saying it's super complicated but if extra features are costing you even a couple of hours of time it's probably worth paying to make the problem go away.
> Hm, I'm not sure what atomically means in this context, S3 supports 'sync' so you basically can write a bash/ruby/python script to handle deployment (I use a rake task).
Atomically means you either update all of the files or none of the files. If you're updating one file at a time there's a chance e.g. a visitor will see a new page but with the old CSS file. What happens with S3 here? Also, how do you deal with cache invalidation?
> Yes, I use git (gitlab) to keep track of changes, so rolling back is not a problem.
I personally prefer if you can rollback to a previously working deploy with a dedicated CLI/web rollback option than having to deploy again if that's what you mean. There's a chance your local setup or deploy script is messed up and it's quicker.
I've found this little tool to be a huge timesaver for Middleman deployments to S3. Just remember to gitignore your environment variables ;)
This is what I got from a test I ran.
Download: 1880.39 Mbit/s
Upload: 443.29 Mbit/s
The cost is almost nothing but we don't have a high traffic website. If you started getting billions of hits from expensive Cloudfront regions such as Australia or India, you might consider something else.
https://aws.amazon.com/blogs/aws/new-gzip-compression-suppor...
You'll save a lot on your bandwidth bill.
It's not a deal breaker, but it was enough to make me look for alternatives.
Shell Access, pretty much every common language available, service running, databases, mail, etc..
No bullshit hosting in germany, Pay what you want (1€/month minimum).
Absolute best, I'm hosting about 25 projects with them for various bands, etc. and haven't had any problems whatsoever.
Hosting does not has to be static with them, I run several serendipity instances with them and had no issue. But sure, static file hosting will work very well with them, since Apache is already configured. Creating the uberspace, uploading the files, done.
Don't forget: fast, competent and helpful support!
With google translate and maybe a bit of help from a german speaking friend (and a bank that supports wiring money to a german account without problems) that is probably still manageable, but not ideal.
(I have no affiliation with Netlify I just think their service is neat.)
[2] https://gilly.tk
edit: formatting
Does netlify provide the actual hosting or they allow you to setup deployment to a VPS? Also if netlify does the hosting, how good is their uptime/availability?
We host the sites on our CDN, which has more than a dozen points of presence around the world. You can either let us build your site using anything you can get working on linux (see https://www.netlify.com/blog/2016/10/18/how-our-build-bots-b... for details) or build it yourself and ship the finished product to us. Nothing "runs" on our side after build, so there are no servers/VPS's which you can configure in the equation as far as hosting is concerned. We let you do a few things that you used to do with htaccess files (redirects are free; custom headers including basic auth are a paid feature)
You can check out our list of past incidents on our status page to gauge uptime for yourself: http://netlifystatus.com/
Since we use redundant DNS (NS1 + self-hosted), and use dynamic DNS response based on both location the query comes from cross product which CDN nodes are responding, we can (and occasionally do) remove, rebuild, or add CDN nodes without affecting our overall service. Since we use multiple network providers (for instance we use AWS, but we also use 3 other services), downtime at any one of our providers won't introduce any substantial problems in our network.
You don't have to use any of our clients to deploy a site; they're just options in case you'd rather build the site yourself than have us build it. I rarely use the clients (we have one in go in addition to the Node.js version: https://github.com/netlify/netlify-go and further our API is scriptable in any language and fully documented here: https://open-api.netlify.com/)
You can (and we do this for you by default) configure GitHub, GitLab, or Bitbucket to trigger a build whenever you do something at the repo. The default, free behavior builds on pushes or PR's against your selected branch and if it's a PR, shows you a deploy preview rather than publishing at your main URL: https://www.netlify.com/blog/2016/07/20/introducing-deploy-p...).
Finally you can drag and drop a zipfile with your site's built contents, if you are in a hurry or less technically inclined.
So, you don't need Node to use us and I don't think most of our customers do use that client; most build direct from their repositories.
We include 10GB storage 2TB BW for free (more of both included soon) for $5/mo, which would cost over $180/mo at AWS with S3. Cloud providers really upcharge on bandwidth big time. Really that 2TB is just a soft cap just to make sure nobody tries to run the New York Times from a $5 hosting plan. Many people go over it and it's not a problem.
The one thing we don't do well is show how good we are for pro hosting as well as people learning HTML and having fun. I need to work on that.
The main reason I left is that I wanted to use HTTPS, but I didn't want to have to purchase a certificate when there are many good free options available now. NearlyFreeSpeech requires opening a ticket with customer support to update certificates, so using Lets Encrypt isn't really an option there. Amazon offers free certificates for Cloudfront.
In addition to gaining HTTPS support for free, my hosting costs went from a couple bucks a month to less than 50 cents a month.
Unfortunately, Dreamweaver 8's static SFTP doesn't work any more, due to some Microsoft-forced change in Windows 7.
Fully operational, all the important stuff (text editors, analytics, pictures hosting...), nice themes, well indexed by google, zero maintenance, free, and unlimited traffic.
I run blogs so obviously it is particularly appropriate. But that works as well for small static sites with a couple pages.
I do like WordPress though
Self hosting wordpress is a nightmare. I wouldn't wish that to my worst enemy.
Perfect for static pages, but a little bit of PHP might be fine.
why: free, cdn, version-controlled, continuous integration, https, custom domains.
Wish there was a poll option on HN. How are you going to count OP? Will you share the results?
I have Payara (java app server) running my blog down there, and HTTPS courtesy of Let's Encrypt. I looked into running a Open Street Maps server, but it was fairly hard (I might have been close to getting it running), and professional reasons for maybe playing around with it changed.
In my opinion, asymmetric residential service is in large part responsible for the centralization of the Internet. I would have much liked the alternate history where residential service continued from 1999 onward supporting and embracing the notions of self-hosting and peer-to-peer communication. The resulting decentralized, federated Internet while no utopia in its own right, would be so much more appealing to my sensibilities.
Putting that wishful thinking aside, your setup sounds nice. Since I can't get that kind of bandwidth to my house, I had to lease a dedicated server at a data center.
I'm on Verizon FIOS, and it is symmetrical, roughly. It speed tests about 158 down 162 up. How I got that fast was sorta an accident from moving, and rep handling it looked at the deals. I think it was maybe $10 more than the 50meg service I had before.
I see Google Fiber over there, but what I have is nice too, and deployed wider. I also see Comcast's "gigabit" service with it's paltry 35meg upload.
Edit: Looks like it's because they're using Atom and ARM based servers.
PROS: It is free, always available, and the deploy is easy once you get the hang of git.
Pros: free, convinient (a push ends up as a new post upon a successful build)
Cons: no SSL with custom domain on Github (at least not easily)
It also lets you interface with Gitlabs (which has its own Github pages competitor) which provides you with free private repos. I think it's a much superior setup than Github.
So my domain points at Netlify, which pulls the site from github.
The total cost of this setup is only the yearly cost of the domain, which you can eliminate too if you use a sub-domain on netlify.
Advantages:
1. Excluding domain costs, which are reasonable (and even cheaper than many others), you can have small static sites for pennies a month, or even pennies a year if you put the free tier of CloudFlare in front of it (with DNS changes). It's really dirt cheap!
2. It's the most honest service I've seen, where you pay close to what you actually use.
3. The owner/admin is a no-nonsense person and is available on the forums to help with things that don't need extensive support involvement.
Disadvantages:
1. You need to be tech savvy (at least know how to use an FTP client to upload your static files and use the BSD shell if you wish to play around with application setup or other things over ssh). NFSN does not have any fancy control panels (like cPanel) where you can do one click installs of WordPress or other applications.
2. For PHP and MySQL based applications, setup is not difficult at all. But if you want any other application server (like Node or Rails or Django), you would have to do more work to get it set up.
3. If you truly need support, then there's a paid support subscription (it's optional). For most requirements the forums would suffice.
4. If your site grows a lot (in terms of disk space used, network traffic used and resources used), then NFSN could become very expensive compared to the commonly oversold $5 a month or $10 a month services that promise a lot but depend on most users not reaching their promised limits.
I added about 5 gbp two years ago and it's down to about 4 gbp. It's cheap as hell and I only have to dump 5 pounds on there every few years or so.
Their pay as you go makes totally sense when you have a static website that will be access sporadically and you don't want to rely in a public infrastructure such as Github.
I also don't want to depend on freemium services, because they could just shut down the free tier any time.
Pros: Generally works well, speedy enough, free ssl with Cloudfront, cheap for many sites (most hosts charge per site which catches me out for little projects). I've mostly got the process figured out now...
Cons: not easy or quick to set up, lots of steps to get right, AWS is a terrible UI, Cloudfront invalidations are apparently sent by carrier pigeon so asset hashing is a must, even then it can take a while to see your site updates
I've noticed a high mortality rate among static hosting sites, particularly those "just add files to Dropbox and we publish your site" services. Static hosting services are to ops people what todo list apps are to frontend designers
Also, to your point: you can't, by definition, run php on a static site.
Check out the s3_website Docker container by attensee. We have it in our BitBucket pipeline, so that any push to the hosted repo will automatically copy the latest updates to our S3 bucket AND invalidate the respective assets quite quickly.
Any website refresh our developer in the US does now is usually available to look at within a minute here in Australia.
Free static hosting with custom domain support
Dropbox Pro and Business users have a grace period till September 1, 2017.
I like that I can check my changes on my notebook before uploading to the cloud.
- Not restricted to jekyll, use any static generator
- Supports https on custom domains
SSH access, shared hosting (so pretty powerful CPU/ram there). Currently i have about 700 daily unique visitors and growing. Used to deploy custom sites, now i use mostly wordpress. Also, i use it for my git remote repos.
Great service. Been using if for years, awesome quality for the money.
Lately had some issues but the support is helpful and they fixed whatever i wanted, enabling SSI, fixing response headers, etc. Never had to wait for a reply longer than 6 hours (usually it's just minutes, really). As a bonus, admin staff is available through odlschool IM app - Gadu-Gadu. And PHP 7 is available and easy to switch to.
The site's in polish, which sucks for you guys, but it's by far the cheapest and best solution i have for low cost hosting. I'm a happy customer.
Both my servers (DO vps and basement) run Ubuntu 16.04, I use PHP-fpm for PHP, domains I purchase at a local registrar (.nl domains are about 10€/year), for ssl I use lets encrypt. For simple sites I always use Bootstrap for the css.
FTP is implicit if you count SFTP as FTP (FTP over SSH). Under Linux SFTP is mounted as easily as any network share.
At home I run a Nextcloud instance and share some directories as Nginx roots, that means I can locally (even on my phone) edit a static web page and it is synced immediately to the webserver's root folder. This can be quite convenient.
I manage all my sites there. Never had any issues with them, there is SSH access too so I recently set up a Hugo bitbucket pipeline which builds my personal website and rysncs it to dreamhost.
They were very fast to add lets encrypt support, so all that stuff is taken care automagically. Reliability is very good.
Not sure how price compares to the competition, though. HN's + /r/Android's front pages resulted in about 13K uniques and it ended up costing me ~$10 (which is insanely cheap, but GitHub + Cloudfront is free...)
Edit: I should mention that the site isn't as light it can be, currently stands at 473kb of code and about 3 megs of images. So that $10 is for ~45 gigs of traffic.
No how-to, but it's all open source here https://github.com/barricadeio/docs
Most awkward part was figuring out the voodoo required to get Hugo and Middleman working (lots of trial and error).
This costs me just over 50 cents a month, almost all of which is the Route53/DNS costs.
- Gitlab stores the source and GitlabCI builds the site.
- Lambda triggers the build on a schedule.
- GitlabCI pushes the site to S3 (using Gitlab ENV VARS!).
- CloudFront as the CDN, also provides free SSL.An extra $1.45/month gets you PHP and CGI hosting, plus raised quotas.
My only caveats: The free hosting tier only gets you 10MB of space per domain (no bandwidth quotas, though!) Which has been plenty for me for everything except large photo galleries, but YMMV. Also, I've had terrible experience with their domain backordering service--the domain I backordered was quietly released and became publicly available without a peep from R4L.
Their actual domain hosting, website hosting, and technical support has been stellar, though. (Websites are actually hosted on a shared server somewhere at OVH, if Ican trust the reverse DNS info.)
super simple, super cheap, never had a real problem.
It is cheap enough to not bother with the limitations of most low-cost static site hosting.
We also have a distributed team updating and looking after our website, and we use BitBucket as our git repo. Recently implemented their Pipelines feature to auto update the S3 bucket and refresh CloudFront resources with any changes pushed to the repo.
Makes it really easy now - just a 'git push' and Bam!, the website is updated and CloudFront auto invalidates all the old assets and starts serving up the new stuff. Really smooth.
Deployment from git, Hugo build on server, free HTTPS with Lets Encrypt and free for my basic usage.
[1]: https://www.rolando.cl/201607-1-blogging-like-its-2016.html
I wrote my own little script that converts markdown to html with python and push that to the server with git, but of course with a VPS you can run pretty much anything you want.
I prefer this method over managing a server any day.
Also, Github Pages and Gitlab Pages are great and free. You can't beat free if it's reliable and both of those two are reliable.
Anyway good luck.