
Show HN: Hosty – Image/Text self-hosting for minimalists in PHP - xrstf
https://bitbucket.org/xrstf/hosty
======
relaxitup
Looks good. Bepasty looks similar also, however not sure if it supports fully
public url's.

------
iancarroll
Hastebin (written in Node) is also cool if you intend on making it public - I
put an instance up at [https://paste.ian.sh](https://paste.ian.sh) and I use
it every day.

------
xrstf
Some weeks ago, I got tired of using imgur for hosting screenshots and stuff,
partially because I was trying to share work-related content and using a
public site like imgur doesn't seem appropriate.

I then looked around for existing, __simple __self-hosting tools, but all I
found where huge near-community apps like Gallery2, Coppermine, ownCloud or
ownstagram (with commenting, rating, folders, tags, ...) or PHP scripts from
before there was PHP 5.

Long story short: None of them fit my need, so I built my own. It's based on
Silex (Symfony2's micro-framework sister) and Twig and only offers the bare
minimum. Files are placed in the local filesystem, a database is not needed.
Apache2 is the default supported webserver, but we have Hosty in production
using nginx over SSL as well.

Uploading is only allowed for registered users (and users have to be
configured in a config file), viewing is allowed to anyone having the link to
a file. It's __not __intended to be a public file hosting service, so do not
try to add some public register form or something like that ;-)

Hosty can be used inside a LAN without Internet access; no external resources
are being used. It's published under MIT and deliberately doesn't add any
promotional links or "Created by Hosty" footers.

~~~
Sir_Cmpwn
You missed MediaCrush ;)

[https://github.com/MediaCrush/MediaCrush](https://github.com/MediaCrush/MediaCrush)

Building your own is easy and fun, though, I don't blame you.

------
FabianBeiner
Sometimes I’m missing the Good Ol’ Days. You know, when you where able to
download some PHP files as a ZIP, extract them, maybe change some
configuration and be done. You didn’t have to bother with a bunch of other
tools just to get some script ready.

(This is, by the way, no offense to this project at all! I just couldn’t
resist to write this.)

~~~
vld
I agree. For such a simple script, requiring all these tools (npm, bower,
composer, grunt), it just doesn't seem practical.

Is this how people develop and deploy PHP stuff nowadays?

~~~
krapp
For the life of me do not understand why anyone would require _Node 's package
manager_ as a requirement for a _PHP application._

One of the few strengths of PHP is that there doesn't have to be a "build
process."

You don't even _have_ to compile CSS and JS, really, but I guess people aren't
comfortable with js or css which isn't machine generated. Fair enough - there
are benefits to that, but as general practice, it's needless complexity.

~~~
xrstf
It's a build requirement, not a requirement to run the app. If you know a
better way to install grunt-contribs, please tell me.

I made it more obvious in the readme that you do not need build tools to run
Hosty. Seems like that confused a lot of people.

~~~
krapp
> If you know a better way to install grunt-contribs, please tell me.

I would just not use grunt. I understand it's not required to run it, but even
as a build dependency, unless you already have Node installed and running,
it's a lot of overhead for relatively little benefit, I think.

~~~
arenaninja
I'm on the fence on this one. On one hand, I'm fond of package managers. On
the other, there's a TON of crap every time I run bower install... I've yet to
figure out the best way of doing things. I'm thinking of using bower-
installer, ship with a copy of the assets, and include bower.json, but not
bower_components/. The other alternative is obviously CDNs, but then you're
maintaining assets manually

~~~
krapp
PHP already has a package manager though (Composer.)

Granted, the amount of friction involved depends on personal preference, and
whatever environment you're working in, but why require a package manager in
another language (and, potentially, the language itself) when one exists for
the language you're actually deploying in?

~~~
girvo
I'm sympathetic to your point. Where I work, we use Grunt and npm for our PHP
projects, and I'm in the process of replacing them (slowly but surely) with
PHP-based versions of the tools we use, and replacing Gruntfiles with
Makefiles. It's experimental, currently, but I feel like it's doable. The only
dependency then is PHP and Composer, which I think is nice.

