Skip to content
Rodney Lorrimar edited this page Feb 15, 2016 · 1 revision

A pump.io module will be available in NixOS as of version 16.03. It's currently available in the nixos-unstable channel.

The NixOS manual lists the configuration options available: Appendix A. Configuration Options – services.pumpio.

It is configured in much the same way as other NixOS services. An example configuration could be:

services.mongodb.enable = true;

services.pumpio = {
  enable = true;
  secret = "my dog has fleas";
  site = "Awesome Sauce";
  owner = "Awesome Inc.";
  ownerURL = "http://example.com/";
  dbName = "pumpio";
  # mongodbHost = "pumpio.localhost";
  # mongodbUser = "pumpio";
  # mongodbPassword = "mongo";
  port = 31337;
  urlPort = 443;
  hostname = "example.org";
  address = "pumpio.localhost";
  sslCert = "/etc/my/server.crt";
  sslKey = "/etc/my/keyfile.key";
};

A pumpio user and group will be automatically created when the service is enabled.

The main README.md has all other information necessary for configuration.

The README.md recommends against hosting behind a reverse proxy. However I have found nginx works quite well. Using nginx makes the SSL setup easier, in my opinion, and allows for HTTP2 and IPv6. Just make sure pump.io is configured with a SSL certificate (any self-signed cert will do).

Example nginx config:

server {
  listen         443 ssl http2;
  listen         [::]:443 ssl http2;
  server_name    example.org;
  include ${nginxSslConf};  # location of config file with all the normal ssl config

  access_log            /var/log/nginx/example.org.access.log combined;
  error_log             /var/log/nginx/example.org.error.log;

  location / {
    # General proxy setup
    proxy_redirect          off;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size    10m;
    client_body_buffer_size 128k;
    proxy_connect_timeout   90;
    proxy_send_timeout      90;
    proxy_read_timeout      90;
    proxy_buffers           32 4k;

    # permit forwarding of web sockets
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    proxy_pass https://pumpio.localhost:31337;
  }
}

It's also easy to put pump.io in a container using NixOS Containers.

Clone this wiki locally