-
-
Notifications
You must be signed in to change notification settings - Fork 967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build instructions seem out of order in https://docs.joinmastodon.org/admin/install/ #857
Comments
I came here to report the same issue about yarn. (running on debian 10)
before
this might be the one reason why my instance failed to load yesterday on one of my VMs. I am building it again and will report back if there's a problem. |
Yeah, just encountered the certbot issue as well: Commented out: ❯ certbot --nginx -d <domain>
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/mastodon:25
nginx: configuration file /etc/nginx/nginx.conf test failed
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/mastodon:25\nnginx: configuration file /etc/nginx/nginx.conf test failed\n') Uncommented: ❯ certbot --nginx -d <domain>
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/<domain>/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/<domain>/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] cannot load certificate "/etc/letsencrypt/live/<domain>/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/etc/letsencrypt/live/<domain>/fullchain.pem\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n') |
Better workaround than above: First obtain the certificate, then enable the site. |
Nevermind - that modifies the "default" site |
The simplest way to fix the nginx problem is to run certbot in |
Bumping, the latter issue seems to be a pretty big oversight and shouldn't be too hard to fix in the instructions. I'd open a pull myself but I'm not sure which solution is preferable. Personally I fixed it by deleting everything after line 25 in the config, running certbot, then re-adding the deleted |
I just ran into this issue. This really needs to be fixed ASAP. |
still a issue |
This issues still exists. I needed to comment out the whole HTTPS block before running |
Thanks @L1ving for the workaround, that worked flawlessly. But I also feel that this should really be fixed as it makes the installation unnecessarily complicated. |
Yep, still an issue, the docs should have: # edit /etc/nginx/sites-available/mastodon to replace example.com with your own domain name
# uncomment ssl_certificate and ssl_certificate_key
sudo service nginx stop
certbot certonly --standalone -d your_domain_name
sudo service nginx start |
@xeruf But I edit the Step 1
Step 2
Step 3
Step 4
|
FYI, if you've used the |
Hi, I have just installed mastodon in the last couple of days. For the most part everything was fine. And I think the docs are super. I had 3 issues ...
Otherwise... thanks for the code! |
|
@tomtom94 Change |
@trwnh I am using VirtualBox and I just wanna resolve example.com in my local /etc/hosts just for fun |
@tomtom94 LetsEncrypt won't work then, you need a publicly resolvable domain name to get a LetsEncrypt certificate |
The nginx problem exists for Proxying object storage through nginx as well. I followed #857 (comment) for workaround but later I also had to modify the renewal confiuguration in
in order to make automatic renewal work. |
Expected behaviour
Install should work by following steps in https://docs.joinmastodon.org/admin/install/
Actual behaviour
Node and Yarn
The instructions say to add Node.js and Yarn ubuntu package sources - obviously cos you want the latest versions. That's fine but :
A)
After adding the Node.js package, nothing actually installs it. Don't you want a "apt-get install -y nodejs" here?
B)
After adding the Yarn package again nothing actually installs it. Worse, in the "apt install -y " step yarn is included, so you end up with the old version of yarn.
I got the error: "yarn: error: no such option: --pure-lockfile"
To solve this I had to
Certbot
The instructions say: "Then edit /etc/nginx/sites-available/mastodon to replace example.com with your own domain name, .... Reload nginx for the changes to take effect:"
Reloading fails with "no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/mastodon:25" which is fair enough.
The certbot command then fails because of this.
To fix, I backed up /etc/nginx/sites-available/mastodon, edited it to remove the whole SSL block, ran certbot fine, then restored the backup and commented in the 2 lines pointing to the cert.
(After this, I had an odd issue where the usual nginx restart command wouldn't work because ports were already in use. I had to manually kill nginx processes and then start them.)
Steps to reproduce the problem
Just trying to install Mastadon on my own server, using https://docs.joinmastodon.org/admin/install/
Specifications
Ubuntu 20 LTS
v3.3.0
The text was updated successfully, but these errors were encountered: