documentation
documentation copied to clipboard
Documentation is not up-to-date
Hi!
im tring to install my own mastodon Server rn, but i cant get it to work. I followed exactly every step like it is described in the install from source docs.
mastodon:setup breaks because database does not have the right tables and so on, but the setup should do that on its own. Ubuntu 18.04 machine.
bin/rails:4:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create
(See full trace by running task with --trace)
That failed! Perhaps your configuration is not right
The final step is compiling CSS/JS assets.
This may take a while and consume a lot of RAM.
Compile the assets now? Yes
Running `RAILS_ENV=production rails assets:precompile` ...
yarn install v1.22.5
[1/6] Validating package.json...
[2/6] Resolving packages...
[3/6] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/6] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "react-redux@^3.0.0 || ^4.0.0 || ^5.0.0".
[5/6] Building fresh packages...
[6/6] Cleaning modules...
Done in 19.02s.
I, [2020-11-19T20:16:23.481535 #29557] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/admin/application-a644908e7bab54fb749be0f59fb64a7480bbf9c4c2b79d4a65791cb7ab4d8730.css
I, [2020-11-19T20:16:23.481792 #29557] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/admin/application-a644908e7bab54fb749be0f59fb64a7480bbf9c4c2b79d4a65791cb7ab4d8730.css.gz
I, [2020-11-19T20:16:23.490347 #29557] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/application-c93dac2ad9d65e3393e0e2c958481e86ef7a5e5b0f6ce406842a7b99b25a4850.css
I, [2020-11-19T20:16:23.490492 #29557] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/application-c93dac2ad9d65e3393e0e2c958481e86ef7a5e5b0f6ce406842a7b99b25a4850.css.gz
I, [2020-11-19T20:16:23.492655 #29557] INFO -- : Writing /home/mastodon/live/public/assets/pghero/favicon-db10337a56c45eb43c22ff5019546b520fa22c7281d4d385f235cbca67ed26bb.png
I, [2020-11-19T20:16:23.700298 #29557] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-87b7850fd393b53b385603a88e606efeb7d09e6f4c34f9abc1835ddbb41fbe80.js
I, [2020-11-19T20:16:23.700503 #29557] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-87b7850fd393b53b385603a88e606efeb7d09e6f4c34f9abc1835ddbb41fbe80.js.gz
I, [2020-11-19T20:16:23.709581 #29557] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-91a51e56fd7a8fe6fa10d1ccccf54a9e628dc3f4a47682ba17989cf58fd5dfd2.css
I, [2020-11-19T20:16:23.709742 #29557] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-91a51e56fd7a8fe6fa10d1ccccf54a9e628dc3f4a47682ba17989cf58fd5dfd2.css.gz
Compiling...
Compiled all packs in /home/mastodon/live/public/packs
Done!
All done! You can now power on the Mastodon server 🐘
Do you want to create an admin user straight away? Yes
rake aborted!
ActiveRecord::NoDatabaseError: FATAL: database "mastodon_production" does not exist
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:696:in `rescue in connect'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create (See full trace by running task with --trace) That failed! Perhaps your configuration is not right
It seems like the part of the wizard that creates the database failed. I don't see any more information here, sadly. What values have you entered for the PostgreSQL connection?
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create (See full trace by running task with --trace) That failed! Perhaps your configuration is not right
It seems like the part of the wizard that creates the database failed. I don't see any more information here, sadly. What values have you entered for the PostgreSQL connection?
I did not setup anything special. I was testing so i just pressed enter and did not setup a password. The other options were localhost and the Port, which did match the suggestions.
localhost is probably the problem because while you can connect through localhost you can't use ident authentication (passwordless, based on unix user) through it. You'd need to use /var/run/postgresql as the host (unix socket). I'm not sure if this is failure of the documentation or of the mastodon:setup script...
Just edit .env.production and the DB_HOST value. You can then run RAILS_ENV=production bin/rails db:setup
. It won't auto-create an admin user without the interactive wizard (so you may want to re-run that if you don't mind re-entering all values) but it's not too difficult to just sign-up from the website once it's up and then turn your new account into admin using RAILS_ENV=production bin/tootctl accounts modify YOUR_USERNAME --role=admin
Well, sorry. I've meant /var/run/postgresql, i did not enter localhost. As i Said, i basically just pressed return.