Mastodon Setup - Did Not Find Expected Key SECRET_KEY_BASE
I'm following this guide for creating a Mastodon server on Ubuntu 20.04
On step 6 of section "Configure Docker Compose" when running this command:
echo SECRET_KEY_BASE=$(docker-compose run --rm web bundle exec rake secret)
I'm getting this returned
yaml: line 84: did not find expected key
SECRET_KEY_BASE=
As opposed to the example shown as
$ echo SECRET_KEY_BASE=$(docker-compose run --rm web bundle exec rake secret)
Creating mastodon_web_run ... done
SECRET_KEY_BASE=8bc28644a18cc8f8e30ba30087b71e29ed0b53fcdfc6
Any help appreciated, thank you
Originally I was getting "command not found," and apparently docker compose didn't install correctly
When using this command, which is the same one in the Docker guide here
sudo curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
I had to add v1.25.4
(and replace with the latest version number)
4 Replies
✓ Best Answer
Apparently the docker-compose.yml
file had an extra 2 spaces in it and because of that the command echo SECRET_KEY_BASE=$(docker-compose run --rm web bundle exec rake secret)
didn't work
This is a comment I can't delete, but I changed the question slightly, because I found the first answer
Try:SECRET_KEY_BASE=$(docker-compose run --rm web bundle exec rake secret) as listed in https://www.linode.com/docs/guides/install-mastodon-on-ubuntu-1604/
I did that already, and I'm showing in my question exactly what the output was.