Articles on: Dedicated Servers

How to setup an image hosting webserver using ShareX

This guide will take you through the steps of how to get a custom image uploader. You need to be running windows on your personal computer for this to work Before you begin you require the following things.


Requirements
  • A Domain (e.g // example.com)
  • A Dedicated Server running CentOS 7.x
  • ShareX (Windows Only) (https://getsharex.com/)


Now that you have your base requirements, we can connect to our Dedicated Server using SSH and install the following things.


Dependencies

Run the following commands to install any dependencies that are required for this to work.

  • ```yum update -y```
  • ```yum install epel-release -y```
  • ```yum install nginx -y```
  • ```yum install firewalld -y```


Now that your Dependencies are installed, let's get NGINX and FirewallD setup so that we can start configuring NGINX


Setup
  • ```systemctl start nginx```
  • ```systemctl enable nginx```
  • ```systemctl start firewalld```
  • ```systemctl enable firewalld```
  • ```firewall-cmd --permanent --zone=public --add-service=http```
  • ```firewall-cmd --permanent --zone=public --add-port=80/tcp```
  • ```firewall-cmd --reload```


Configuring NGINX

This stage is needed to tell nginx where to serve the files from

  • ```cd /etc/nginx/conf.d```
  • ```nano img.example.com.conf```
{
listen 80;
server_name img.example.com;
root /var/www/img.example.com/;
index index.php index.html;
}
  • ctrl+x y enter
  • ```systemctl reload nginx```


Configuring ShareX
  • Open ShareX and go to Destination Settings

  • Go to File Uploaders then FTP / SFTP Uploader Option

  • Fill in the settings, Ensure that you replace the "example.com" with your domain name and that you insert your password and IP address

  • Click the Test button and it should say Connection Established
  • Finally close the destination settings, then click Destinations, Image Uploaders then select File Uploader and finally select FTP


Congratulations, All that's left is for you to point your domain towards your Dedicated Server and You have some good looking links

Updated on: 26/01/2021

Was this article helpful?

Share your feedback

Cancel

Thank you!