Skip to content

Instantly share code, notes, and snippets.

@matinzd
Last active June 11, 2023 20:17
Show Gist options
  • Save matinzd/3139fe33f5ea52ebcc8a3c3f00a5bc06 to your computer and use it in GitHub Desktop.
Save matinzd/3139fe33f5ea52ebcc8a3c3f00a5bc06 to your computer and use it in GitHub Desktop.
Configuring WhatsApp proxy using cloud-init on ubuntu
#cloud-config
package_update: true
package_upgrade: true
packages:
- ca-certificates
- curl
- gnupg
- lsb-release
- git
runcmd:
- sudo mkdir -p /etc/apt/keyrings
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- sudo apt-get update
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
- git clone https://github.com/WhatsApp/proxy.git $HOME/whatsapp-proxy
- docker compose -f $HOME/whatsapp-proxy/proxy/ops/docker-compose.yml up -d
@matinzd
Copy link
Author

matinzd commented Jan 6, 2023

How to debug cloud-init?

  • Log into server
  • Run tail -f /var/log/cloud-init-output.log

@MehdiKhoshnevisz
Copy link

Hey. Thanks for your gist.
Can I change its ports? I don't want to use port 443!

@matinzd
Copy link
Author

matinzd commented Jan 7, 2023

Hey. Thanks for your gist.
Can I change its ports? I don't want to use port 443!

Of course. Yes you can :) just change the ports in docker-compose file.

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