fixed some stuff, updated readme.
This commit is contained in:
162
README.md
162
README.md
@@ -1,14 +1,168 @@
|
||||
to use:
|
||||
# What is CloudDeploy?
|
||||
|
||||
CloudDeploy is a script that mostly automates setting up a full "home cloud" environment, it is designed to allow non-technical users to install their own cloud.
|
||||
|
||||
CloudDeploy is meant to be run on a fresh ubuntu install (though in theory any linux distro with access to apt and the ubuntu apt repo's will work).
|
||||
|
||||
CloudDeploy cannot do everything, so it will optionally prompt the user during configuration to perform specific simple tasks (like resetting an account, making an account, etc)
|
||||
|
||||
CloudDeploy will also dynamically generate a "post-install" file, which contains all the things the user will need to do once the script is finished based on the options they chose during configuration.
|
||||
|
||||
Unlike other AIO software, CloudDeploy is not a fully integrated product. CloudDeploy deploys and integrates the following popular opensource docker containers, allowing users to then make modifications themselves:
|
||||
- dockge
|
||||
- nginx proxy manager
|
||||
- bookstack
|
||||
- owncloud
|
||||
- filebrowser (for management)
|
||||
- convertX
|
||||
- Heimdall
|
||||
- trantienloi's youtube downloader
|
||||
- dozzle
|
||||
- it-tools
|
||||
- jellyfin
|
||||
- uptime kuma
|
||||
- onlyoffice documentserver
|
||||
- pihole
|
||||
- nginx web site
|
||||
- vaultwarden
|
||||
- wireguard-easy
|
||||
|
||||
this method allows CloudDeploy based deployments to be easily modified and experimented with.
|
||||
|
||||
# Different options
|
||||
|
||||
CloudDeploy has a couple of options for deploying, primarily this is relating to how domain names are handled.
|
||||
|
||||
Purchasing a domain name is the only returning cost of the cloud deployed using CloudDeploy, everything else is free.
|
||||
|
||||
So you'll be asked to pick between 3 options:
|
||||
- 1: purchase and use a public domain name
|
||||
you'll have to set up two records: an A record for @ pointing to your public ip (google "what is my ip" to get your public ip) and a CNAME record for * pointing to @
|
||||
- 2: use your own DNS and VPN for external connections
|
||||
this means you *have* to use your DNS server (pihole) in order to be able to resolve the websites, which can only be accessed on your network locally or via VPN.
|
||||
for this, you'll have to configure some things on your router and your devices.
|
||||
- 3: use your own DNS both internally and externally
|
||||
this is like option 2, but you expose your own DNS to the internet, allowing you and others to use it and thus resolve your websites.
|
||||
|
||||
in options #1 and #3, you'll have to port-forward ports 443 and 80 (web traffic) to the ip of your machine. we'll get back to this later.
|
||||
|
||||
for all options, you have to port-forward port 51820 (VPN)
|
||||
|
||||
and for option 3, you'll have to port-forward port 53 (DNS), you can also do this for option 1 if you want your friends to be able to use your pihole
|
||||
|
||||
|
||||
# Setting Up from Scratch
|
||||
|
||||
to set up from scratch, we must begin with the hardware.
|
||||
|
||||
to run this cloud, you need at least 4GB of RAM, though 8GB is the realistic minimum and 16GB is recommended for multiple users (more than 16GB is not needed), this *can* be older RAM (like DDR3)
|
||||
you will also need *any* 4 core, 8 thread CPU and the fastest networking your network supports (usually gigabit ethernet internally)
|
||||
you do not need a GPU unless you plan on adding more components yourself (for example an LLM) later.
|
||||
|
||||
the important thing is the storage, the more storage you put in, the more storage you'll have available to you for your media on jellyfin and your files on owncloud.
|
||||
|
||||
if you have a system with 16+ GB RAM, more than 4 cores with hyperthreading and multiple hard drives, it is highly recommended to install ProxMox VE to it, make a raid-z1 pool of the hard drives and create an ubuntu VM on that rather than installing ubuntu directly. This allows you to add additional VMs to the server later and allows you to remotely reboot, shutdown, start and manage the VM. It also allows you to leverage Proxmox Backup Server on a separate device for backups if you'd like, and with raid-z1 you are protected against drive failure.
|
||||
|
||||
this does require better hardware, so it's not required. if you have an old Dell with 8GB RAM, 4 cores on a 4th gen i5 and a single 4TB harddrive, that'll work just fine, giving you and your family ~3.8TB of cloud storage.
|
||||
|
||||
if you are installing ubuntu directly, download the ubuntu server LTS ISO file from the official website and use software like rufus or balena etcher to flash the ISO file to any 4GB+ USB stick.
|
||||
|
||||
insert the USB stick into the computer and boot from it. you may have to press a button on your keyboard to enter the boot menu and select the USB stick manually there. This button differs per vendor, so check the documentation for your computer's manufacturer or for your motherboard's manufacturer if it uses aftermarket parts.
|
||||
|
||||
once you're booted into ubuntu server install, go through the steps.
|
||||
|
||||
ensure that for the network configuration, you configure a static ip address.
|
||||
|
||||
for this, you'll want to get the network configuration for one of your existing devices first. the easiest is on windows:
|
||||
open a command prompt by pressing windows+x, then A (this only works if your windows is set to english)
|
||||
type in "ipconfig"
|
||||
you'll see 5 lines of text, but only the last 3 are important:
|
||||
|
||||
ip:
|
||||
this shows that devices ip
|
||||
|
||||
subnet mask:
|
||||
generally 255.255.255.0, which is equal to a /24 subnet. to convert these: imaging the subnet mask as 4 bytes (one byte can store 0-255 as an integer), the subnet value is how many of the bits in that 4 byte string are 1. in this case, 24 out of 32 are 1, the last 8 are 0. this is almost always the case for home networks. you may also see 255.255.0.0 (/16), 255.0.0.0 (/8) and 255.255.255.254 (/32)
|
||||
|
||||
default gateway:
|
||||
this is the address of your router.
|
||||
|
||||
to configure a static ip during ubuntu setup, you'll need:
|
||||
- the network address in CIDR notation
|
||||
- the IP you want the device to have
|
||||
- the gateway ip
|
||||
- the DNS ip
|
||||
- optionally search domains (We'll skip this)
|
||||
|
||||
the network address in CIDR notation is probably the only difficult one.
|
||||
|
||||
compare the ipv4 address of the windows device with the subnet mask, replace the sections of the ipv4 address that are 0 on the subnet mask with 0. then add the /x from before to it.
|
||||
so lets say we have:
|
||||
192.168.15.54 - ip
|
||||
255.255.255.0 - subnet mask
|
||||
|
||||
network address:
|
||||
192.168.15.0/24
|
||||
|
||||
this actually means that you can only use addresses that are 192.168.15.x, but x can be anything from 1 to 254 (0 is the network, 255 is the broadcast address)
|
||||
|
||||
now that you have the network address, we can configure the rest.
|
||||
|
||||
for the gateway ip, simply configure the same as the gateway ip from your windows machine
|
||||
|
||||
for the DNS, configure 86.54.11.13 if you want to use joinDNS4eu, 1.1.1.1 if you want to use cloudflare or 8.8.8.8 if you want to use google DNS.
|
||||
|
||||
you can configure multiple DNS servers by separating them with comma's (like this: 8.8.8.8,8.8.4.4), the first DNS server will be prioritized.
|
||||
|
||||
|
||||
for the system's IP, you can technically pick anything within the network range we set before.
|
||||
It is recommended to pick something high so it doesn't accidentally get reserved by your DHCP service (Which you likely have for all of the devices that do not have an address manually configured).
|
||||
|
||||
i'd recommend just taking your gateway IP and replacing the last quarter with 250.
|
||||
|
||||
|
||||
|
||||
for the storage, it'll likely try to not use your whole drive, make sure to read through *the entire menu*, you only need to increase the amount of space used up by the LV to encompass the entire drive (i tend to just add a bunch of 1s at the start of the entry, which will then automatically set it to its cap)
|
||||
|
||||
|
||||
continue through the menu until the software installs, then reboot and take out the flash drive.
|
||||
|
||||
|
||||
you will also have to do some port-forwarding on your router. if you have an ISP-provided router, this should be either very straight-forward, or you'll have to ask your ISP for help.
|
||||
|
||||
With aftermarket routers, follow a guide online.
|
||||
|
||||
you will need to forward all of the following ports to your ubuntu machine:
|
||||
|
||||
port 80 - 80 (http web traffic)
|
||||
port 443 - 443 (https encrypted web traffic)
|
||||
port 51820 - 51820 (wireguard VPN)
|
||||
port 53 - 53 (DNS)
|
||||
|
||||
port 53 is only needed if you want users outside of your network to have access to the pihole DNS. this is important if you're using a non-public hostname and want users to be able to connect without using a VPN.
|
||||
|
||||
ports 80 and 443 only need to be forwarded if you want your websites to be available outside of your local network, if you only forward port 51820, you will still be able to access everything internally and you'll be able to access everything externally when you use a VPN.
|
||||
|
||||
|
||||
we can now start using CloudDeploy:
|
||||
|
||||
if you get an error at the start, run the following:
|
||||
`sudo apt update && sudo apt upgrade -y && sudo apt install git curl`
|
||||
|
||||
copy the repo:
|
||||
`git clone https://git.sdgcloud.nl/SDGDen/CloudDeploy.git`
|
||||
`sudo git clone https://git.sdgcloud.nl/SDGDen/CloudDeploy.git`
|
||||
|
||||
CD into the repo:
|
||||
`cd CloudDeploy`
|
||||
|
||||
make the deploy script runable:
|
||||
`chmod a+x ./deploy.sh`
|
||||
`sudo chmod a+x ./deploy.sh`
|
||||
|
||||
execute the script:
|
||||
`./deploy.sh`
|
||||
`sudo ./deploy.sh`
|
||||
|
||||
then follow the prompts on screen.
|
||||
|
||||
Once you are done, check the post-install.txt file that was placed in your home directory (if you were logged in as root, it may be under your root home. log in as the same user and run `cd ~` to go to your home folder)
|
||||
|
||||
when you finished the tasks in the post-install.txt file, your cloud should be fully up and running! be sure to restart it at least once.
|
||||
@@ -73,7 +73,7 @@ scriptdir="$(dirname "$(realpath "$0")")"
|
||||
|
||||
#example usage: replace_in_sqlite_db "database.sqlite" "Europe/Amsterdam" "UTC"
|
||||
cp $scriptdir/stacks/dashboard/www/app-pre.sqlite $scriptdir/stacks/dashboard/www/app.sqlite
|
||||
replace_in_sqlite_db "$scriptdir/stacks/dashboard/www/app.sqlite" "sdgserver.online" "<domain>"
|
||||
replace_in_sqlite_db "$scriptdir/stacks/dashboard/www/app.sqlite" "mydomain.com" "<domain>"
|
||||
replace_in_sqlite_db "$scriptdir/stacks/dashboard/www/app.sqlite" "192.168.2.132" "<localip>"
|
||||
replace_in_sqlite_db "$scriptdir/stacks/dashboard/www/app.sqlite" "z5fGWz2i0q" "<adminpass>"
|
||||
replace_in_sqlite_db "$scriptdir/stacks/dashboard/www/app.sqlite" "blah" "<adminpass>"
|
||||
replace_in_sqlite_db "$scriptdir/stacks/dashboard/www/app.sqlite" "0.0.0.0/0" "<localip>"
|
||||
|
||||
Reference in New Issue
Block a user