{"id":19766241,"url":"https://github.com/akaliutau/cloud-file-storage","last_synced_at":"2026-01-04T00:44:31.535Z","repository":{"id":120056046,"uuid":"377806769","full_name":"akaliutau/cloud-file-storage","owner":"akaliutau","description":"An implementation of cloud-based file storage on the basis of NextCloud","archived":false,"fork":false,"pushed_at":"2021-06-17T11:28:47.000Z","size":61,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T14:51:17.333Z","etag":null,"topics":["file-storage","nextcloud","private-cloud"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akaliutau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-17T11:27:43.000Z","updated_at":"2024-12-16T10:18:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fad5a9d-3980-49b8-b747-d2d968f9efef","html_url":"https://github.com/akaliutau/cloud-file-storage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcloud-file-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcloud-file-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcloud-file-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcloud-file-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akaliutau","download_url":"https://codeload.github.com/akaliutau/cloud-file-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244645072,"owners_count":20486924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-storage","nextcloud","private-cloud"],"created_at":"2024-11-12T04:23:29.056Z","updated_at":"2026-01-04T00:44:31.530Z","avatar_url":"https://github.com/akaliutau.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nAbout \n=======\n\nThis is an implementation of cloud-based file storage, with primary backup on AWS S3.  \n\n\nOverview\n==========\n\nNextcloud is an open source software suite that can use storage capacity for saving, editing, and consuming a wide range of document types, including services like image/audio/video files hosting. Nextcloud also provides client applications that allow users on Linux/Windows/MacOS/Mobile OS to engage with media resources. \n\nUsing Nextcloud, one can easily create your own private version of Dropbox or Google Drive, but on your terms and without having to worry about unexpected changes to availability or service/privacy agreements. Of course, there are some drawbacks - you have to support your own data-center.\n\nManual approach\n================\n\nSteps (1) and (2) can be omitted if you are already on Linux\n\n1) Builds image with Ubuntu distribution and tag linux:20.04. Note the dot at the end of the command.\n```\ndocker build -f Dockerfile-min -t linux:20.04 .\n```\n\n2) Instantiates container and connects it to standard console.\n```\ndocker run -p 8100:80 -it linux:20.04 /bin/bash\n```\n\n3) Building a LAMP server \n\nInstall core dependencies:\n```\napt-get install -y apache2 php wget nano\n```\n\nInstall extra dependencies:\n```\napt-get install -y php7.4-gd php7.4-json php7.4-mysql php7.4-curl php7.4-mbstring php-intl php-imagick php7.4-xml php7.4-zip\n```\n\nInstall maria db dependencies:\n```\napt-get install -y mariadb-server systemctl\n```\n\n4) You can confirm the DB is running using direct command or systemctl:\n```\nmysql --version\nmysql  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2\n```\n\nIf not running, start it:\n```\nservice mysql start\n```\n\n5) Securing DB\n\n```\nmysql -u root -p \n```\n\nMariaDB might not let you log in unless you run the mysql command as sudo. If this happens, log in using sudo and provide the MariaDB password you created. Then run these three commands at the MySQL prompts (substituting your password for your-password):\n\n```\nSET PASSWORD = PASSWORD('admin123'); \nupdate mysql.user set plugin = 'mysql_native_password' where User='root'; \nFLUSH PRIVILEGES;\n```\n\n6) Configuring Apache\n\nTo ensure that Apache will be able to communicate with Nextcloud, there are a few relatively simple adjustments you�re going to have to make. First, you should enable a couple of Apache modules through the a2enmod tool (which is installed along with other apache packages). \n\nThe rewrite module is used to rewrite URLs in real time as they�re moved between a client and the server. \n```\na2enmod rewrite\n```\n\nThe headers module performs a similar function for HTTP headers.\n```\na2enmod headers\n```\n\nAfter changing configuration activate it using the following command:\n```\nservice apache2 restart\n```\n\nMake sure the apache is up and running by pointing the browser to the default public address:\n```\nhttp://localhost:8100/\n```\n\n7) Making custom apache configuration for Nextcloud\n\nPlacing Nextcloud�s data files in the default document root presents a potential security risk. I  prefer creating a new .conf file in the /etc/apache2/sites-available/ directory for each new service, so create a new config for Nextcloud using nextcloud.conf as a template:\n\n```\ndocker cp nextcloud.conf \u003ccontainer_id\u003e:/etc/apache2/sites-available/nextcloud.conf\n```\n\nFinally, create a symbolic link in the /etc/apache2/sites-enabled/ directory pointing to the nextcloud.conf file created in /etc/apache2/sites-available/:\n```\nln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf\n```\n\nWhen Apache starts, it reads the contents of /etc/apache2/sites-enabled/ looking for site configurations to load. Those configurations won�t actually exist in /etc/apache2/sites-enabled/, but there�ll be symbolic links to the real files in /etc/apache2/sites-available/\n\n8) Downloading and unpacking Nextcloud \n\nDownload the most recent Nextcloud package (19.0.7 in this case) from the Nextcloud Install page (https://nextcloud.com/install):\n\n```\nwget https://download.nextcloud.com/server/releases/nextcloud-19.0.7.tar.bz2\n```\n\nUnpacking a .tar.bz2 archive requires the xjf arguments, rather than the xzf you�d use for a .gz:\n```\ntar xjf nextcloud-19.0.7.tar.bz2\n```\n\n9) Installing Nextcloud\n\nCopy the files recursively to include subdirectories and their contents:\n```\ncp -r nextcloud /var/www/\n```\nApache will need full access to all the files in the Nextcloud directories in order to do its job. Many web servers use a special system user called www-data. The next command uses chown to turn the user and group ownership of all those files over to the web server user www-data:\n```\nchown -R www-data:www-data /var/www/nextcloud/\n```\n\n10) reboot the Apache:\n```\nservice apache2 restart\n```\n\nand navigate browser to the  following address to open Nextcloud UI:\n```\nhttp://localhost:8100/nextcloud\n```\n\nThe main page contains links to Nextcloud�s client apps and then dropped into the administration console you see in screenshots/nxc_main_page.png\n\n11) Configuring Nextcloud\n\nDuring the first start you have to create an admin's username/password and establish connection to db: provide username/password pair along with db name (f.e. cloud_db) and connection url, f.e. localhost:3306. \nOptionally one can install additional web apps (Calendar, etc).\n\nAutomated approach\n===================\n\n1) Use Dockerfile file to perform steps 1-10; perform step 11 manually:\n```\ndocker build -f Dockerfile -t linux-nextcloud:20.04 .\n```\n\n2) Instantiate container and connects it to standard console.\n```\ndocker run -p 8100:80 -it linux-nextcloud:20.04 /bin/bash\n```\n\n3) Execute the sql script:\n```\nmysql -u root -p \u003c 010_init.sql;\n```\n\n5) Restart apache once again and navigate browser to the main page and complete the installation:\n```\nhttp://localhost:8100/nextcloud\n```\n\nReferences\n===========\nMore about Nextcloud: [https://nextcloud.com/]\n\n\nNotes\n======\n\nUseful commands\n\nGet the list of images:\n\n```\ndocker images -a\n```\n\nGet the list of containers:\n\n```\ndocker ps\n```\n\nClean up local docker registry:\n\n```\ndocker image prune -a --force --filter \"until=2021-01-04T00:00:00\"\n```\n\nClean up local docker registry from images with \u003cnone\u003e tag:\n\n```\ndocker rmi --force $(docker images -q --filter \"dangling=true\")\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fcloud-file-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakaliutau%2Fcloud-file-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fcloud-file-storage/lists"}