More actions
Created page with "THIS IS A WIP! This (unofficial) guide was made by [@twonum https://hackclub.slack.com/team/U094NTBR1S5] (feel free to ask me for help). I'm using Hypercorn as it's an ASGI server (for WebSockets support). To use a different server, replace the <code>hypercorn</code> commands with the ones that your server uses. ; Tools this guide uses * Hypercorn ASGI server * Caddy reverse proxy and web server with automatic HTTPS * PostgreSQL relational database for Django's ORM *..." |
No edit summary |
||
| Line 46: | Line 46: | ||
==== Custom domain (looks better, but you need your own DNS) ==== | ==== Custom domain (looks better, but you need your own DNS) ==== | ||
Add a CNAME record to <code>$USERNAME.hackclub.app</code> | Add a CNAME record to <code>$USERNAME.hackclub.app</code>. | ||
If you use Cloudflare or another proxy, turn the proxy off. | |||
Wait and run this to check your DNS record: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
export PROJECT_DOMAIN="hello.example.com" # set this | export PROJECT_DOMAIN="hello.example.com" # set this | ||
dig $PROJECT_DOMAIN CNAME | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Get your project on Nest == | Then: | ||
<syntaxhighlight lang="bash"> | |||
nest caddy add $PROJECT_DOMAIN | |||
</syntaxhighlight> | |||
== Get your project's files on Nest == | |||
Copy the directory containing manage.py to <code>/home/$USERNAME/$PROJECT_NAME</code>. See [[Quickstart#Using_the_Account]]. | Copy the directory containing manage.py to <code>/home/$USERNAME/$PROJECT_NAME</code>. See [[Quickstart#Using_the_Account]]. | ||
Revision as of 14:52, 15 July 2025
THIS IS A WIP!
This (unofficial) guide was made by [@twonum https://hackclub.slack.com/team/U094NTBR1S5] (feel free to ask me for help).
I'm using Hypercorn as it's an ASGI server (for WebSockets support). To use a different server, replace the hypercorn commands with the ones that your server uses.
- Tools this guide uses
- Hypercorn ASGI server
- Caddy reverse proxy and web server with automatic HTTPS
- PostgreSQL relational database for Django's ORM
- systemd "daemon" (as it's called in Unix) to manage services
I'll assume that orpheus is your username and this is your directory structure:
- ~ (/home/orpheus)
- project
- manage.py
- ...
- static
- project
- static
- media
- project
- Caddyfile
- .config
- ...
- project
Getting ready
First, get a shell to Nest. Don't have a Nest account?
ssh orpheus@hackclub.appGet Nest resources
ssh orpheus@hackclub.app
export PROJECT_NAME="your project directory name" # set this to your project's directory name (like "project" in <code>/home/$USERNAME/project</code>)hackclub.app or custom domain?
$PROJECT_NAME.$USERNAME.hackclub.app (free)
export PROJECT_DOMAIN=$PROJECT_NAME.$USERNAME.hackclub.app
nest caddy add $PROJECT_DOMAINCustom domain (looks better, but you need your own DNS)
Add a CNAME record to $USERNAME.hackclub.app.
If you use Cloudflare or another proxy, turn the proxy off.
Wait and run this to check your DNS record:
export PROJECT_DOMAIN="hello.example.com" # set this
dig $PROJECT_DOMAIN CNAMEThen:
nest caddy add $PROJECT_DOMAINGet your project's files on Nest
Copy the directory containing manage.py to /home/$USERNAME/$PROJECT_NAME. See Quickstart#Using_the_Account.
cd ~/$PROJECT_NAME