More actions
Reesericci (talk | contribs) Added croc info |
Fix Nest Bot home screenshot |
||
Line 4: | Line 4: | ||
This guide will walk you through creating an account and setting up a [[Caddy]] webpage. It assumes basic knowledge about the terminal—read up on that on [[Linux]] if you're unsure! | This guide will walk you through creating an account and setting up a [[Caddy]] webpage. It assumes basic knowledge about the terminal—read up on that on [[Linux]] if you're unsure! | ||
=== Creating an Account === | === Creating an Account === | ||
[[File: | [[File:Nest Home Tab.png|thumb|The Home tab on the Nest Bot application]] | ||
Before you are able to create an account, you must enroll. On the [https://hackclub.com/slack Hack Club Slack], open the Nest Bot app by searching "Nest Bot" in the search bar, and clicking on the Nest Bot app. Then, click "Register yourself!" | Before you are able to create an account, you must enroll. On the [https://hackclub.com/slack Hack Club Slack], open the Nest Bot app by searching "Nest Bot" in the search bar, and clicking on the Nest Bot app. Then, click "Register yourself!" | ||
Revision as of 01:33, 23 March 2024
Welcome to Nest!
This guide will walk you through creating an account and setting up a Caddy webpage. It assumes basic knowledge about the terminal—read up on that on Linux if you're unsure!
Creating an Account
Before you are able to create an account, you must enroll. On the Hack Club Slack, open the Nest Bot app by searching "Nest Bot" in the search bar, and clicking on the Nest Bot app. Then, click "Register yourself!"
The signup flow will need some basic information—namely, your username, name, email address, and SSH key, which is how you will log into the Nest server. If you don't have an SSH key, no worries - you can make one now! Simply open up your terminal (such as Windows Powershell or the Terminal app on MacOS), and type:
ssh-keygen -t rsa
Answer the prompts (you can accept defaults by pressing Enter), and it will generate a key for you. To get it, type:
cat ~/.ssh/id_rsa.pub
Copy the value that this outputs, and paste it into the "Public SSH Key" field of the Nest signup form.
Once you've completed the signup flow, Nest Bot will tell you that your request is under review. Once you are approved, Nest Bot will let you know, and give you your password. This is the password that you'll use to access Nest services through Authentik. Go ahead and login to Authentik at https://identity.hackclub.app and change your password by clicking on the settings gear in the top-right corner, and then clicking the "Change password" button. Change it to something secure!
You can also link your Authentik account to your Slack account, if you wish. This will let you login to Authentik through your Slack account. To do this, simply go to the "Connected services" tab of the same settings page, and click the "Connect" button next to the Slack icon.
Using the Account
Now you will have to log in over SSH. From your terminal, run
$ ssh <username>@hackclub.app
Replace <username> with your username. You should see an ASCII art NEST and the Hack Club dinosaur.
Your website is in ~/pub/
, your Caddyfile (server configuration) in ~/Caddyfile
, and your website accessible at <username>.hackclub.app
. From here, you have multiple options to set up your website - Caddy will automatically serve whatever you put in ~/pub/
! If you'd like to learn more about Caddy and what it can do, check out the Caddy page.
The Lazy Way™
You are able to write your website straight from the terminal using your editor of choice.
username@nest:~$ nano ~/pub/index.html
Git
If you have your website on GitHub or GitLab, you can clone it.
username@nest:~$ git clone <git repo url> ~/pub/
You can setup a cronjob to pull changes daily if you don't want to pull manually.
username@nest:~$ crontab -e 0 0 * * * cd ~/pub && git pull origin main 2>~/git-error
Uploading Files Over SCP
If you have a website locally, you can upload it to your server. On your local device, run
$ tar cvf website.tar /path/to/website $ scp website.tar <username>@hackclub.app:/home/<username>/pub
Then over SSH, navigate to pub and use
username@nest:~/pub$ tar xvf website.tar
Uploading Files Over Croc
Croc is a fast & simple tool for uploading files to remote machines. Install it on your local machine, zip up your files, and run
$ croc [zip file]
Then over SSH, navigate to pub and run
$ croc [recieve-code-from-local-machine]
to download the zip!
You can then run on the pub
$ unzip [zip file]
to unzip your folder!