Running the App Server on Lightsail

This might exit the realm of Anvil discussion (sorry)

I was following these steps for setting up on Lightsail and I ran into port binding permission issues.
(Note: out of preference, I’m using debian over ubuntu)

I completed the step:

~# echo 'net.ipv4.ip_unprivileged_port_start=0' > /etc/sysctl.d/50-unprivileged-ports.conf
~# sysctl --system

as directed, but the Let’s Encrypt integration magic via Traefik proxy fails:

(env) admin@ip-xxx-xxx-xxx-xxx:~$ anvil-app-server --app Hello__World --origin https://xyz.xyz/
Found Anvil App Server JAR in package directory
Launching HTTPS Server on port 443
Traefik dashboard: http://localhost:27481/dashboard/
Extracting Traefik to /home/admin/.anvil-data/traefik/bin
(/home/admin/.anvil-data/traefik/bin/anvil-traefik --log.level=info --providers.file.filename=/home/admin/.anvil-data/traefik/traefik.yml --api=true --api.dashboard=true --entrypoints.dashboard.address=127.0.0.1:27481 --entrypoints.https.address=0.0.0.0:443 --certificatesResolvers.letsEncrypt.acme.tlsChallenge=true --certificatesResolvers.letsEncrypt.acme.storage=.anvil-data/letsencrypt-certs.json)
INFO[0000] Configuration loaded from flags.
INFO[2020-08-03T15:47:03Z] Traefik version 2.2.0 built on 2020-03-25T17:32:57Z
INFO[2020-08-03T15:47:03Z]
Stats collection is disabled.
Help us improve Traefik by turning this feature on :)
More details on: https://docs.traefik.io/contributing/data-collection/
2020/08/03 15:47:03 traefik.go:72: command anvil-traefik error: error while building entryPoint https: error preparing server: error opening listener: listen tcp 0.0.0.0:443: bind: permission denied
Reverse proxy exited with code 1
Runtime exiting. Shutting down Traefik.

Does the python env maybe remove the unprivileged port override?

Flagged for user error :sweat_smile:

Shot myself in the foot when I chose debian.
Lightsail’s debian option is 9.5 running kernel 4.09

ip_unprivileged_port_start does not exist until 4.11

The ubuntu option is 18.04 and is running kernel 4.15

2 Likes