Easy, inexpensive personal hosting with database
January 17, 2020 11:44 AM   Subscribe

I've done a few personal projects (just some css, html, and javascript) and have them hosted on github's free server. I'd like to add a database to the program. What's an easy solution? Free is good, but I'm fine paying something.

I wrote a couple of programs that my friends and I use for fun. Hosting on github is simple and easy, but now I want to add some features that require a database and server-side code (jsp probably).

I've started looking at what's out there, and all I can find are systems that seems over-complicated. I feel like I need an IT consult just to understand what's on any system and how to configure. I don't want to run anything from a home system.

Does anyone know of a hosting service that is inexpensive, easy to understand, and has some nice configuration templates? Thanks.
posted by AMyNameIs to Computers & Internet (11 answers total) 14 users marked this as a favorite
 
Digital Ocean is what I'd recommend here. It's possible their options are overly complex for your needs, but they have great documentation, templates, and walkthroughs.
posted by So You're Saying These Are Pants? at 12:06 PM on January 17, 2020


Amazon Lightsail would be a good fit, starts under $4/month. And they have preconfigured systems (LAMP, Node.js, etc).
posted by mhaw at 12:08 PM on January 17, 2020


I've had a Dreamhost web account for nigh on 15 years now for random web projects. They're not the fastest out there, mostly because they want you to upgrade to their virtual private servers, but as far as random web projects go, they're fine. I've seen others complain about their support, but I've never had a problem with it. I cannot tell you what the difference is between them and me.
posted by telophase at 12:29 PM on January 17, 2020


seconding Digital Ocean
posted by bradbane at 3:14 PM on January 17, 2020


Does it have to be JSP? Two things you could also consider are using AWS Lambda or Firebase. Both are more on the serverless side of things - you don't set up any infrastructure, just do whatever to make the app go in the respective environment and you're good. Firebase, I believe, can basically just be loaded as additional assets into your existing JavaScript code and then just used by the front-end code you've already got. Lambda, in a very, very basic sense, gives you a bucket to store your app's backend code in and then just manages it for you - you slot an API gateway in front to actually handle your requests and it fires off events that you respond to in your language of choice and supportedness (and it does support regular Java). There's a learning curve with each but you'll at least not have to worry about actually managing a server and all that entails. (And it's sort of the hot new thing, so bonus points for relevancy for potential non-hobby use!) There are other providers that do Lambda-like things too - Google Cloud and Microsoft Azure Functions are notable big names that aren't Amazon. The key phrase here is "serverless functions".

If you do just want to straight up set up and manage a server and run JSP, Digital Ocean's a good choice; their VPS stuff gives you basically your own system up in their cloud that you can manage and install whatever you like on. They do have turn-key environments for various things but I can't say anything about JSP as I don't use that in particular, but the downside is you're still managing a box at the end of the day. Another good choice is Amazon EC2 - they do have a gigantic collection of EC2 boxes tailored to specific purposes and there might be a really turn-key JSP type thing out there for it - and its equivalents in the Microsoft Azure sphere and other providers like Linode.

This can really be a fairly big question - if you've traditionally done server-side development without doing much actual server work, there are (as you've noted) a ton of options, but this does also give you an opportunity to pick and choose something that might both be interesting and off-the-wall from what you've used before.
posted by mrg at 5:24 PM on January 17, 2020


On the inexpensive front, for low load use cases like you described, you have a ton of options. https://free-for.dev/#/ is basically my goto for personal demo projects.

AWS, Google Cloud and Oracle Cloud offer Always Free tiers. The cool thing is that these guys offer a lot of choices. The uncool thing is it's a lot of decisions to make. Especially when your project is so underspecified.

Like, if you just want to slap together some lambda python functions that hit a Dynamo (noSQL) db, it's doable in AWS for free. Should be less PITA than setting up a VM, learning nginx config, learning gunicorn config, setting up a database, getting an elastic IP bound, etc.

If you really want to run a database and Java Server Pages (are these still a thing?), you're probably looking at a VM. Donno if Lightsail even has the combo you'd need for a java stack with sql. It's not part of the AWS free tier program, so after a year you're paying for it. DigitalOcean might be simpler since it's in a lot of ways making a lot of decisions for you.
posted by pwnguin at 6:13 PM on January 17, 2020


Response by poster: No, JSP isn’t a requirement at all, I just need something on the server side to be the interface between my JavaScript front end and the database on the backend. So far I see Dreamhost shared is the least expensive, but they don’t allow node.js on shared systems. So, as a follow-up question, what technology does sit on the server and act as bridge between the code and database?

I’ve only been out of the business a few years (and the last job had a lot of old code maintenance). It’s amazing how what was once *the* thing is now pretty much dead.
posted by AMyNameIs at 7:18 PM on January 17, 2020


Best answer: Heroku is my go-to for things like this. It’s easy to update from Github, cheap for small things, there’s a good selection of programming languages and add-ons, and Postgres databases are a standard feature. You don’t have to administer the database as you might with a self-hosted server. It might be a slightly different deployment model than you’re used to, but it’s not as otherworldly as Lambda.
posted by migurski at 10:37 PM on January 17, 2020 [5 favorites]


Just so we're clear, JSP is Java Server Pages, not Javascript. The one with the JVM. Server side javascript is typically node.js, and from your reply sounds like the thing you want.
posted by pwnguin at 1:46 PM on January 18, 2020 [1 favorite]


Are you sure Dreamhost doesn't allow node? My shared instance has node v8.10.0 available. They probably don't let you run the backend server continuously like you're expecting, but I'd guess node has a FastCGI shim of some sort where your node code is started as needed and kept alive for a certain amount of time. At least that's how I used to use Perl on Dreamhost.

You just don't get to run long-running processes 24/7 like you would on a VPS. I might be wrong, it's been ages since I've setup my-own-code on that server.
posted by zengargoyle at 4:59 PM on January 18, 2020


Response by poster: Here’s the link that shows that Dreamhost won’t allow node on a shared server.

Heroku is looking like the simplest one for my hobby code although I won’t know for sure until I try something out.

Thanks, everyone, for taking the time to answer.
posted by AMyNameIs at 7:09 PM on January 18, 2020


« Older Tastiest. Decluttering mission. Ever.   |   Working for an independent business unit -- what's... Newer »
This thread is closed to new comments.