Cloud backup service for the Rite text editor

Overview

rite-cloud

A cloud backup solution for the rite text editor. Written in Rust using Tide.

Usage

You can try out rite-cloud using the instance hosted here. If you would like to host your own instance of rite-cloud, read on.

Self-hosting

You'll need a working Rust toolchain, and openssl and sqlite3 installed.

Clone the repository and cd into it.

git clone https://github.com/xyzshantaram/rite-cloud
cd rite-cloud

Since rite uses GitHub for authentication, you will need to create a GitHub app and generate a client secret. Note down the redirect URL you set here, we'll use it later.

Once this is done, you'll need to set the following environment variables:

  • CLIENT_ID - The client ID of the GitHub app you created in the last step.
  • CLIENT_SECRET - The client secret you generated in the last step.
  • APP_URL - The local URL where you want your app to be, along with the port number. For example: 127.0.0.1:8080.
  • TOKEN_URL - The URL where the app will obtain its access token from. Set it to https://github.com/login/oauth/access_token.
  • AUTH_URL - The URL where the app will use for authorization. Set it to https://github.com/login/oauth/authorize.
  • REDIRECT_URL - The URL that GitHub will redirect to on successful auth. It should be the URL of where your app is hosted, followed by the string /auth/github/authorized. For example, the instance at https://riteapp.co.in has the REDIRECT_URL https://riteapp.co.in/auth/github/authorized
  • TIDE_SECRET - A string to use as the cookie signing secret. MUST be atleast 32 bytes long and should be cryptographically random to be secure.
  • DATABASE_URL - A path to an sqlite db (will be created if it doesn't exist) that will be used as the rite database.
  • FILE_LIMIT - the maximum size of an upload request.

Finally, run the app with cargo run --release. You should be able to open it by navigating to the APP_URL.

systemd service

To make your Rite Cloud instance start on boot, carry out the following steps:

Copy files
cd rite-cloud
cargo build --release
sudo mkdir /opt/rite-cloud
sudo cp "$PWD/target/release/rite-cloud" "/opt/rite-cloud/rite-cloud"
sudo chmod +x /opt/rite-cloud/rite-cloud # make it executable
sudo cp -r "$PWD/res" "/opt/rite-cloud/res"
sudo cp -r "$PWD/templates" "/opt/rite-cloud/templates"
Create a storage directory
sudo mkdir -p /opt/rite-cloud/storage
Set up the start script

Copy the start-rite-cloud.sh script to /opt/rite-cloud/start-rite-cloud.sh. Open it with your editor of choice and edit it to add the required environment variables.

sudo cp install-files/start-rite-cloud.sh /opt/rite-cloud/start-rite-cloud.sh
sudo nano /opt/rite-cloud/start-rite-cloud.sh

Make sure it is executable.

sudo chmod +x /opt/rite-cloud/start-rite-cloud.sh
Set up the systemd service

Next, copy the rite-cloud.service file to /etc/systemd/system and give it the correct permissions.

sudo cp install-files/rite-cloud.service /etc/systemd/system/rite-cloud.service
sudo chmod 644 /etc/systemd/system/rite-cloud.service

Finally, enable the service with systemctl.

sudo systemctl enable rite-cloud

You should now have an instance of rite-cloud set up that starts when your server does.

Updating

To update your rite-cloud instance, pull the latest copy of the source, build it, and then copy over the files to /opt/rite-cloud again.

cd rite-cloud
git pull
cargo build --release
sudo cp "$PWD/target/release/rite-cloud" "/opt/rite-cloud/rite-cloud"
sudo chmod +x /opt/rite-cloud/rite-cloud # make it executable
sudo cp -r "$PWD/res" "/opt/rite-cloud/res"
sudo cp -r "$PWD/templates" "/opt/rite-cloud/templates"

Uninstalling

To uninstall, just disable the service, and remove the /opt/rite-cloud dir along with /etc/systemd/system/rite-cloud.service.

Acknowledgements

  • async-sqlx-session used under the terms of the MIT license. I've temporarily forked it to fix the version of async-session until Tide updates with the correct fixes to the SQLite session middleware.

Contributing

To contribute code, feature ideas or bug reports, open an issue, or fork the repo and make a PR.

If you would like to help out with hosting costs or just like using rite-cloud, you can support me financially using one of the means listed here.

You might also like...
Wait Service is a pure rust program to test and wait on the availability of a service.

Wait Service Wait Service is a pure rust program to test and wait on the availability of a service.

A terminal-based text editor written in Rust
A terminal-based text editor written in Rust

Iota Iota is a terminal-based text-editor written in Rust. Here's what it looks like right now, editing itself. Motivation Iota was born out of my fru

A text editor in ≤1024 lines of code, written in Rust
A text editor in ≤1024 lines of code, written in Rust

Kibi: A text editor in ≤1024 lines of code, written in Rust A configurable text editor with UTF-8 support, incremental search, syntax highlighting, li

Aspiring vim-like text editor
Aspiring vim-like text editor

Rim Rim is an aspiring Vim-like text editor written in Rust. Current state Rim is in an early prototype stage. This means that you can load, edit and

An independent Rust text editor that runs in your terminal!
An independent Rust text editor that runs in your terminal!

Ox editor Ox is a code editor that runs in your terminal. About The Project Ox is a code editor. It was written in Rust using ANSI escape sequences. I

An experimental next-generation Electron-based text editor
An experimental next-generation Electron-based text editor

Attention: GitHub has decided not to move forward with any aspect of this project. We'll archive the repository in case anybody finds value here, but

Web base text editor written in rust
Web base text editor written in rust

Ultron Ultron is a web based monospace text-editor with syntax highlighting, completely written in rust. I wrote this code editor for my very specific

 Amp: A text editor for your terminal.
Amp: A text editor for your terminal.

Amp: A text editor for your terminal. Heavily inspired by Vi/Vim. Amp aims to take the core interaction model of Vim, simplify it, and bundle in the e

ReVi is a cross-platform terminal based Vim inspired text editor.
ReVi is a cross-platform terminal based Vim inspired text editor.

ReVi Table Of Contents: About Usage Install Clone && Installing Development Q&A KeyBindings Roadmap Changelog About ReVi is a cross-platform terminal

Ginkgo is a text editor built entirely in Rust
Ginkgo is a text editor built entirely in Rust

Ginkgo is a text editor built entirely in Rust. It supports cursor movements, CTRL commands, select vim commands, insert vs. normal modes, and more. Ginkgo is based on my text editor JED, which itself was based on the popular online editor Kilo.

Lisp and Rust in a text editor = Crispmacs

crispmacs crispmacs is a WIP implementation of Emacs from scratch in Rust. It consists of two parts: crisp and the editor. Crisp crisp is a Lisp that'

Archeum - a minimalist text editor

Archeum About The Project Archeum is a minimalist text editor that is really usefull if you've been in the vim psychosis for to long. Reject plugins,

(An attempt to write) a modal text editor

kaka (An attempt to write) a modal text editor. NOTE: The project is very young and certainly not ready for use. Current project goals keymap and mode

A basic text editor, written in Rust (hence the name).

rut A basic text editor, written in Rust (hence the name). Why, though? I just wanted a basic TUI text editor (like Nano) that could: Be used with all

Simple yet powerful multi-line text editor widget for tui-rs and ratatui
Simple yet powerful multi-line text editor widget for tui-rs and ratatui

tui-textarea tui-textarea is a simple yet powerful text editor widget like textarea in HTML for tui-rs and ratatui. Multi-line text editor can be ea

nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor.

🔗 nvim-oxi nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor. The project is mostly intended for p

Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.

Valheim Docker If you are looking for a guide on how to get started click here Mod Support! It is supported to launch the server with BepInEx but!!!!!

Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files

RouterOS-Backup-Tools Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files Usage examples Info cargo run -- info -i MikroTik.backup D

It is a backup tool that creates backups and stores them on an object storage
It is a backup tool that creates backups and stores them on an object storage

Hold My Backup It is a backup tool that creates backups and stores them on an object storage. By default it uses minio but you can use AWS: S3 as well

Owner
Siddharth Singh
Just a guy on the internet, writing code for fun and hopefully someday profit.
Siddharth Singh
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Simple utility to backup/sync data between devices to the cloud

RSink Simple utility to backup/sync data between devices to the cloud Features ?? Blazingly Fast ⛽ Lightweight ?? Cross-platform, runs everywhere ?? S

Abdulrahman Salah 4 Sep 3, 2022
Dip editor: Multi-platform Text editor purely written in Rust

dip editor Multi-platform Text editor purely written in Rust, supercharged by Bevy game engine and Dioxus UI framework. heavily in development Why Gam

Junichi Sugiura 270 Jan 4, 2023
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023
WriteForAll is a text file style checker, that compares text documents with editorial tips to make text better.

WriteForAll: tips to make text better WriteForAll is a text file style checker, that compares text documents with editorial tips to make text better.

Joel Parker Henderson 2 Dec 27, 2022
By mirroring traffic to and from your machine, mirrord surrounds your local service with a mirror image of its cloud environment.

mirrord lets you easily mirror traffic from your Kubernetes cluster to your development environment. It comes as both Visual Studio Code extension and

MetalBear 2.1k Jan 3, 2023
Marko Editor is a simple WYSIWYG editor for note taking.

Marko Editor Marko Editor is a simple WYSIWYG editor for note taking written in Rust and GTK 4. It uses Markdown as storage format and can read simple

Michael 49 Jan 6, 2023
TIF is a terminal_image_format. (theres no TIF editor, so i made TIF images through a hex editor lol)

Colors these are the colors you can use when displaying images on the terminal BYTES: 5A = BLUE 5B = BLACK 5C = RED 5D = GREEN 5E = PURPLE 5F = WHITE

buzz 5 Dec 23, 2022
Rust library to generate word cloud images from text and images !

wordcloud-rs A Rust library to generate word-clouds from text and images! Example Code use std::collections::HashMap; use std::fs; use lazy_static::la

Teo Orthlieb 2 Dec 8, 2022