Files
hpr-knowledge-base/hpr_transcripts/hpr2067.txt
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

100 lines
7.8 KiB
Plaintext

Episode: 2067
Title: HPR2067: Haste - the pastebin alternative
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2067/hpr2067.mp3
Transcribed: 2025-10-18 13:53:41
---
This is HPR episode 2.67 entitled Haste, the Pastive in Alternative.
It is hosted by John Muart and is about 9 minutes long.
The summary is how to install your own Haste server.
This episode of HPR is brought to you by Ananasthost.com.
Get 15% discount on all shared hosting with the offer code HPR15.
That's HPR15.
Better web hosting that's honest and fair at Ananasthost.com.
Hello and welcome to Hacker Public Radio.
My name is John Muart and today I'd like to walk you through the process of installing
an open source product called Haste.
Haste is an open source alternative to a commercial product called PasteBin, which you may
be familiar with.
This allows you to go to PasteBin.com and type in some content and save that to a unique
URL that you can then share with friends and colleagues, Haste is an open source alternative
that also has its own presence on the web at HasteBin.com where you can do the same thing,
or the source code for that product is also available for you to install on your own
server so you could then run a federated version of that type of service.
I came to discover this piece of software through a Hacker Public Radio connection so I'll
share that story with you.
Mr. John Kulp had submitted an email to the mailing list not too long ago with a link
to a YouTube video where he walked through the his process of creating ePubs.
In that workflow, he uses another project called Blather as part of his workflow to be
able to work interactively using voice commands in order to create those ePub documents.
I'll have a link to the show notes but he also has an introduction to Blather itself and
his notes on his YouTube video for Blather has links to documentation for scripts for installing
that that points back to his site using this HasteBin product and I had not come across this before
and was quite intrigued that such a project was available. So I immediately went ahead and figured
out how to install this on my own servers and I wanted to walk you through the process as well
in case this type of product appeals to you. So HasteBin is written in JavaScript and runs on
top of the Node.js framework. So before we can install the Haste server, we're going to have to
install Node.js and also the Node package manager or Node or I'm sorry NPM. So I didn't have much
luck with the recent packages available in the package manager on my system. So I had
much more luck getting more recent versions from the Node.js website directly. So I will have
links in the show notes for these particular pieces of software and the Node.js website has
really robust documentation about how to get this installed. But I'll go ahead and sort of indicate
you know for the major Linux variants that use the RPM package manager and the Debian package
base systems that the current version for Node.js is version 0.10.38.
And so it's really easy to set that up and go ahead and get the repositories for one of those,
either the RPM or the Debian base package setup and I'll have a link to that command. Do you
just curl that through and run it through Bash? And at that point when you have the updated
package repositories on your system, then you just do a young install or an apt-get install for
Node.js and that will get you that most recent stable version. So after Node.js is installed,
then we need to upgrade the Node package manager or NPM. That's a Nancy Papa Mario.
And that's easily done with the existing copy of NPM that is installed with Node.js and that's
simply executed as NPM install NPM dash G. As of the time that I'm recording this,
that would install version 275 of NPM. So once that stack is in place, then we just clone down
the source code for the haste server from the Git repo, which is available from the GitHub
account C. John Run with the haste dash server repo and I'll go ahead and have a link
to that and the show notes as well. So on the server that you want to install this in,
just clone that repository down CD into the directory that's that's cloned down for that.
And at that point, we're ready to almost kick this off, but we have a decision to make
and that is how do we want to store the documents that are created on the haste server.
So the haste server supports three different storage methods at this time. So you have to decide
which one you would like to use. So those choices are just at the file system level where you can
it will save them to discrete files on the file system itself or you can use a redis server
or you can use memcache d to save those as well. So I will walk through using the file system
version here since that doesn't have any other external requirements. But I do want to point out
that even though the the readme in the repo indicates that the files system store mechanism
is the default, the config.js that comes with the source code is set up to use the redis server.
So we'll need to update the config.js to use the file system rather than the redis server.
So if you pop open the config.js file in your favorite text editor, you'll find a storage section.
And you will want to simply delete the entire storage section. So currently it's set up to use
redis and it defines the host and the port how long the documents should live. But if you
eliminate that entire section, then indeed you will trigger the default for the server itself,
which will be the file system. So we don't have to set up anything other than that. So go ahead and
delete the storage section from the config.js, save that file. At that point in time, you can run
npm install from the root of the repository. And then we'll go ahead and install the haste server.
And then from the same directory, we just run npm start. Then you now have a running haste server.
So you can go to go to our browser and point it to the server that you just installed on. So by
default, it will bind to port 7777. So we just open up your browser to the IP address or name of the
server with a colon 7777. You will now see the haste server in action. So at that point in time,
you can simply type in documents and hit the save. There are little icons there for creating new
documents and saving the current content of what you've typed in. And then that will create a
short URL that you can then pass along and we'll save those files to the file system.
There's also a way to do that directly from your shell. If you don't want to use the browser to
create that content, you can set up a bash alias for a haste command or there's also a haste client
available that you can install. So I didn't try out the haste client. It's a Ruby gem.
I just found it easier to go ahead and create the bash alias. And simply what that does is
you can then pipe contents of files directly onto the haste server and I'll have a link to
to that particular bash alias command in the show notes. And that makes it pretty convenient.
I'll also have a link to the article that talks about how to use that as well.
So I hope this is useful and picture interest in taking a look at haste bin.
It's a useful tool that I hope you enjoy.
You've been listening to Hecker Public Radio at HeckerPublicRadio.org.
We are a community podcast network that releases shows every weekday, Monday through Friday.
Today's show, like all our shows, was contributed by an HPR listener like yourself.
If you ever thought of recording a podcast and click on our contribute link to find out how
easy it really is. Hecker Public Radio was founded by the digital dog pound and the infonomicum
computer club and is part of the binary revolution at binref.com. If you have comments on today's show,
please email the host directly, leave a comment on the website or record a follow-up episode yourself.
Unless otherwise stated, today's show is released under Creative Commons,
Attribution, ShareLight, 3.0 license.