This repository is a boilerplate for building APIs with koa2 and mongodb. It builds on top of this koa-api-boilerplate by adding a tor Docker container and piping the output of koa through a tor .onion hidden service.
Walk-through video: https://www.youtube.com/watch?v=oihYLjKiUQ0
These directions are geared at Ubuntu 18.04 OS with at least 1GB of RAM, and a non-root user with sudo privileges. Your mileage may vary.
It's always a good idea to add swap space to a new system. I recommend 2GB of swap typically.
Install Docker on the host system. Steps 1 and 2 in this tutorial shows how to install Docker on a Ubuntu system.
Install Docker Compose too. This tutorial shows how to do so on a Ubuntu system.
git clone https://github.com/Permissionless-Software-Foundation/tor-api cd tor-api docker-compose build --no-cache docker-compose up
The .onion address assigned to the tor container is displayed when the container is created. You can view it using
docker logs <container ID>. The keys used by tor are stored in the
keysfolder generated by Docker.
Static content like this Gatsby boilerplate can be served by copying the content into the
staticfolder created by Docker. You may need to change the owner to add files to this directory:
sudo chown -R <user> static