Show pageBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Standard Notes ====== ===== Installation ===== $ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ curl -sSL https://get.rvm.io | bash -s stable $ source ~/.rvm/scripts/rvm $ rvm install ruby $ rvm use ruby $ gem install bundler ===== Setup ===== ==== MySQL ==== See [[selfhosted:mysql|MYSQL]] to: - install - create user - create databases - grant user privileges to the databases - flush privileges ==== passenger ==== $ sudo apt-get install rubygems $ gem install rubygems-update -no-rdoc -no-ri $ update_rubygems $ gem install passenger -no-rdoc -no-ri $ sudo apt-get install libcurl4-gnutls-dev $ rvmsudo ~/rvm/passenger-install-nginx-module $ rvmsudo ~/rvm/passenger-config validate-install ==== nginx ==== See [[selfhosted:nginx|NGINX]] to set up certificates and keys $ sudo nano /opt/nginx/conf/nginx.conf < /opt/nginx/conf/nginx.conf > server { listen 443 ssl default_server; ssl_certificate /opt/nginx/ssl/snotes.crt; ssl_certificate_key /opt/nginx/ssl/snotes.key; server_name localhost; passenger_enabled on; passenger_app_env production; root /opt/ruby-server/public; } # start nginx server $ sudo /opt/nginx/sbin/nginx # restart # $ sudo /opt/nginx/sbin/nginx -s reload ==== rubyserver ==== $ sudo apt-get install default-libmysqlclient-dev $ cd /opt $ git clone https://github.com/standardfile/ruby-server.git $ cd ruby-server $ bundle install # $ bower install ==== rails ==== rails: $ rails asset:precompile $ sudo nano .env < .env > RAILS_ENV=production SECRET_KEY_BASE=use "bundle exec rake secret" DB_HOST=localhost DB_PORT=3306 DB_DATABASE=${database} DB_USERNAME=${user} DB_PASSWORD=${password} SALT_PSEUDO_NONCE=use "bundle exec rake secret" $ rails db:migrate References: https://docs.standardnotes.org/self-hosting/self-hosting-with-ec2-and-nginx selfhosted/standardnotes.txt Last modified: 2023/07/03 02:17by hli