Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Quickstart: Difference between revisions

From Nest Guides
Aurora (talk | contribs)
No edit summary
Aurora (talk | contribs)
No edit summary
Line 32: Line 32:
If you have your website on GitHub or GitLab, you can clone it.
If you have your website on GitHub or GitLab, you can clone it.
   username@nest:~$ git clone <git repo url> ~/pub/
   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
You can setup a cronjob to pull changes daily if you don't want to pull manually.
   username@nest:~$ crontab -e
   username@nest:~$ crontab -e
   0 0 * * * cd ~/pub && git pull origin main 2>~/git-error
   0 0 * * * cd ~/pub && git pull origin main 2>~/git-error

Revision as of 02:52, 7 February 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 if you're unsure!


Creating an Account

Error creating thumbnail: File missing
The Home tab on the Nest Bot application

Before you are able to create an account, you must enroll. On the Hackclub Slack, add the Nest Bot application by selecting 'Add apps' and adding Nest Bot. Open the application, and under the Home tab, click 'Register yourself!'.

The signup flow will need some basic information—namely, your username, name, email address, and SSH key. You can view your SSH key.

  cat ~/id_rsa.pub 

If you don't have one, create one.

  ssh-keygen -t rsa

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 in ~/Caddyfile, and your website accessible at <username>.hackclub.app. From here, you have multiple options to set up your website.

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