Installation
Old instructions specify using the outdated syncing-server
repository.
The newer server written using Javascript can be found here.
Blocking
Currently facing a connect ECONNREFUSED 127.0.0.1:80
error when attempting to access the sync server, also encountered in this issue.
As per typical webserver convention, leave this in the webroot.
$ mkdir /var/www/standardnotes $ cd /var/www/standardnotes $ git clone --single-branch --branch main https://github.com/standardnotes/standalone.git $ cd standalone $ ./server.sh setup
Run the setup script to generate the required configuration files, and add 32-byte keys (can generate them using openssl rand -hex 32
) to the following secrets: AUTH_JWT_SECRET, JWT_SECRET, LEGACY_JWT_SECRET, ENCRYPTION_SERVER_KEY. Change the docker-compose.yml
file from version 3.8 to 3.7 if necessary (depending on your version of docker compose).
In particular, modify the following files:
vim au
- .env
LOG_LEVEL=info NODE_ENV=development ... AUTH_JWT_SECRET=c5de882116a335c6aada9b13696a16372bd3e452f91339f761373a54e43f91d8 EXPOSED_PORT=3002 ...
- docker/auth.env
LOG_LEVEL="info" NODE_ENV="production" ... JWT_SECRET=c5de8821535335c6aada9b13466a16372b2d645bf41339f761373844e43f91d8 LEGACY_JWT_SECRET=7831926372b87fdca9ea09d6b3dc17e310ac6d0c392cd6a75851a7c059327662 ... ENCRYPTION_SERVER_KEY=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
Do the usual nginx configuration:
- standardnotes
server { listen 80; listen [::]:80; # IPv6 server_name sync.pyuxiang.com; access_log /var/log/nginx/standardnotes-access.log; error_log /var/log/nginx/standardnotes-error.log; client_max_body_size 50M; location / { proxy_pass http://127.0.0.1:4321; } }
Finally run the server script: ./server.sh start
. To teardown: ./server.sh cleanup
Tip
If migrating from legacy server, dump the previous SQL database as dbdump.sql
and drop it under standardnotes/standalone/data/import
.