You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Download and install OpenSSL (I installed to C:\Extra\ssl)
Create new system variable called "OPENSSL_DIR" with a value of C:\Extra\ssl (or wherever you installed OpenSSL NOTE: this is not to the bin folder, it must be to root!)
Download and install LLVM (libclang) I installed to C:\Extra\LLVM
Create new system variable called "LIBCLANG_PATH" with a value of C:\Extra\LLVM\bin (or wherever you installed LLVM to)
Reboot your PC :D
Check and Balances
Launch Git Bash by right clicking on your desktop and choosing "Git Bash Here". The rest of the commands will be run from this console unless otherwise stated.
= note: LINK : fatal error LNK1181: cannot open input file 'sqlite3.lib'
error: aborting due to previous error
error: failed to compile `diesel_cli v1.4.0`, intermediate artifacts can be found at `C:\Users\%USERNAME%\AppData\Local\Temp\cargo-installToiK1l`
Caused by:
could not compile `diesel_cli`.
If you do, go to the "Making SQLite3.lib" section, else continue.
Build Plume's front end cargo install cargo-web&&cargo web deploy -p plume-front --release
Build Plume's back end cargo install --no-default-features --features sqlite --path .
If you get an error here, go to the "Making SQLite3.lib" section step 5/6, else continue.
Build plm and the CLI helper cargo install --no-default-features --features sqlite --path plume-cli
Create environment file ".env" (there should be a .env.example file already, just copy that and rename it) with the contents:
# Postgres SQL setup
DATABASE_URL=C:/Users/%USERNAME%/Downloads/Plume/plume.db
# For PostgreSQL: migrations/postgres
MIGRATION_DIRECTORY=migrations/sqlite
# The domain on which your instance will be available
BASE_URL=my.plume.url
# Secret key used for private cookies and CSRF protection `openssl rand -base64 32`
ROCKET_SECRET_KEY=
ROCKET_ADDRESS=127.0.0.1
ROCKET_PORT=7878
# Mail settings
MAIL_SERVER=my.plume.url
[email protected]
MAIL_PASSWORD=emailpassword
MAIL_HELO_NAME=my.plume.url
[email protected]
# Custom icons
#PLUME_LOGO=icons/custom/myicons/plume.png
#PLUME_LOGO_FAVICON=icons/custom/myicons/plume32.png
#PLUME_LOGO_48=icons/custom/myicons/plume48.png
#PLUME_LOGO_72=icons/custom/myicons/plume72.png
#PLUME_LOGO_96=icons/custom/myicons/plume96.png
#PLUME_LOGO_144=icons/custom/myicons/plume144.png
#PLUME_LOGO_160=icons/custom/myicons/plume160.png
#PLUME_LOGO_192=icons/custom/myicons/plume192.png
#PLUME_LOGO_256=icons/custom/myicons/plume256.png
#PLUME_LOGO_512=icons/custom/myicons/plume512.png
NOTE: in order to use the Windows Task Scheduler to start/stop, you need a full file path to database file with forward slashes... Backslashes will result in errors.
Copy the sqlite3.dll from "C:\ProgramData\chocolatey\lib\SQLite\tools" to where plm.exe and plume.exe was compiled "C:\Users%USERNAME%.cargo\bin"
Now populate the database with preliminary tables, data, etc. diesel migration run
Initialise search index plm search init
Set up the instance plm instance new
Create an admin user plm users new --admin -n "adminusername" -N "Human Readable Admin Name" -b "Biography of Admin here" -p hackmeplease
You should be ready to start testing!
Error Checking and Testing
Launch Plume from cmd, git bash, or powershell plume
You may get error from not supplying a valid secret key
%USERNAME%@computer MINGW64 ~/Downloads/Plume (master)
$ plume
Configuration read from C:\Users\%USERNAME%\Downloads\Plume\.env
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidSecretKey', src/main.rs:146:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Open your .env file and make sure the ROCKET_SECRET_KEY= is filled in. You may use openssl rand -base64 32 to generate a valid key.
Try again plume
%USERNAME%@computer MINGW64 ~/Downloads/Plume (master)
$ plume
Configuration read from C:\Users\%USERNAME%\Downloads\Plume\.env
Warning: the email server is not configured (or not completely).
Please refer to the documentation to see how to configure it.
Configured for production.
=> address: 127.0.0.1
=> port: 7878
=> log: critical
=> workers: 16
=> secret key: provided
=> limits: forms = 128KiB, json* = 1MiB
=> keep-alive: 5s
=> tls: disabled
Rocket has launched from http://127.0.0.1:7878
If you see this output, congrats! Plume is successfully running for you!!!
Once everything is working, you may be annoyed by having to always open a command prompt to start Plume. We can configure it to start on boot via Task Scheduler.
Open up the Task Scheduler app
On right hand side, choose Create Task
General tab - Name: "Plume"; Description: "Plume: a federated blogging application"; Run whether user is logged on or not; Run with highest privileges; Configure for Windows 10 (Figure 1)
Triggers tab - Begin the task At startup; Optionally Delay task for 30 seconds; Enabled (Figure 2)
Actions - Action: Start a program; Browse to plume.exe (default is C:\Users%USERNAME%.cargo\bin\plume.exe); Start in: C:\path\to.env (Figure 3)
Conditions - Uncheck everything
Settings - Allow task to be run on demand; Run task as soon as possible after a scheduled start is missed; If the running task does not end when requested, for it to stop; Do not start a new instance
Figure 1
Figure 2
Figure 3
Reverse Proxy using IIS 8.5
Note: I have yet to get this to work with a subdirectory. So, if your domain is https://mydomain.com, it can only work there and not at https://mydomain.com/plume as far as I am aware. If anyone figures this out, please let me know!
You need to have installed URL Rewrite (Figure 4)
From the Sites, choose your site, in the middle pane, double click URL Rewrite.
On right hand side, Add Rule, Blank Rule
Name it Plume with pattern (.*) with Action type Rewrite and Rewrite URL of http://127.0.0.1:7878/{R:1} (Figure 5)
Apply
Figure 4
Figure 5
If you need to use a subdirectory, you can create a Server Farm called Plume, with a server of localhost, and a http port of 7878 and follow these steps:
You then need to install Application Request Routing Cache in IIS
After installing double click on Your server name, then Applications Request Routing Cache.
On right hand side, select Server Proxy Settings...
Enable the proxy, HTTP version Pass through, under Proxy Type, check Use URL Rewrite to inspect incoming requests, check Enable SSL offloading, and for Reverse proxy use the name of your server farm: Plume
Apply
Then on right hand side, select URL Rewrite...
Should be something called either ARR_Plume_loadbalance or ARR_server_proxy. Edit it.
Patter should be Regular Expression with pattern of ^plume$|^plume/(.*) where plume is the subdirectory you want to use.
Action type should be Route to Server Farm, Scheme http://, Server farm Plume, Path /{R:1}
Making SQLite3.lib
Launch cmd.exe as admin
Install SQLite3 using chocolatey choco install sqlite
Change directory to where SQLite was installed cd C:\ProgramData\chocolatey\lib\SQLite\tools
Launch Microsoft Build Tools "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
Convert sqlite3.dll to sqlite3.lib lib /MACHINE:x64 /def:sqlite3.def /out:sqlite3.lib
Copy sqlite3.lib and sqlite3.exp to where you installed rustup C:\Users\%USERNAME%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
After compiling, building, and installing diesel_cli, you will also need to copy sqlite3.lib and sqlite3.exp to "C:\Users\%USERNAME%\.rustup\toolchains\nightly-2020-01-15-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib"
Until I figure out my password (to upload my SSH and GPG keys), I will save the guide here.
Compile Plume on Windows
My specific setup:
C:\Extra
C:\Plume
Outline:
Requirements
C:\Extra\ssl
(or wherever you installed OpenSSL NOTE: this is not to the bin folder, it must be to root!)C:\Extra\LLVM\bin
(or wherever you installed LLVM to)Check and Balances
Launch Git Bash by right clicking on your desktop and choosing "Git Bash Here". The rest of the commands will be run from this console unless otherwise stated.
rustc --version
cargo --version
choco --version
openssl version
If you get any Not Found errors, make sure that your folder paths are correct in your environment. Once everything returns a version, you may proceed.
Building and Compiling
git clone https://github.com/Plume-org/Plume.git
cd Plume
cargo +stable install diesel_cli --no-default-features --features sqlite --version '=1.4.0' --verbose
NOTE - you may get an error similar to this:
If you do, go to the "Making SQLite3.lib" section, else continue.
cargo install cargo-web&&cargo web deploy -p plume-front --release
cargo install --no-default-features --features sqlite --path .
If you get an error here, go to the "Making SQLite3.lib" section step 5/6, else continue.
cargo install --no-default-features --features sqlite --path plume-cli
NOTE: in order to use the Windows Task Scheduler to start/stop, you need a full file path to database file with forward slashes... Backslashes will result in errors.
diesel migration run
plm search init
plm instance new
plm users new --admin -n "adminusername" -N "Human Readable Admin Name" -b "Biography of Admin here" -p hackmeplease
You should be ready to start testing!
Error Checking and Testing
plume
ROCKET_SECRET_KEY=
is filled in. You may useopenssl rand -base64 32
to generate a valid key.plume
Service Setup
Once everything is working, you may be annoyed by having to always open a command prompt to start Plume. We can configure it to start on boot via Task Scheduler.
Reverse Proxy using IIS 8.5
Note: I have yet to get this to work with a subdirectory. So, if your domain is https://mydomain.com, it can only work there and not at https://mydomain.com/plume as far as I am aware. If anyone figures this out, please let me know!
If you need to use a subdirectory, you can create a Server Farm called Plume, with a server of localhost, and a http port of 7878 and follow these steps:
^plume$|^plume/(.*)
where plume is the subdirectory you want to use.Making SQLite3.lib
choco install sqlite
cd C:\ProgramData\chocolatey\lib\SQLite\tools
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
lib /MACHINE:x64 /def:sqlite3.def /out:sqlite3.lib
C:\Users\%USERNAME%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
"C:\Users\%USERNAME%\.rustup\toolchains\nightly-2020-01-15-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib"
Don't want to compile from source? Try this.
The text was updated successfully, but these errors were encountered: