Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sagat79/46a4ba868171c7450f7de4607c1785f4 to your computer and use it in GitHub Desktop.

Select an option

Save sagat79/46a4ba868171c7450f7de4607c1785f4 to your computer and use it in GitHub Desktop.
How to setup YunoHost at Oracle free tier VM
  1. Register for Oracle Cloud Free Tier
  2. Create compute instance
    • change image to Canonical Ubuntu
    • confirm that a public IPv4 address is assigned
    • upload your public ssh key
    • leave everything blank in Boot volume
  3. Enable Internet Access
    • Instances → Instance details → Subnet → Default Security List → Add Ingress Rules
    • HTTP: Stateless: Checked Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Source port range: (leave-blank) Destination Port Range: 80 Description: Allow HTTP connections
    • HTTPs: Stateless: Checked Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Source port range: (leave-blank) Destination Port Range: 443 Description: Allow HTTPs connections
  4. Connect to your ubuntu machine via ssh: ssh ubuntu@<your public IPv4 address> and install firewall software
    • update apt list: sudo apt update
    • install firewalld: sudo apt install firewalld -y
    • enable HTTP connection through port 80: sudo firewall-cmd --add-service=http --permanent
    • enable HTTPS connections on port 443: sudo firewall-cmd --add-service=https --permanent
    • reload the firewall: sudo firewall-cmd --reload
    • you can check that port is opened via sudo python3 -m http.server 80 and opening your public IPv4 address in a browser
  5. Install debian using this script:
    • curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh
    • chmod a+rx debi.sh
    • sudo ./debi.sh --version 11 --authorized-keys-url https://github.com/<github username>.keys – make sure that your public key is uploaded to github
    • sudo shutdown -r now
  6. You need to wait around 5-7 minutes now.
  7. Update known host authorization: ssh-keygen -R <your public IPv4 address>
  8. Connect to newly created debian via ssh: ssh debian@<your public IPv4 address>
    • install some packages: sudo apt update && sudo apt install htop curl unzip tmux -y
    • start tmux session: tmux new -s yuno
    • become root: sudo -i
  9. Install YunoHost:
    • run install script: curl https://install.yunohost.org | bash
    • open your public IPv4 address in a browser and proceed with the initial configuration
  10. Note: next time you should connect to this machine via ssh admin@<your public IPv4 address> and use password from previus step. You can copy your public key later.
  11. Optional For complete setup of YunoHost you need to open a couple more ports (5222, 5269, 25, 587, 993) the same way from second step. More info

P.S. I am not sure that third step is necessary.

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