More actions
m Remove uppercase letter thingy + reminder not to use usernames like "admin" |
Inform that you must verify your student status before creating nest account |
||
Line 5: | Line 5: | ||
=== Creating an Account === | === Creating an Account === | ||
[[File:Nest Home Tab.png|thumb|The Home tab on the Nest Bot application]] | [[File:Nest Home Tab.png|thumb|The Home tab on the Nest Bot application]] | ||
Before you are able to create an account, you must | Before you are able to create an account, you must verify that you are a student. Please see [[verifying your student status]] for more details. You '''cannot''' proceed with the following steps without doing this. | ||
Now, 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!" | |||
'''Warning:''' Your username cannot start with a number. Also, don't pick something like "admin" or "login" as a username. | '''Warning:''' Your username cannot start with a number. Also, don't pick something like "admin" or "login" as a username. |
Revision as of 17:20, 5 August 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! Also, please review the Acceptable Use Policy before getting started with Nest.
Creating an Account
Before you are able to create an account, you must verify that you are a student. Please see verifying your student status for more details. You cannot proceed with the following steps without doing this.
Now, 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!"
Warning: Your username cannot start with a number. Also, don't pick something like "admin" or "login" as a username.
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!