Skip to content

Instantly share code, notes, and snippets.

@RayyanNafees
Created February 8, 2025 10:47
Show Gist options
  • Save RayyanNafees/66b650809c8ea844d3d06d2eaf69ecd3 to your computer and use it in GitHub Desktop.
Save RayyanNafees/66b650809c8ea844d3d06d2eaf69ecd3 to your computer and use it in GitHub Desktop.
PocketHost setup

Installation

Prerequisits

Packages

  • git
  • nvm (curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash)
  • nodejs
  • pnpm
  • nginx
  • ufw
  • containerd
  • docker
  • openssl
  • micro

NPM

  • tsx
  • pockethost

Setup

  1. Setup SSH

ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519

  1. Clone repo
git clone https://github.com/benallfree/pockethost.git pockethost
cd pockethost
  1. Copy the environment file cp .env-template .env micro .env
  2. Then change the rest of the file contents from /path/to/dist/ to /root/ph/ then make the respective directories in /root
  3. Add TEMP_EMAIL & TEMP_PASSWORD to the .env as well
  4. Add Open SSL certificate .key & .crt to /root/ph/ or the path you set in the .env
openssl genrsa -out pockethost.key 2048
openssl req -key pockethost.key -new -x509 -days 365 -out pockethost.crt
  1. Run cat ./setup.sh | bash

  2. Run pnpm dev:cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment