Consider giving this repo a ⭐
Welcome to your Resynced Uploader Project! This guide will walk you through setting up the project on your local computer and deploying it to the web. We’ve made this as easy as possible, so you don’t need any coding knowledge—just follow the steps!
Your project includes:
- 🚀 Performance – Great performance with Gofiber
- 🔗 Cloudflare R2 – Ready for handling file uploads
Created with ❤️ by Resynced Design!
- Go (1.23 or newer)
- Git (if you haven’t installed it, you can download Git here)
-
Download the Project Files
- Download the files from the link we provided or from GitHub.
- Save them in a new folder on your computer.
-
Open a Terminal
- Go to the folder where your project files are saved.
- On Windows: Right-click in the folder and select "Open in Terminal."
- On Mac: Open Terminal, type
cd
, then drag the folder into the Terminal window to set your location.
-
Edit the env
- Copy the
.env.example
file to.env
and fill in the required fields. - To get your Cloudflare R2 credentials, follow this tutorial.
- Copy the
-
Start the Project
- In the Terminal, type:
go run src/main.go
- The webserver will start, and you can test it with Insomnia or Postman. Or by visiting
http://localhost:<port-you-specified>
.
- In the Terminal, type:
If you have your own VPS (like DigitalOcean, AWS, or any other hosting service), you can deploy your project there. Follow these steps:
- A VPS with root or sudo access.
- Go installed on the server. You can install it using:
sudo apt update sudo apt install golang
- An HTTP server like Nginx or Apache for reverse proxy and domain handling.
-
Upload Your Files
- Use SCP, rsync, or FTP software (e.g., FileZilla) to transfer your project files to the server.
- Example using scp:
scp -r /path/to/your/project root@your-server-ip:/path/to/your/project
-
Set Up Environment Variables
- Navigate to your project directory on the server.
- Copy the
.env.example
file to.env
and configure it with your Cloudflare R2 credentials and other settings.
-
Start the Application
- Run the following command to start the application:
go run src/main.go
- For production, use a process manager like PM2 or systemd to keep the app running:
- Using PM2:
sudo npm install -g pm2 pm2 start src/main.go --name resynced-uploader pm2 save pm2 startup
- Using systemd: Create a service file at
/etc/systemd/system/resynced-uploader.service
:Start and enable the service:[Unit] Description=Resynced Uploader Service After=network.target [Service] User=your-username WorkingDirectory=/path/to/project ExecStart=/usr/local/go/bin/go run src/main.go Restart=always [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl start resynced-uploader sudo systemctl enable resynced-uploader
- Using PM2:
- Run the following command to start the application:
-
Set Up a Reverse Proxy
- Install and configure Nginx or Apache to route traffic to your GoFiber app.
- Example for Nginx:
server { listen 80; server_name yourdomain.com; location / { proxy_pass http://127.0.0.1:<your-app-port>; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
- Restart Nginx:
sudo systemctl restart nginx
-
Enable HTTPS (Optional but Recommended)
- Use Certbot to install an SSL certificate for your domain:
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d yourdomain.com
- Use Certbot to install an SSL certificate for your domain:
-
Done!
- Visit your domain in a browser to see your Resynced Uploader project live!
If you need any changes or run into any issues, reach out to us at Resynced Design! We’re here to help you make the most of your new site. Good luck, and enjoy! 🎉