From f8a4d015df492c2b1cf80f23ea834172b21c4445 Mon Sep 17 00:00:00 2001 From: Jared Date: Thu, 15 Apr 2021 04:36:58 -0700 Subject: [PATCH] Update readme. Put Example_Nginx_Config.txt back where it was supposed to go. --- .github/workflows/build.yml | 1 + README.md | 13 +++- Remotely.sln | 3 +- Server.Installer/Server.Installer.csproj | 6 ++ Utilities/CentOS_Server_Install.sh | 75 ------------------ .../Example_Nginx_Config.txt | 0 Utilities/Ubuntu_Server_Install.sh | 78 ------------------- 7 files changed, 19 insertions(+), 157 deletions(-) delete mode 100644 Utilities/CentOS_Server_Install.sh rename Example_Nginx_Config.txt => Utilities/Example_Nginx_Config.txt (100%) delete mode 100644 Utilities/Ubuntu_Server_Install.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45596706..80260cbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,6 +49,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: + repository: lucent-sea/Remotely fetch-depth: 0 # Test the Server URL to make sure it's valid diff --git a/README.md b/README.md index a24285ab..5e935165 100644 --- a/README.md +++ b/README.md @@ -24,16 +24,23 @@ Subreddit: https://www.reddit.com/r/remotely_app/ ![image](https://user-images.githubusercontent.com/20995508/113913261-f7002a00-9790-11eb-81b3-c36fb8aa536d.png) +## WARNING: +Remotely is undergoing a major overhaul for its server installation process. There will be some instability for a short time, and the documentation below may not reflect the current state. It's recommended that you use the installation scripts from the latest full release if you don't wish to participate in testing. ## Disclaimer Hosting a Remotely server requires running an ASP.NET Core web app behind IIS (Windows), Nginx (Ubuntu), or Caddy Server (any OS). It's expected that the person deploying and maintaining the server is familiar with this process. Since this is a hobby project that I develop in between working full time and raising a family, there simply isn't time available to provide support in this capacity. -## Build Instructions +## GitHub Actions GitHub Actions allows you to build and deploy Remotely for free from their cloud servers. Since the Windows agent can only be built on Windows, and the Mac agent can only be built on Mac, using a build platform like GitHub Actions or Azure Pipelines is the only reasonable way to build the whole project. The definitions for the build processes are located in `/.github/workflows/` folder. -I've created a cross-platform command line tool that will leverage the GitHub Actions REST API to build the project and install it on your private server. This process will also embed your server's URL into the clients, so that they won't need to prompt the end user to enter it. +I've created a cross-platform command line tool that can leverage the GitHub Actions REST API to build the project and install it on your private server. This process will also embed your server's URL into the desktop clients, so that they won't need to prompt the end user to enter it. -### Instructions for using the Remotely_Server_Installer CLI tool: +## Installation Instructions: +- You can find the `Remotely_Server_Installer` CLI tool on the [Releases page](https://github.com/lucent-sea/Remotely/releases). + - You will download and run it on the server where you'll be hosting Remotely. + - You can choose between installing the pre-built release package, or entering GitHub credentials to build and install a customized server. + - The pre-built package will not have your server's URL embedded in the clients. End users will need to enter it manually. +- If you use the pre-built package, you're done! Otherwise, follow the below steps for using the GitHub Actions integration. - Fork the repo if you haven't already. - Go to the Actions tab in your forked repo and make sure you can see the Build workflows. - Before you can use Actions for the first time, there will be prompt that you must accept on this page. diff --git a/Remotely.sln b/Remotely.sln index f4603e8f..333ed533 100644 --- a/Remotely.sln +++ b/Remotely.sln @@ -8,9 +8,10 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{2CAC9A2B-1402-465F-83F8-958B4E081CA3}" ProjectSection(SolutionItems) = preProject Utilities\Example_Apache_Config.txt = Utilities\Example_Apache_Config.txt - Example_Nginx_Config.txt = Example_Nginx_Config.txt + Utilities\Example_Nginx_Config.txt = Utilities\Example_Nginx_Config.txt Utilities\Get-PSCommands.ps1 = Utilities\Get-PSCommands.ps1 Utilities\Get-WindowsCommands.ps1 = Utilities\Get-WindowsCommands.ps1 + Utilities\Install-RemotelyServer.ps1 = Utilities\Install-RemotelyServer.ps1 Utilities\Publish.ps1 = Utilities\Publish.ps1 Utilities\signtool.exe = Utilities\signtool.exe EndProjectSection diff --git a/Server.Installer/Server.Installer.csproj b/Server.Installer/Server.Installer.csproj index 73c26b3f..96388d00 100644 --- a/Server.Installer/Server.Installer.csproj +++ b/Server.Installer/Server.Installer.csproj @@ -8,6 +8,12 @@ Remotely.Server.Installer + + + + + + diff --git a/Utilities/CentOS_Server_Install.sh b/Utilities/CentOS_Server_Install.sh deleted file mode 100644 index 8ebad92c..00000000 --- a/Utilities/CentOS_Server_Install.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -echo "Thanks for trying Remotely!" -echo - -AppRoot=$(dirname $(readlink -f $0)) -HostName="" - -yum update - -# Install .NET Core Runtime. -sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm - -yum -y install apt-transport-https -yum -y update -yum -y install aspnetcore-runtime-5.0 - - - # Install other prerequisites. -yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -yum -y install yum-utils -yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional -yum -y install unzip -yum -y install acl -yum -y install libc6-dev -yum -y install libgdiplus - - -# Install Caddy -yum install yum-plugin-copr -yum copr enable @caddy/caddy -yum install caddy - - -# Configure Caddy -caddyConfig=" - $HostName { - reverse_proxy 127.0.0.1:5000 - } -" - -echo "$caddyConfig" > /etc/caddy/Caddyfile - - -# Create service. - -serviceConfig="[Unit] -Description=Remotely Server - -[Service] -WorkingDirectory=$AppRoot -ExecStart=/usr/bin/dotnet $AppRoot/Remotely_Server.dll -Restart=always -# Restart service after 10 seconds if the dotnet service crashes: -RestartSec=10 -SyslogIdentifier=remotely -Environment=ASPNETCORE_ENVIRONMENT=Production -Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false - -[Install] -WantedBy=multi-user.target" - -echo "$serviceConfig" > /etc/systemd/system/remotely.service - - -# Enable service. -systemctl enable remotely.service -# Start service. -systemctl start remotely.service - -firewall-cmd --permanent --zone=public --add-service=http -firewall-cmd --permanent --zone=public --add-service=https -firewall-cmd --reload - -# Restart caddy -systemctl restart caddy \ No newline at end of file diff --git a/Example_Nginx_Config.txt b/Utilities/Example_Nginx_Config.txt similarity index 100% rename from Example_Nginx_Config.txt rename to Utilities/Example_Nginx_Config.txt diff --git a/Utilities/Ubuntu_Server_Install.sh b/Utilities/Ubuntu_Server_Install.sh deleted file mode 100644 index 5be3e812..00000000 --- a/Utilities/Ubuntu_Server_Install.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -echo "Thanks for trying Remotely!" -echo - -AppRoot=$(dirname $(readlink -f $0)) -HostName="" - -echo "Using $AppRoot as the Remotely website's content directory." - -UbuntuVersion=$(lsb_release -r -s) - - -# Install .NET Core Runtime. -wget -q https://packages.microsoft.com/config/ubuntu/$UbuntuVersion/packages-microsoft-prod.deb -dpkg -i packages-microsoft-prod.deb -add-apt-repository universe -apt-get update -apt-get -y install apt-transport-https -apt-get -y install aspnetcore-runtime-5.0 -rm packages-microsoft-prod.deb - - - # Install other prerequisites. -apt-get -y install unzip -apt-get -y install acl -apt-get -y install libc6-dev -apt-get -y install libgdiplus - - -# Install Caddy -apt install -y debian-keyring debian-archive-keyring apt-transport-https -curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add - -curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list -apt update -apt install caddy - - -# Configure Caddy -caddyConfig=" - $HostName { - reverse_proxy 127.0.0.1:5000 - } -" - -echo "$caddyConfig" > /etc/caddy/Caddyfile - - -# Create Remotely service. - -serviceConfig="[Unit] -Description=Remotely Server - -[Service] -WorkingDirectory=$AppRoot -ExecStart=/usr/bin/dotnet $AppRoot/Remotely_Server.dll -Restart=always -# Restart service after 10 seconds if the dotnet service crashes: -RestartSec=10 -SyslogIdentifier=remotely -Environment=ASPNETCORE_ENVIRONMENT=Production -Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false - -[Install] -WantedBy=multi-user.target" - -echo "$serviceConfig" > /etc/systemd/system/remotely.service - - -# Enable service. -systemctl enable remotely.service -# Start service. -systemctl restart remotely.service - - -# Restart caddy -systemctl restart caddy - -echo "Installation completed." \ No newline at end of file