Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Build your own cloud desktop
- ## What you'll need:
- * A linux instance, preferably with at least 4GB of RAM
- * XQuartz (macOS users only)
- * X2Go client installed (Windows, macOS, or Linux)
- * A terminal with an OpenSSH client (built-in for macOS and Linux users, use WSL for Windows)
- * Windows Services for Linux (Windows users only): https://learnlinux.link/wsl-dl
- ## Links:
- * Linode (cloud provider used in this example): https://linode.com
- * XQuartz (macOS users only): https://learnlinux.link/xquartz
- * X2Go client: https://learnlinux.link/x2go-dl
- ## Commands used
- ### Add a user for yourself
- adduser <desired-username>
- ### Add your user to the sudo group
- usermod -aG sudo <username>
- ### Log in as your new user
- First, log out:
- exit
- Then, log in as your new user:
- ssh <user>@ip
- ### Set the hostname
- Edit the hostname file:
- sudo nano /etc/hostname
- Change the name to whatever you want the name of your server to be.
- Also, update the hosts file with your chosen hostname as well:
- sudo nano /etc/hosts
- ### Install updates
- Update the package repository index:
- sudo apt update
- Install all updates:
- sudo apt dist-upgrade
- ### Reboot the server
- Now that all the updates are applied, we've created a user for yourselves, and we've updated the hostname, we should reboot the server. That was a lot of change! Run the reboot command to reboot the server:
- sudo reboot
- ### Security
- #### Install the unattended upgrades package:
- sudo apt install unattended-upgrades
- #### Verify that it's running:
- systemctl status unattended-upgrades
- #### Adjust configuration for unattended upgrades:
- sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
- #### Enable automatic reboot:
- //Unattended-Upgrade::Automatic-Reboot "false";
- Uncomment by changing to:
- Unattended-Upgrade::Automatic-Reboot "true";
- Also uncomment:
- Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
- #### Set a time for the automatic reboot to happen:
- // Unattended-Upgrade::Automatic-Reboot-Time "02:00";
- Change to (and adjust with your desired time):
- Unattended-Upgrade::Automatic-Reboot-Time "04:00";
- #### Verify automatic updates are fully enabled:
- sudo nano /etc/apt/apt.conf.d/20auto-upgrades
- Ensure both are set to 1.
- ### Install crowdsec
- #### Add the repository:
- curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
- #### Install Crowdsec:
- sudo apt install crowdsec
- systemctl status crowdsec
- #### Install the firewall bouncer for Crowdsec:
- sudo apt install crowdsec-firewall-bouncer-iptables
- systemctl status crowdsec-firewall-bouncer
- systemctl start crowdsec-firewall-bouncer
- #### Install the Mate desktop
- sudo apt install mate-desktop-environment
- #### Enable required DBUS support
- nano ~/.profile
- Add:
- export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
- #### Install X2go server
- sudo add-apt-repository ppa:x2go/stable
- sudo apt-get install x2goserver x2goserver-xsession
- # Install the client on your OS:
- https://wiki.x2go.org/doku.php/download:start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement