How do you apply .env.production changes?


I recently got my DNS set up with mailgun and I entered the information on the SMTP pages in .env.production with nano. I saved the file, but how do I update my mastodon instance so that it sees these changes? A user signed up the next day after I made the changes and they did not get an email confirmation, so I don’t think the changes were applied.



You need to restart ruby processes I am afraid.



How do I do that exactly? It seems like I can’t just run rails restart



Just stop mastodon and start again. It depends how you do that on your system. If you do start mastodon on system start, it will be the same usually with start replaced with stop and then start or just restart.

For some operating systems using the Linux kernel and a program called systemd there is an introduction how to do this in the official documentation:



run below cmd and you good to go
sudo systemctl restart mastodon-*

Sometime restart cmd doesnt work in starting the services i encounter this during update so you can do them one by one i added the cmd below

systemctl stop mastodon-web && systemctl stop mastodon-streaming && systemctl stop mastodon-sidekiq

systemctl start mastodon-web && systemctl start mastodon-streaming && systemctl start mastodon-sidekiq