Giter VIP home page Giter VIP logo

syncing-server's Introduction

Standard Notes Syncing Server

You can run your own Standard Notes server and use it with any Standard Notes app. This allows you to have 100% control of your data. This server is built with Ruby on Rails and can be deployed in minutes.

Requirements

  • Ruby 2.3+
  • Rails 5
  • MySQL 5.6+ database

Getting started

  1. Clone the project:

    git clone --branch master https://github.com/standardnotes/syncing-server.git
    
  2. Create a .env file in the project's root directory. See .env.sample for required values.

  3. Initialize the project:

    bundle install
    bundle exec rails db:create db:migrate
    
  4. Start the server:

    bundle exec rails server
    

Tests

The syncing-server uses RSpec for tests.

To execute all of the test specs, run the following command at the root of the project directory:

bundle exec rspec

Code coverage report is available within the coverage directory.

Disabling new user registrations

  1. Set the DISABLE_USER_REGISTRATION environment variable to true
  2. Restart the syncing-server

Docker setup

Docker is the quick and easy way to try out Standard Notes. We highly recommend using our official Docker hub image.

Standalone instance

Before you start make sure you have a .env file copied from the sample .env.sample and configured with your parameters.

If your intention is not contributing but just running the app we recommend using our official image from Docker hub like this:

docker run -d -p 3000:3000 --env-file=your-env-file standardnotes/syncing-server:stable

Or if you want to use the develop branch that is in a work-in-progress state please use:

docker run -d -p 3000:3000 --env-file=your-env-file standardnotes/syncing-server:latest

You can then access the server via the Desktop application by setting the Sync Server Domain (Under Advanced Options) to http://localhost:3000

Heroku

You can deploy your own Standard Notes server with one click on Heroku:

Deploy

Raspberry Pi

You can run your own Standard Notes server on a Raspberry Pi using docker-compose.

Requirements

  • A Raspberry Pi running Raspbian OS
  • Docker (you can install it using the convenience script)

Getting started

  1. Install libffi and libssl dependencies:

    sudo apt install -y libffi-dev libssl-dev
    
  2. Install python3 and python3-pip:

    sudo apt install -y python3 python3-pip
    
  3. Install docker-compose:

    sudo pip3 install docker-compose
    
  4. Setup your .env file and run:

    docker-compose -f docker-compose.yml -f docker-compose.raspberry-pi.yml up -d
    

Tested on a Raspberry Pi 4 Model B

Contributing

For contributing we highly recommend you use our docker-compose setup that is provided in this repository.

Docker compose setup

Use the included docker-compose.yml file to build Standard Notes with docker-compose. Once your .env file has been copied and configured, simply run:

docker-compose up -d

This should load the syncing-server and MySQL database containers and run the necessary migrations. You should then be able to reach the server at http://localhost:[EXPOSED_PORT] . For example, if inside of my .env file I set "EXPOSED_PORT=7459" I could reach the syncing-server via http://localhost:7459

To stop the server, cd into this directory again and run docker-compose down

Your MySQL Data will be written to your local disk in the data folder to keep it persistent between container runs.

syncing-server's People

Contributors

arielsvg avatar bryvin avatar dependabot[bot] avatar johnny243 avatar karolsojko avatar moughxyz avatar rklasen avatar theodorechu avatar thepill avatar wonderfall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.