hardfiles- EZPZ File Sharing Service |
git clone git://git.acid.vegas/hardfiles.git |
Log | Files | Refs | Archive | README | LICENSE |
README.md (7444B)
1 # HARDFILES 2 In today's digital landscape, the majority of image and file-sharing platforms are overburdened with bloatware, inundated with trackers, and riddled with restrictive usage limits. Moreover, they often cram unnecessary features, leaving users longing for a straightforward and secure file-sharing experience... 3 4 We designed HardFiles with a singular vision: to simplify and secure the process of file sharing. No fluff, no unnecessary features — just a streamlined, user-centric platform. What's more, we believe in transparency and community involvement, which is why HardFiles is open-source. Explore our service and contribute to its development at [https://hardfiles.org](https://hardfiles.org) now! 5 6 🚫 **No JavaScript required to upload files!** 🚫 7 8 🛑 **No logs 📜, no tracking 👣, & no analytics!** 📊🚫 9 10 🚷 **No weird anime girls or cringe weeb stuff on the homepage** 📵🚫 11 12 🔒 **All uploads are shredded securely ✂️🔥 after 24 hours** ⏳🗑️ 13 14 ## Terms of Service 15 This platform serves as a public file hosting service. It is not actively monitored or overseen for specific content. Users are solely responsible for the content they upload and share. The administrator and owner of this server explicitly disclaim any responsibility for the content hosted and shared by users. Furthermore, the administrator is not liable for any damages, losses, or repercussions, either direct or indirect, resulting from the use of this service or the content found therein. Users are urged to use this service responsibly and ethically. 16 17 HardFiles is built on the principle of flexibility. If you choose to run your own instance of our service, you have the autonomy to define your own set of rules tailored to your community or organizational needs. However, when using our official service at [hardfiles.org](https://hardfiles.org), we maintain a minimalistic approach to rules. Our singular, non-negotiable rule is a strict prohibition against child pornography. We are committed to creating a safe environment for all users, and we have zero tolerance for any content that exploits the vulnerable. 18 19 ## Deployment Guide for HardFiles 20 21 ### 1. Clone this repository 22 23 This is necessary even when using the Docker image as the image does not contain the HardFiles frontend. 24 25 ```shell 26 git clone https://git.supernets.org/supernets/hardfiles.git 27 ``` 28 29 ### 2. Configuration: 30 Start by adjusting the necessary configuration variables in `config.toml`. 31 32 ### 3. Build and Run 33 34 #### Bare Metal: 35 36 Execute the following commands to build and initiate HardFiles: 37 ```shell 38 go build -o hardfiles main.go 39 ./hardfiles 40 ``` 41 42 #### Docker Compose: 43 44 Execute the following commands to build and initiate HardFiles in Docker: 45 ```shell 46 docker compose up -d 47 ``` 48 49 ### 3. Web Server Configuration: 50 51 By default, HardFiles listens on port `5000`. For production environments, it's recommended to use a robust web server like Nginx or Caddy to proxy traffic to this port. 52 53 For obtaining the Let's Encrypt certificates, you can use tools like `certbot` that automatically handle the certification process for you. If you elect to use Caddy, in most circumstances it is able to handle certificates for you using Let's Encrypt. 54 55 Remember, by using a reverse proxy, you can run HardFiles without needing root privileges and maintain a more secure environment. 56 57 #### Using Nginx as a Reverse Proxy: 58 59 A reverse proxy takes requests from the Internet and forwards them to servers in an internal network. By doing so, it ensures that the actual application (in this case, HardFiles) doesn't need to run with root privileges or directly face the Internet, which is a security best practice. 60 61 Here's a basic setup for Nginx: 62 63 ```nginx 64 server { 65 listen 80; 66 server_name your_domain.com; 67 68 location / { 69 proxy_pass http://localhost:5000; 70 proxy_set_header Host $host; 71 proxy_set_header X-Real-IP $remote_addr; 72 } 73 74 listen 443 ssl; 75 ssl_certificate /etc/letsencrypt/live/your_domain.com/fullchain.pem; 76 ssl_certificate_key /etc/letsencrypt/live/your_domain.com/privkey.pem; 77 } 78 ``` 79 80 Replace `your_domain.com` with your actual domain name. Save this configuration to a file, say `hardfiles.conf`, inside the `/etc/nginx/sites-available/` directory, and then create a symbolic link to `/etc/nginx/sites-enabled/`. Restart Nginx after this setup. 81 82 #### Using Caddy as a Reverse Proxy: 83 84 Append the following to the Caddyfile, replacing your_domain.com with your chosen domain. 85 86 ```caddy 87 your_domain.com { 88 reverse_proxy localhost:5000 89 } 90 ``` 91 92 ## cURL Uploads 93 94 You can upload files using cURL like so: 95 96 ```shell 97 curl -F file=@$1 https://hardfiles.org/ 98 ``` 99 100 Additionally, you can append some extra options to modify the expiry time or file name length. Currently the file expiry time must be provided in seconds and is limited to 5 days maximum. The file name length is limited to 128 characters. The following example will return a file that expires in 48 hours rather than the default 24 and a file name length of 64 characters: 101 102 ```shell 103 curl -F file=@$1 -F expiry=172800 -F url_len=64 https://hardfiles.org/ 104 ``` 105 106 ### Bash Alias 107 108 If you frequently upload files to HardFiles via the command line, you can streamline the process by setting up a bash alias. This allows you to use a simple command, like `upload`, to push your files to HardFiles using `curl`. 109 110 #### Setting Up: 111 112 1. **Edit your `.bashrc` file:** Open your `~/.bashrc` file in a text editor. You can use `nano` or `vim` for this purpose: 113 ```shell 114 nano ~/.bashrc 115 ``` 116 117 2. **Add the `upload` function:** At the end of the `.bashrc` file, append the following function (replace the domain if you are running your own instance): 118 ```shell 119 upload() { 120 curl -F file=@$1 https://hardfiles.org/ 121 } 122 ``` 123 124 3. Reload your .bashrc file: To make the new function available in your current session, reload your .bashrc: 125 ```shell 126 source ~/.bashrc 127 ``` 128 129 #### Usage: 130 Now, you can easily upload files to HardFiles using the upload command followed by the path to your file. For example: 131 132 ```shell 133 upload /path/to/your/file.jpg 134 ``` 135 136 This will upload the specified file to HardFiles and return a direct link to the file. 137 138 ## Roadmap 139 - Idea - Uploads stored on a remotely mounted drive or S3 compatible volume, isolating them from the actual service server. Multiple mirrored instances behind a round robin reading from the same remote mount for scaling. 140 - Random wallpapers as an optional extra, kept simple without javascript. Maybe a local shell script that modifies the index.html on a timer. 141 - Fix index wallpaper alignment on smartphones. 142 - Clean up CSS. 143 - Warrant Canary 144 - Footer or some link to SupernNETs & this repository & terms of service txt. 145 - Tor & i2p support services *(This can quite possibly be a very bad idea to operate. Maybe a captcha for .onion/.i2p uploads only...)* 146 147 ## Credits 148 - 🚀 **delorean**, our Senior Director of IRC Diplomacy & SuperNets Brand Strategy 🌐 for developing hardfiles. 149 - 🤝 **hgw**, our Principal Designer of Digital Aquariums & Rare Fish Showcases 🐠 for branding the product. 150 - 💼 **acidvegas**, our Global Director of IRC Communications 💬 for funding the project 💰. 151 152 ___ 153 154 ###### Mirrors 155 [acid.vegas](https://git.acid.vegas/hardfiles) • [GitHub](https://github.com/supernets/hardfiles) • [GitLab](https://gitlab.com/supernets/hardfiles) • [SuperNETs](https://git.supernets.org/supernets/hardfiles)