Standard Notes is an opensource web-based notes application.
There are a few officially support install methods, including Docker, "Baremetal" and on Heroku.
I'm going to continue on with the "Baremetal" variant here. I'd tried the Docker version initially, but never could get it running
git clone https://github.com/standardnotes/syncing-server.gitcd docker/environments/
cp .env.app.production.template .env.app.production
cp .env.db.production.template .env.db.production.env.app.production cat .env.app.production
RAILS_ENV=production
SECRET_KEY_BASE=use "bundle exec rake secret"
RAILS_SERVE_STATIC_FILES=true
DB_CONNECTION=mysql
DB_HOST=db
DB_DATABASE=standardnotes
DB_USERNAME=root
DB_PASSWORD=.env.db.productionMYSQL_ROOT_PASSWORD=gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install ruby
gem install bundlersudo apt install mariadb-client mariadb-server
sudo mysql_secure_installationmysql -u root -p
> create database standard_notes;
> quit;gem install rubygems-update
update_rubygems
gem install passengersudo apt install libcurl4-openssl-dev
passenger-install-nginx-module
passenger-config validate-installThis will install a second copy of nginx for passenger / ruby applications. In order for this to play nice with an existing installation of nginx, for example. You'll want to go to the config file /opt/nginx/conf/nginx.conf and change the listen port from 80 to something else which is still open on your system, like 81. Then we can reverse proxy that out to the world via the original nginx installation. We can then use the original nginx installation for SSL termination as well. We'll come to that configuration part later..
cd back into the folder where you have the server repo cloned and run the following:
bundle install
rails assets:precompile.env file in the root of this project directory.And paste in the following template:
RAILS_ENV=production
SECRET_KEY_BASE=use "bundle exec rake secret"
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=standard_notes
DB_USERNAME=root
DB_PASSWORD=rails db:migrateYou can use my source here: https://paste.ndo.dev/ozehuwiceq
/opt/nginx/sbin/nginxAnd now if you visit your URL that you set in the nginx config above, you should see something like:
Remember this is not the Standard Notes frontend web application - this is just the backend server.
In the Account menu, enter the address of your new server in "Sync Server Domain" under "Advanced Options".
Then, register for a new account, and begin using your private new secure Standard Notes server!