- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| checkout | ||
| patch | ||
| sitepatch | ||
| .gitignore | ||
| 001_getrepos | ||
| 002_generate_env | ||
| 003_apply_patches | ||
| 004_build_all | ||
| 005_create_dbs | ||
| 006_generate_configs | ||
| 007_start_tmux | ||
| 008_stop_tmux | ||
| 009_seed_boss | ||
| 010_register | ||
| config.sample | ||
| README.md | ||
Pretentious
Selfhosted Pretendo setup scripts
Heavily based on pretendo-docker, including some lifted scripts. I guess this repo has to be AGPL3 too then? This version is dockerless and also slightly more up to date.
Undertested.
Requirements
Not included in the box are:
- a Linux server
- git
- go (new-ish version, 1.25 or something?)
- PostgreSQL (fresh setup works fine)
- mongodb (fresh setup works fine)
- nodejs
- npm
- tmux
- nginx
- a (sub)?domain to run it all, and a wildcard for all of its subdomains, directed at the server (for example,
*.pre.szy.lol,pre.szy.lol→192.168.254.99).
People smarter than me are invited to compute the actual list of subdomains required.
Additionally, ufw is not required, but you should use a firewall and this will generate scripts for that specific one. If you use something else, you can easily see the ports that need to be open in the generated ufw file.
I set it up to use no SSL, but browsers might be upset at the result. Use Chromium 87 instead.
Setup
Copy the contents of the repo into a folder. You might be able to get away with using a clone directly, but Git might not be happy with repository nesting.
If you have custom patches you want to apply, add them to sitepatch (see its README, some patch examples in repo issues).
Copy config.sample to config. In it, set up your postgres and mongo creds.
A default install probably needs none, instead only accepting requests from localhost, which is fine for us.
Then set your main domain and its IP. If you already have things running on your machine that would conflict with the suggested ports, you can change them here too.
Run, in order, scripts 001 to 006. Things will happen. You are advised to at least skim all scripts ran beforehand. They are split so you can rerun them if things break or need updating.
Script 006 will generate for you a config file to toss into nginx (in the http pile, your setup probably includes a folder for them, like sites-enabled under Debian), as well as an ufw file for your firewall. It will also generate a website for your main domain, the nginx config will already point to it. It contains instructions how to set up your client (which you should also follow) and a form for changing passwords.
Run 007 to start the servers. They will run in tmux winows, you can use tmux at to peek at them (and you probably will for debugging).
If you get tired of them, 008 will stop them.
With the server running, run 009_seed_boss to set up some files Splatoon needs.
To create user accounts, run 010_register. It will ask you questions about the PNID (normal people would call it a "login"), Mii name ("visible name/nick"), and password ("password").
You can also provide them as script arguments. If it outputs tokens, the creation succeeded. If it didn't, there will hopefully be a reasonably readable error.
Accounts can only be made with the script for vague security reasons. For less vague security reasons, you should tell gamers to change them on the website.
Troubleshooting
See following resources:
- https://www.man7.org/linux/man-pages/man1/strace.1.html (
-e %net -zare helpful) - https://www.man7.org/linux/man-pages/man1/grep.1.html (
-Hnris nice for source code) - https://www.wireshark.org/download.html
- https://www.tcpdump.org/
- https://developer.mozilla.org/en-US/docs/Web/API/console/log_static
- https://pkg.go.dev/fmt#Println
- https://duckduckgo.com/?q=spirytus+rektyfikowany
- https://duckduckgo.com/?q=amphetamine+near+me
Maintenance
I think updating by copying all files in the empty repo over will be fine? Call it "professional installation required". And you're a professional.