I gave up ((2021-03-01) Massive Server Upgrade) and asked friend for help in setting up wildcard-SSL. She, who had nudged me to Linode years ago, suggesting after some initial work, that I move to Digital Ocean. So doing that.
Apr25
certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --agree-tos --manual --preferred-challenges dns -d 'flux.garden,*.flux.garden' → have to manually enter the TXT DNS record - I think there's no auto-renew with this approach...Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/flux.garden/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/flux.garden/privkey.pem
Your cert will expire on 2021-07-25. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
Apr26
git pull, but then realized it wouldn't be happy because I have changes that are a branch off.... So rename my local folder, then do git clone to get fresh copy.flask run on server, → fail File "/home/bill/wikiweb/config.py", line 4, in Config
SECRET_KEY = os.environ["SECRET_KEY"]
File "/usr/lib/python3.8/os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: 'SECRET_KEY'
.envfile which contains SECRET_KEYpip3 install python-dotenv then try again.envfile or .flaskenv? Ah, .env - so cp .envfile .envflask run runs, though it's the fake-server not nginxcurl localhost:5000/webseitz and get a flask error page, so that's promising...sudo systemctl restart wikiweb), hit, get promising redirect-then-fail/var/log/uwsgi/wikiweb.log etc) - need password for db (before didn't need password, psql was just accepting local connections)May01
.envfile - add DATABASE_URL='postgresql://username:password@host:port/database' to thatMay02
webseitz variations work (both outer and inner).May06
/etc/hosts file to stop grabbing flux.garden and instead grab flux2.garden - now the real one goes out to the real dig-ocean server so I can test the live server right. Hitting it fine.hunter record so it's paid/permitted, then hit that → outer shows fine, can log in, can edit inner, etc - so feels like digO server passes tests....How have to get my local server running again, after the various git games... so I can continue the code on that side.
May08
.env and .flaskenv from previous place.env for the local db-url, and for `SERVER_NAME = 'flux2.garden:5000'flask run → command not found: flaskvenv; flask run → running - so this is latest on how to launch on laptop - remember to have psql running firstMay14
Future
Edited: | Tweet this! | Search Twitter for discussion
Mentions: (2021-02-07) Migrating to Python3 | (2021-03-01) Massive Server Upgrade | (2022-02-11) Moving TwinPages to FluxGarden | (2022-08-25) Move webseitz to DigitalOcean | DigitalOcean | Git | GitHub | GitLab | Linode | NginX | Psql | SSL | UWsgi | WebPy
Backlinks: (2020-04-25) Move To DigitalOcean | (2020-10-12) Building user management in WikiFlux | (2021-02-07) Migrating to Python3 | (2021-03-01) Massive Server Upgrade | (2021-07-20) Renewing SSL | DigitalOcean | SSL | WikiFlux |