Creating your personal server
Joining a freezr server
The easiest way to use freezr is to join an existing server. (Multiple people can use the same freezr server if the server owner allows it.) For example, freezr.info is also a freezr server, and it allows you to set up a limited 'experimental' account, giving each user 3Mb of storage. But you can also 'bring your own storage', storing your data on dropbox, and point freezr.info to your own Mongo-comaptible database. If you do that, you can store as much data as you like (cause it's your storage!) and freezr then just acts like a 'thin client' holding your credentials and helping to serve your apps and data to you.. for your dropbox via the freezr server to your browser.
Installing a new freezr server
You can also install your freezr in just a few minutes on an actual physical server, or on various cloud services such as Heroku and Amazon AWS, or, for the easiest option try freezr on replit or glitch.
Set up your freezr on replit in just a few seconds.
Replit
Once you create an account on replit, press the "Create Repl" button, and then "Import from Github" where you point to Freezr's github repo: https://github.com/salmanff/freezr - A dialogue will ask you to configure replit. Leave the default settings -> ‘use run command’ and 'npm run start’. Dont change anything and press ’done’. After a few second, a 'Run' button will appear - press it. (You can ignore the ‘upgrade to get more resources’ button.) You have your freezr server!
Important point: You need to create a private repl to keep your data confidential. You can create a public instance to play around with freezr but any data you store locally will be visible to all.
Alternatively, you can use a public replit, and keep your data confidential by setting up replit 'secrets' and create environment variables to store your data outside replit.
Notes and Known Issues
Please re-read the above on public replits. If you create a public repl using the server's file system, your data will be visible to all.
Also note that (probably because of the way freezr manages cookies) replit's webview doesn't persist cookies well, so you need to use freezr by copying the url from the webview tab into a new browser tab after freezr is set up.
Glitch
Either, Go to https://glitch.com/edit/#!/freezr-server which is an instance of ther freezr server on glitch, and click on the logo on "Remix" to create your own instance.
Or, sign to Glitch, and press on "new Project", "Import from Github" and pointing to the freezr repo on github https://github.com/salmanff/freezr-server.git.
Press "Preview" and then "Preview in a New Window". You have your freezr server!
Notes and known Issues:
You should press "sign in" to create an account on glitch too, and be able to access your server code.
If you choose to use a third party file system (eg aws, dropbox), note that your secret credentials will still be kept on the glitch instance.
All your personal data (including credentials) is kept in the .data directory, which you cant see on the online interface, but you can see all the data if you download the project.
Install freezr on your own computer or a development server
Download node and follow the instructions to install it, mostly pressing "Next" on all screens.
Download freezr and and extract it to a directory.
Open a command window (windows) or terminal (mac) and navigate to your "program folder".
Type "npm install" enter. node will install dependent packages, and then type "node server" and press enter.
Your freezr is now accessible at localhost:3000.
Install freezr on cloud servers such as Heroku
If you know how to set up a node server on any one of cloud services, you can set up freezr as well. Here is an example of the steps needed to install on Heorku.
Go to Heroku and login or create an account
Click here to create an "app"
Choose an app name (and change your region if you like) and click on "Deploy App"
Wait a minute or so as the app deploys, and.... You have your freezr server!
Feel free to look at the console at the bottom of the page to see the deployment progress, or just open a new browser window and skip to the step below to set up a mongo database.
A few notes
That's it for the server! You have it running at https://[your freezr app name].heroku.com
To set up environment variables, go to your dashboard, by pressing "Manage App". Press the "Settings" menu, and then press "Reveal Config Vars".
Initial Parameters
When you first set up your freezr server, you need to set the initial parameters: the first (admin) user's name and password to access the site, as well as your choices for storage system and database - ie where freezr should store your files and data.
If you are setting your freezr up on a local server or using services like replit and glitch, you can choose to use the local file system. But most cloud based servers delete any additional files every time they reboot, so you would need to use outside storage services (like AWS's S3) and store your credentials (tokens) on your server platform's environment variables. Once these are set up, then freezr will read them at launch and offer you to store your files there. Current choices are:
File System Choices
Dropbox file system
Go to dropbox.xom/apps (or press on the "Open Apps" button on top of the Settings page) and create an app. Once your 'dropbox app' is created you can copy the access token.
Enter the following credentials:
key: "FREEZR_FS", value: "dropbox"
key: "FS_TOKEN", value: your token
Amazon AWS's S3
Set up your S3 bucket and create a Secret Access Key.
Enter the following credentials on your server:
key: "FREEZR_FS", value: "aws"
key: "FS_ACCESS_KEY_ID", value: your access id.
key: "FS_SECRET_ACCESS_KEY", value: your secret access key
optional key: "FS_BUCKET", value: bucket name.
Note that the aws API needs to be updated to the new version and can be unstable.
A few notes
All files,including apps and user data will be stored under a folder called "users_freezr"
A system user called 'fradmin' will be created, and within fradmin's files, you will see a file appear called freezr_environment.js which also has your database credentials and any access token in it - so do not let any one see this!
Other file systems, from google drive to blockchain based dairdrive have worked on freezr, and have APIs (in need of updating) to run your file system if you like. Other file systems can be easily added by integrating the set of file system APIs used in this implementation of freezr.
Database Choices
freezr uses mongodb as the core database, not least because other companies provide mongodb-compatible databases (eg Microsoft Azure's Cosmos DB), and so freezr users are not locked into any one company.
Using your file system as a a database.
Alternatively, freezr can use a modified version of the mongodb-compatible nedb as your database. This option is specially useful when experimenting with freezr, but as the creator of nedb has stated, it is not suited for large production environmnets... eventhough, technically speaking, nedb ROCKS!
Using Mongo's Atlas as your database.
Go to mongodb.com and create an account by pressing "Start Free" or "Sign In" with an existing account.
Under Context, press ss "New Project" and give your project a name. Press Next and then "Create Project"
Press "Build a Cluster".
Choose AWS (or google or Azure), and a region, making sure it has a "free tier available" - press "Create Cluster".
Take a deep breath, happy not to care ewhat a "cluster" is, and wait a few minutes.
Press Connect
In the pop-up, under "(1) Whitelist your connection", press "add a different IP address. Under IP Address, type "0.0.0.0". (This is not the safest soltion but okay for sandbox apop purposes.)
Press "Add IP Adress"
Under "(2)"" Create a Mongo User", create a user name and password and press "Create User"
Press "Choose a connection method", and then "Connect Your Application". Make sure "Node.js" is chsoen under "driver"
Under connection string, press copy to copy it.
Enter the following credentials:
key: "FREEZR_DB", value: "mongoString"
key: "MONGO_STR", value: the string from Mongo Atlas above that looks like this: mongodb+srv://:@cluster0-wsdduy.mongodb.net/test?retryWrites=true&w=majority
Replace "" and "" in the string with the user name and password you created above under Mongo. and press "Add"
A local mongo instance (for development)
You can download the MongoDB Community Server and follow the instructions to install it.
You may need to open command window (windows) or terminal (mac) and navigate to the "bin" in the mongodb program folder. Then type: "./mongod --dbpath C:\freezr\userMongoFiles" + enter (or the equivalent path on mac.)
If you run Windows, you may need to run "./mongo" before the command above, or if you have downloaded mongo to the default directory, you can enter "C:\Program Files\MongoDB\Server\3.4\bin\mongo.exe" from any command window, followed by "C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe -dbpath c:\freezr\userMongoFiles" (assuming you had already created the userMongoFiles folder)
If you run linux, you should be able to figure out the equivalent commands yourself. ;)
Preferences
Under preferences, you can allow other users onto your server and set other preferences
You can also skip this and go straight to installing apps for your freezr server.