Skip to content

Instantly share code, notes, and snippets.

View OrchidLuna's full-sized avatar
😍

Tiffany Lynch OrchidLuna

😍
View GitHub Profile
@OrchidLuna
OrchidLuna / inst-pihole.md
Last active February 18, 2025 14:09
How to install pihole in the cloud

Install pihole in the cloud

You want to have your own ad-blocking DNS server but you're often going outside or you don't have wifi in your house but you have an unused domain and just signed up for aws free tier? Follow this tutorial to get pihole running on any cloud provider with DNS over TLS and DNS over HTTPS, while restricting port 53 so you have less risk for your server becoming an open resolver. Let's get going!

  1. Make sure you have port 80, 443, and 853 opened in your firewall settings, and login to your server via ssh.
  2. Install nginx: apt install nginx
  3. Create a file on /etc/nginx/conf.d/example.conf with following contents:
server {
server_name example.com;
listen 80;
# only add the line below if you have public ipv6 in your server
@OrchidLuna
OrchidLuna / install-mastodon.md
Last active February 25, 2025 13:50
How to install Mastodon in docker (even easier imo, 2024)

I'm assuming you're running the latest version of Ubuntu (24.04) or Debian (12), so the installation of prerequisites will use apt.

  1. Login as root: sudo -i
  2. Install the prerequisites: apt install docker.io docker-compose nginx python3-venv
  3. Create directory for Mastodon: mkdir /opt/mastodon
  4. Enter to Mastodon directory: cd /opt/mastodon
  5. Create directory for Postgres: mkdir postgres14
  6. Create directory for Redis: mkdir redis
  7. Create directory for Mastodon files: mkdir -p public/system
  8. Set owner to Mastodon user (991) for public directory: chown -R 991:991 public
  9. Get docker-compose.yml for Mastodon: wget https://raw.githubusercontent.com/mastodon/mastodon/main/docker-compose.yml