Generate links that users can use to submit messages encrypted with your public key.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gonçalo Valério df12b85427
Merge pull request #330 from whitesmith/dependabot/pip/django-2.2.24
1 week ago
.circleci update nodejs version of the CI environment 3 months ago
.github/workflows Scan the code for security issues 8 months ago
boxes Fix failing tests 6 months ago
hawkpost Fix django-axes proxy settings 6 months ago
humans Ignore errors when removing GPG homedir 3 months ago
locale/pt_PT/LC_MESSAGES Fixed translation and owner email on the page for closed boxes 2 years ago
pages added tests for pages app and added mock for external requests 1 year ago
stylesheets fixed: specific textarea style was being applied everywhere 3 years ago
.dockerignore Fixed index page (extra buttons) 4 years ago
.env.sample Removed server sign code and configuration from settings and help pages 2 years ago
.gitignore authenticated users can now select if their email address is added to ReplyTo header 2 years ago
.pyup.yml create config file 4 years ago updated instructions to use pipenv 3 years ago added tests for pages app and added mock for external requests 1 year ago
Gulpfile.js replace run-sequence with gulp4-run-sequence 3 months ago
LICENSE Initial commit 5 years ago
Pipfile Bump django from 2.2.20 to 2.2.24 1 week ago
Pipfile.lock Bump django from 2.2.20 to 2.2.24 1 week ago Merge branch 'master' into update-broken-link 11 months ago
common.yml Building and tagging development Dockerfile 5 years ago
docker-compose.yml Update some old dependencies and removed mail_debug container on dev environment 11 months ago updated codebase to no longer use the project's previous codename 5 years ago
package-lock.json Bump ws from 7.4.3 to 7.4.6 2 weeks ago
package.json replace run-sequence with gulp4-run-sequence 3 months ago


Hawkpost lets you create unique links that you can share with the person that desires to send you important information but doesn't know how to deal with PGP.

You can deploy your own server using the code from this repository or use the official server (that is running an exact copy of this repo) at


For many web and mobile development studios, no matter how hard they try to secure their client secrets (passwords, API keys, etc), the weakest link resides on the client most of the times, specially when he's not a tech savvy person. This project tries to help minimize this issue on the communication between both parties.

The way it works is like this:

  1. It fetches your public key.
  2. When the box is open and the secrets submitted, all the content is encrypted on the client side.
  3. The server then signs (experimental) the encrypted content.
  4. Finally the server forwards it to your e-mail address.

Setting up a development environment

In this section you can find the steps to setup a minimal development environment on your machine.

Base requirements:

  • Python 3
  • Redis
  • PostgreSQL

On Linux

On a Debian based operating system execute the following steps, after cloning the repository:

  • Install the dependencies
$ pipenv install
  • Create the local postgreSQL database with your user and no password

  • Migrate the database

$ pipenv run python migrate
  • Generate stylesheet with gulp (installation instructions for gulp can be found here)
$ gulp build
  • Now you should be able to launch the server and its workers
$ pipenv run python runserver
$ pipenv run celery -A hawkpost worker --beat -l info

You can avoid pipenv run in every command if you first active the virtual environment with pipenv shell.

Using Docker

To use this approach you need to have Docker and Docker Compose installed. Please note that since this project uses version 2 of the Compose file format you may need to update your Docker and Docker Compose to their latest versions.

Installation instructions for every platform are available at the Docker Engine Documentation. If you use Linux you'll have to install Docker Compose manually.

After having the latest Docker and Docker Compose installed, make the folder that will hold the GPG public keys keyring:

$ mkdir -p gpg_home

Some environment variables need to be set so the application works properly. Copy the provided .env.sample and name it .env:

$ cp .env.sample .env

Since this setup assumes containers talk to each other some of the variables need to be set in order to point to the containers' names.

Edit .env and set the following variables to these values:


Don't forget to set the remaining variables as well.

After setting .env correctly, just run (you may need to sudo depending on your setup)

# Run the databases in detached mode to avoid seeing the logs
$ docker-compose up -d db redis

# Perform the migrations
# (using `--rm` to remove the temporary container afterwards)
$ docker-compose run --rm web pipenv run python migrate

# Run the web and celery containers
# (`docker-compose up` would log db and redis as well)
$ docker-compose up web celery

These commands

  1. Run the db and the redis containers detached from the console, so we're not bothered by their logs while working on the application.
  2. Perform the migrations using a temporary web container; it is removed afterwards.
  3. Run the web and celery attached to the console.

The web container will reload on code changes.

You may access the application by opening http://<docker-network-ip> on your browser, which you can find by running (you may need to run this as root depending on your setup).

CID=$(docker ps | grep 'hawkpost_web' | cut -d ' ' -f 1)
docker inspect -f "{{ .NetworkSettings.Networks.hawkpost_default.Gateway }}" $CID

This IP won't change unless you remove every container and the corresponding network (manually), so you may alias it on your /etc/hosts (to something like hawkpost.test).

Note: This approach was not tested on OS X or Windows platforms, so the network feature may require additional steps.

Running the test suite

To execute our current test suite, you just need to execute the following command after setting up your local development environment:

$ pipenv run python test

In case you are using our docker setup the command should be:

$ docker-compose run --rm web pipenv run python test



This project was born during an internal hackathon at Whitesmith, which is helping and supporting the current development.