Can't get reverse proxy (nginx) running



I am trying to migrate from GPM to a self-hosted solution and I am experimenting with FW since the UI/UX looks decent.

I am running Debian 9.0 on Google Cloud. I don’t have anything else installed on that instance.

I was able to successfully install Docker, Docker Compose and FW.

However, right now I get a “If you see this page, the nginx web server is successfully installed and working. Further configuration is required” landing page on my FW domain.

I am guessing the problem is with this step of the installation process:

In particular, I can’t seem to get the “# create a final nginx configuration using the template based on your environment” commands to execute.

I first run “set -a && source /srv/funkwhale/.env && set +a” and it seems to go through.

When I try and run the following command:

sudo envsubst “env | awk -F = '{printf \" $%s\", $$1}'
< /etc/nginx/sites-available/funkwhale.template \


I get the following error:

awk: line 1: syntax error at or near printf
-bash: /etc/nginx/sites-available/funkwhale.conf: Permission denied

I am a noob at linux, but I can follow instructions. Any help would be appreciated.




Can you try as a root user su root, then launching the command again?


I am not getting any errors when running the commands mentioned above. But now I am getting errors when running “nginx -t”:

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/HOSTNAME/fullchain.pem") failed (SSL: >error:02001002:system library:fopen:No such file or directory:fopen(’/etc/letsencrypt/live/HOSTNAME/fullchain.pem’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

I will try and create a brand new VM and report back.

Thanks for the tip regarding root!


It’s because you need a SSL certificate to serve your instance over SSL (you can either disable SSL by hand, or setup one and update the certificate path in the nginx conf)


I believe I chose HTTP not HTTPS in the .env file. Or does this refer solely to the FW configuration and I have setup nginx to work on HTTP before I get Letsencrypt running?

I noticed that v0.18 has a different set of instructions for Docker installs. I will try and fiddle around some more to see what I can do.


The nginx template do not take this variable into account and assume you’re running over HTTPS. You need to get the certificate yourself, for instance with sudo certbot certonly -d yourdomain.funkwhale