Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
Following the production guide created by Instructure for Canvas LMS Installation gave me a pretty tough time as there were so many steps and instructions missing from this guide.
I have created a detailed step-by-step guide incorporating all the missing steps which would save days of frustrations & debugging.
Complete Guide: https://elearningevolve.com/blog/install-canvas-lms/
I hope it benefits the community!
Solved! Go to Solution.
**** EDIT 1/9/2024 ****
I was able to get this up and running finally. My problem ultimately was that I did not have the minimum specs outlined in your post: I only had 2 CPU cores instead of 4 on my droplet. My underpowered droplet was not able to complete Step 5 properly.
I started over from scratch and was able to get Canvas running with a working admin login, but I still needed the following corrections/additional steps:
Hi @Adeel-Raza,
Thanks for sharing your resource. I am not an expert in this area at all, but one thing caught my eye: "We will install Canvas in your current user home directory so that there are no permission issues later on and the user is able to access the files." Maybe someone else in this group can comment, but installing Canvas to a user directory does not seem like a good practice for a production server (and maybe not even a test one). It may help avoid permission issues short term, but what if that user is later removed from the system because they retire, leave, are terminated, etc...? Couldn't that cause the entire Canvas install to be wiped out? Maybe I'm just misreading, or maybe that's how Canvas installs are usually done, but it just strikes me as odd. Anyone else have experience in this area and willing to comment?
-Chris
That's a very good point. Thank you for sharing your thoughts. I will look into updating the blog and pointing the install to /var/canvas instead.
**** EDIT 1/9/2024 ****
I was able to get this up and running finally. My problem ultimately was that I did not have the minimum specs outlined in your post: I only had 2 CPU cores instead of 4 on my droplet. My underpowered droplet was not able to complete Step 5 properly.
I started over from scratch and was able to get Canvas running with a working admin login, but I still needed the following corrections/additional steps:
Hello @Adeel-Raza
Thank you SO MUCH for providing this amazing guide. I really appreciate it.
Especially after struggling with the official instructions and not being able to install it.
Actually, it was the only one that I was able to access the login screen.
Unfortunately, I'm still having issues logging in. I get this error every time:
Invalid Authenticity Token
Even when I try to reinitialize the DB, I'm still getting this issue. :
RAILS_ENV=production bundle exec rake db:initial_setup
I would greatly appreciate any guidance or insight you can offer.
Thank you again.
Regards,
Luis
Glad to know that it was helpful.
I see a similar post on this issue and one user has mentioned here that it can be due to missing or incorrect SSL configuration. So
you can try looking into this.
You can also try to get the last 5 errors from your canvas instance from command line as below. It might have an additional hint.psql canvas-prod -c "select created_at, message from error_reports order by id desc LIMIT 5;"
Hey Adeel-Raza,
Thank you so much for your follow-up message. I appreciate all your support. Especially since all here is new for me.
I'm trying to run it in a HyperV machine to test it, but as I mentioned, it's been a frustration and no success with any guide. In this specific case, as you mentioned, maybe it is because I didn't set up the certbot part, since I'm just trying it locally and don't have any domain pointing to it.
Running this query on the database shows just an error with my SMTP config, but nothing related to the login credentials first set up in the install process.
Also, I tried to disable SSL on canvas-ssl.conf: setting the SSLEngine to Off, and also executing the command "sudo a2dismod ssl". Just for testing purposes, but no success either.
Anyways, thank you again for all your support. I will keep trying here.
Regards,
Luis
Hi, @Adeel-Raza . Your post helps me a lot to set up my instance and get it running. Kudos!
I had problems with the setup of canvas-rce-api. Trying to solve it, I found a user who noticed the lack of documentation for Apache Web Server and proposed to add documentation for this step using Passenger. The solution was overcomplicated, but I found a way to setup canvas-rce-api without leaving running the node app with `screen`command. I think its a more reliable solution. I share with you the steps:
Edit the canvas.conf file that you already created for the rails application on this way:
<VirtualHost *:80>
# Your previous config is something like below
ServerName example.domain
DocumentRoot /path/to/my/app
<Directory /path/to/my/app>
Allow from all
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
# These have been added:
Alias /subapp /websites/secondapp/public
<Location /subapp>
PassengerBaseURI /subapp
PassengerAppRoot /websites/secondapp
PassengerAppType node
PassengerStartupFile app.js
</Location>
<Directory /websites/secondapp/public>
Allow from all
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
</VirtualHost>
After that, enable the new config and restart apache.
$ sudo a2ensite canvas.conf && sudo systemctl restart apache2
In theory, Passenger would be able to run node by itself, but if you find issues (as it happened to me), just do this:
$ whereis node
(In my case, located in /etc/apache2/mods-available/Passenger.conf)
### Begin automatically installed Phusion Passenger config snippet ###
<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/bin/passenger_free_ruby
PassengerNodejs YOUR_NODE_PATH_HERE
# MORE CONFIG LINES
...
</IfModule>
### End automatically installed Phusion Passenger config snippet ###
$ sudo a2enmod passenger $ sudo systemctl restart apache2
@maclenn77 Thank you so much for sharing this bit. Will look into this and see if it works correctly for us too.
I'm glad that our guide has been helpful to you.
I found that your "ProxyPass" instructions in for the apache config to direct requests to canvas-rce-api were incomplete. Specifically, they only handled requests with paths like "/api/sessions" while there are many other types of requests the api should handle.
I found your instructions could be easily fixed in two steps:
1. Add a namespace path to the "app-host" value in dynamic_settings.yml e.g. "https://mydomain.com/rce"
2. Change the apache config file to use these lines:
ProxyPass /rce/ http://localhost:3001/
ProxyPassReverse /rce/ http://localhost:3001/
This way, ALL requests that canvas-rce-api should handle will be correctly directed to the backgrounded process on port 3001.
I have figured that the comment posted here is quite helpful if you face any issues with the RCe setup. Following this resolves any errors that you might have,
https://github.com/instructure/canvas-rce-api/issues/6#issuecomment-631818899
Thank you so much!
Your guide has made installing Canvas such a breeze! However, I'm still getting a challenge when installing the RCE. It breaks my Canvas installation every time! (And I've tried 5 times! And every time I came to a "403 Forbidden" message.) Eventually, through trial and error, I managed to install Canvas by leaving out this part of your guide.
But we all know we need the RCE for Canvas to work well, so has anyone figured out a solution?
I will really appreciate this as I'd like to update my institution's Canvas instance from the 2021 version to 2025.
Thank you once again.
Thanks for the installation guide at https://elearningevolve.com/blog/install-canvas-lms/
I got error message when I build assets , yarn build since the package.json in the recent canvas git repository requires react 18 but some tsx files uses react 17 syntax.
https://github.com/instructure/canvas-lms/blob/master/packages/canvas-rce/src/rce/plugins/shared/Upl...
https://github.com/instructure/canvas-lms/blob/master/packages/canvas-rce/src/rce/plugins/instructur...
https://github.com/instructure/canvas-lms/blob/master/packages/canvas-rce/src/rce/plugins/instructur...
https://github.com/instructure/canvas-lms/blob/master/packages/canvas-rce/src/rce/plugins/instructur...
https://github.com/instructure/canvas-lms/blob/master/packages/canvas-rce/src/rce/plugins/instructur...
I wonder if someone refactored tsx files. Thanks in advance.
To participate in the Instructure Community, you need to sign up or log in:
Sign In