• Stars
    star
    390
  • Rank 110,242 (Top 3 %)
  • Language
    JavaScript
  • Created over 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The "cloud" at home

Home Cloud

Host your own cloud at home

Table of Contents

Development Setup

First, clone the repo and cd into the project:

git clone https://github.com/antoniosarosi/home-cloud.git
cd home-cloud

Local setup (Linux & Windows)

Install dependencies:

cd server
npm i
cd ../client # ..\client on Windows
npm i
cd ..

Run locally

Backend

Move to the server directory:

cd server

Open sample.env and copy its content into a new file named .env, then set the correct value for HOME_CLOUD_STORAGE. Now start the server:

npm run dev

Frontend

Move to the client directory:

cd client

Open sample.env and copy its content into a new file named .env, then set the correct value for REACT_APP_API_URL. Finally, start the development server:

npm start

Backend will be running on port 5000 and frontend on port 3000 (if not already in use).

Docker (Linux)

First, set the correct value for HOME_CLOUD_STORAGE env variable:

export HOME_CLOUD_STORAGE="/home/user/example"

Then create a .env file in ./client/ and set this value:

REACT_APP_API_URL="http://localhost:8081"

Install dependencies:

docker-compose run express npm i
docker-compose run react npm i

Run on Docker containers

docker-compose up

Backend will be running on port 8081 and frontend on port 8080 (if not already in use).

Production Setup

Local (Linux & Windows)

Backend

Move to ./server/ and set the correct value for HOME_CLOUD_STORAGE in .env (see examples in sample.env), and then run npm start:

npm start

Frontend

Move to ./client/ and create a file named .env.production, set the correct value for REACT_APP_API_URL (see examples in sample.env). Then, install serve globaly:

npm i -g serve

Build the app:

npm run build # Or yarn build

Start the server:

serve -s build -l 3000 # Or another port of your choice

Docker (Linux)

First, set the correct value for HOME_CLOUD_STORAGE env variable:

export HOME_CLOUD_STORAGE="/home/user/example"

Then create a .env.production file in ./client/ and set the correct value for the API URL (your IP address and port 8081):

REACT_APP_API_URL="http://192.168.1.2:8081"

Build images and run containers:

docker-compose -f docker-compose.yml -f docker-compose.prod.yml up

More Repositories

1

dotfiles

My dotfiles repo, here you can find all my window manager configs as well as documentation and a guide on how to make your own desktop environment.
Vim Script
858
star
2

mkdb

Toy Database
Rust
591
star
3

Wallpapers

484
star
4

pycritty

CLI program that allows you to change your Alacritty config with one command without editing the config file.
Python
233
star
5

rxh

HTTP reverse proxy
Rust
135
star
6

rulloc

General purpose memory allocator written in Rust.
Rust
91
star
7

sockets-examples

Inter-process communication with sockets
JavaScript
60
star
8

Contacts-App-Nodejs

JavaScript
46
star
9

Linked-List-Visualization

Linked list data structure animated with javascript
JavaScript
43
star
10

dwm

My custom build of Dwm
C
34
star
11

Merge-Sort-Visualization

JavaScript
27
star
12

sqlite2-btree-visualizer

SQLite 2.8.1 for learning / debugging
C
25
star
13

noob

Python
23
star
14

jsonresume-manager

Fullstack Laravel & Vue app
PHP
19
star
15

lune-framework

Simple PHP framework inspired by Laravel.
PHP
17
star
16

website

Simple personal website with your Github projects.
PHP
16
star
17

mem_alloc_c

Memory allocator in C
C
12
star
18

devcontainers

Python
11
star
19

lune

Simple PHP framework inspired by Laravel.
PHP
10
star
20

inmem

Dead simple in-memory database.
Rust
7
star
21

JavascriptMVC

Javascript MVC
JavaScript
7
star
22

collections_rust

Data structures implemented in Rust for absolutely no reason. Pointers are fun though.
Rust
6
star
23

csrf

JavaScript
6
star
24

MERN-Exercise-Tracker

Simple MERN Web App example
JavaScript
5
star
25

epoll-example

Python
4
star
26

advent-of-code

Zig
4
star
27

JavaMVC

Ejemplo MVC con Swing
Java
3
star
28

microservices

Vue
3
star
29

mastermind-certificate-python

Python
Python
1
star