Last active
November 9, 2018 20:19
-
-
Save bsnacks000/41535a91df816552ba932bb88edfd17e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # basic setup for a single droplet with ssh and firewall config | |
| # reference: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04 | |
| 1. Login in as root | |
| $ [email protected] | |
| 2. Add a non-root user, give sudo privelages and transfer ssh public key | |
| $ adduser sammy | |
| $ usermod -aG sudo sammy | |
| $ rsync --archive --chown=sammy:sammy ~/.ssh /home/sammy | |
| # Login in as your user now... | |
| 3. Configure firewall to only allow ssh (NOTE: should already be enabled if configured in digocean with SSH keys) | |
| $ ufw app list | |
| $ ufw allow OpenSSH | |
| $ ufw enable | |
| $ ufw status | |
| ## Git install (NOTE: to just clone there's no need to set global config) | |
| 1. Install git | |
| $ sudo apt install git | |
| $ git config --global user.email "[email protected]" | |
| $ git config --global user.name "sammy" | |
| ## Docker privelages | |
| 1. create docker group (if exists already on server will say) | |
| $ sudo groupadd docker | |
| $ sudo usermod -aG docker $USER | |
| ## If initial firewall is not enabled | |
| $ sudo ufw allow OpenSSH | |
| $ sudo ufw enable | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment