
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This is pump.io. It's a stream server that does most of what people really want from a social network.
Copyright 2011-2017, E14N https://e14n.com/ and contributors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
I post something and my followers see it. That's the rough idea behind the pump.
There's an API defined in the API.md file. It uses activitystrea.ms JSON as the main data and command format.
You can post almost anything that can be represented with activity streams -- short or long text, bookmarks, images, video, audio, events, geo checkins. You can follow friends, create lists of people, and so on.
The software is useful for at least these scenarios:
It also comes with a web UI.
For more information please check out the GitHub wiki and our ReadTheDocs documentation.
or clone them with the following commands:
git clone https://github.com/pump-io/pump.io.wiki.git
git clone clone https://gitlab.com/pump.io/pump-docs.git
You'll need four things to get started:
graphicsmagick
package with the gm
commandNote that the requirement to have gm
available is new for 0.3.0; if
you're upgrading, you need to install it.
The easiest way is to install the software globally using npm, like so:
npm install -g pump.io
That should set up all the files and dependencies for you.
If you want to set up the software in its own directory, you can clone the git repository, so:
git clone https://github.com/pump-io/pump.io.git
You can then install the dependencies using npm
:
cd pump.io
npm install
npm run build
To test the install, run:
npm test
pump.io uses databank
package to abstract out the data storage for the system. Any databank
driver should work. Couchbase, MongoDB and Redis are probably the best
bets for production servers, but the disk
or even memory
drivers
can work for testing.
If you're confused, just use the MongoDB one, databank-mongodb
.
You can find other drivers like so:
npm search databank
One tricky bit is that the driver you use has to be available to the
databank
package. There are two ways to make that work.
First, you can install globally. For example:
npm install -g databank-mongodb
Use this if you installed the pump.io package globally.
Second, you can install in the databank
directory.
cd pump.io/node_modules/databank
npm install databank-mongodb
Note that you also need to install and configure your database server.
pump.io uses a JSON file for configuration. It should be at
/etc/pump.io.json
or on ~/.pump.io.json
.
The pump.io.json.sample
file should give you an idea of how to use
it.
The default config values are stored in the source file lib/defaults.js
.
You can override the config file location with the -c
option.
pump -c <CONFIG_FILE>
Here are the main configuration keys.
hostname
, which is
OK for most systems. Use this if you've got some kind of
load-balancer or NAS or whatever and your local IP doesn't map to
the IP of the hostname.port
,
but if you're insisting on proxying behind Apache or whatever despite
warnings not to, you can use this.false
. Set this to something
truthy to disable the Web interface.daemon
or nobody
are good choices, or you
can create a user like pump
and use that.Strict-Transport-Security
header. It's passed
directly to the hsts module, so you can
set true
to use the defaults (180 days, includeSubdomains
is on) or set
an object to use a longer time, enable preloading, etc.serverUser
. Optional unless you have uploads turned on.true
. Make
sure that datadir
is set and that the directory it's set to contains a
subdirectory named uploads
.true
. Defaults to false
, which is what people should
use in production.false
, meaning
"use the CDN".false
.undefined
.25
which is really the only
sane value.undefined
.undefined
.true
, because
it's a smart idea.false
. You may need to change
the smtpport
value if you set this.30000
.
Change this if... I dunno. I see no reason to change this.true
.true
.You can also set these by passing commandline flags starting with
--
- for example, pump.io.json
's port
value can be set by
passing --port
. Camelcasing like urlPort
should be replaced with
-
(i.e. urlPort
becomes --url-port
). Keys whose value is an
object can be specified using .
to separate nested keys. For
example, a pump.io.json
with the following contents:
{ "params": { "host": "localhost" } }
can be set by passing --params.host localhost
.
pump.io is designed to be a standalone server. You do not need to set up an Apache or nginx or lighttpd Web server in front of it. In fact, that's going to make things harder for you, and stuff like WebSockets is going to work less well.
If you really insist, check the configuration options carefully. If you want http://pump.yourdomain.example/ to proxy to the pump.io daemon listening on port 8000 on 127.0.0.1, use configuration options like this:
"hostname": "pump.yourdomain.example",
"urlPort": 80,
"address": "127.0.0.1",
"port": 8000
To run the pump.io daemon, you need to run either ./bin/pump
(if you
installed from git) or pump
(if you installed from npm).
You'll probably get a more reliable experience if you use forever to keep the daemon running.
NODE_ENVIRONMENT
determines the environment pump.io is running
in. This should be set to production
in production environments or
performance will be significantly degraded. In development
environments it should be set to development
, which is the default.
The pump
daemon also accepts configuration values via environment
variables. You can find available configuration values above - the
basic idea is to start with PUMPIO_
and append the capitalized
configuration key you want to set. For example, the port
key in
pump.io.json
would translate to the environment variable
PUMPIO_PORT
. To configure camelcased config values like urlPort
,
replace the camelcasing with an underscore (_
). For example,
urlPort
would become PUMPIO_URL_PORT
. Keys whose value is an
object can be specified using __
(two underscores) to separate
subkeys. For example, a pump.io.json
with the following contents:
{ "params": { "host": "localhost" } }
can be represented by exporting PUMPIO_PARAMS__HOST
to the
environment with a value of localhost
.
You can also set the env variable NODE_DEBUG
to enable debugging of
internal libraries.
Example:
export NODE_DEBUG=dev,all,net,http,fs,tls,module,timers
You can use any pump.io client application you want to interact with pump.io servers. However, this repository comes with some samples to get you started, if you want.
First use this tool to create the credentials file
./bin/pump-register-app -t <APPNAME>
<APPNAME>
will be the name of the client app that
pump-register-app
registers with the server.
This will create the file ~/.pump.d/<SERVER>.json
that contains your credentials.
{
"client_id":"XXXX",
"client_secret":"YYYYY",
"expires_at":0
}
It will also add an entry into the server database where you will find the clientID. Note that if you use the memory Databank driver the data will be lost between server runs and you will need to rerun the configuration.
Use this command to register a user:
./bin/pump-register-user -u <USERNAME> -p <PASSWORD>
After you register an app, you can authorize your user to use it.
./bin/pump-authorize -u <USERNAME>
When you do that it will ask you to open a website, login and verify the value. You paste that back in and all is good.
If you're connecting your pump.io site with other software (such as federated servers or using Web clients), please note that most of them save OAuth keys based on your hostname and listening port. The following changes may make your relationships stop working.
I realize that these kind of changes are normal when someone's experimenting with new software, and I'm trying to make the software more robust in the face of this kind of change without sacrificing security, but for now it's a good idea to decide on your "real" domain name first before making connections to other sites.
If you find bugs, you can report them here:
https://github.com/pump-io/pump.io/issues
You can also email me at evan@e14n.com.
This software includes the following great packages of client-side software.
It also uses these icon sets:
This sample photo is used for the main page:
FAQs
Social server with an ActivityStreams API
We found that pump.io demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.