Skip to content

Instantly share code, notes, and snippets.

@bruce-willis
Last active May 9, 2024 15:39
Show Gist options
  • Save bruce-willis/ace946bdbc5f63b1b877f77c37240cc2 to your computer and use it in GitHub Desktop.
Save bruce-willis/ace946bdbc5f63b1b877f77c37240cc2 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 10 --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.

@rubenlauren327
Copy link

THANKS!!!!!

@MohamedElashri
Copy link

MohamedElashri commented Aug 13, 2022

Yunohost requires Debian 11

So replace

sudo ./debi.sh --version 10 --authorized-keys-url https://github.com/<github username>.keys

with

sudo ./debi.sh --version 11 --authorized-keys-url https://github.com/<github username>.keys

Otherwise, you will have to upgrade after installation from debian 10 to debian 11 manually.

Thanks for the guide, it was very useful.

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