Skip to content
Antonia Engfors edited this page Mar 29, 2017 · 32 revisions

Welcome to our Wiki for Streama v1 of the app! On this page you will find deployment info (mainly for Linux) as well as FAQs.

Up and Running

Here is a video Tutorial of me setting it up: http://www.youtube.com/watch?v=GUcbVTrdNv8
Below you can find a step-by-step.

1. install java

Get and install Java Development Kit 8 (Works JRE-only). I personally like to use openJDK.

2. download the .war and application.yml

Download the latest war from the releases page, for instance by using the terminal command wget https://github.com/dularion/streama/releases/download/v1.0.19/streama-1.0.19.war into the same directory. Suggestion: use /data/streama for the yml and the war and /data/streama/files for the uploaded files.

4. run!

Run the app using sudo ./streama-[version].war. Once you see the console output
Grails application running at http://localhost:8080 in environment: production
you are set to go! just navigate to localhost:8080 and you will see a login screen (default = user:admin, pass:admin), and the program is up and running. Enjoy! :)


ℹ️ If something didn't work or you want to improve the workflow, see FAQs below.


FAQ

1. The .war file is not executable

If your .war file isnt executable after download, just change the permissions with sudo chmod u+x streama-1.x.x.war.

ℹ️ How is this concept of an executable .war even possible? Internally, the application uses gradle and a plugin called gradle-boot. This plugin together with the overall setup of the application allows for the .war file to executable all by itself!
Protip: For a professional linux setup, use this feature to create a system service and run it by calling sudo service streama start/stop/restart :)

2. Where is the data stored?

By default, the data is stored in an embedded, persistent database called H2. This database persists the data into a file adjacent to the .war file that was executed.
If you prefer the security of a mysql setup, use the sample application.yml to configure the mysql connection.

If your MySQL differs from the default 'root'@'localhost' with database 'streama' then you can just change those values in the application.yml. When running the app using ./streama-[version].war make sure that the application.yml is named correctly resides in the same directory as the .war file.

3. How do i install java?

Make sure you got java8 up and running in your command line. Using OpenJDK works just fine! the below works for ubuntu. sudo apt-get install openjdk-8-jdk

4. How do I hook in my existing file system, so that I don't need to re-upload each Video file?

Thanks to @jendib you can now use the "Local Video Files" Directory in the settings page! Just point it to the root directory of your media collection and you will have a nifty file-browser showing a manage-files popup for each episode/movie

5. So what about Video encoding and HTML5? Any news on auto-conversion?

Auto-Conversion is still something that I want to see for streama, but there is so much to consider when it comes to self-hosted instances, such as CPU-power for conversion, local dependencies such as ffmpeg, potentially using nodejs as the crawler/worker ... I am still planning this and trying to figure out a way to make it as comfortable to host as possible, but for now it is still up to you to convert videos into html5.

6. When restarting the app, the data is gone

Don't worry, the data isn't lost, in fact it is persisted to a file called Streama.db. You just need to make sure to always start the app from the same directory each time. The easiest is to always start it from inside the folder or using systemctrl.

7. How to run in background

easiest is by installing something like byobu or screen and running it in one of the tabs :) ALternatively, you can configure the programme as a service via init.d. There are several tutorials for that online for your perusal :)

8. How do I change the port?

You need to use application.yml alongside the war file. here is a sample application.yml for you to work off of.

10 How do I install it as a service?

now with the executable war, you can just add the application as a service to systemctl (ubuntu 15+).

# go to the app directory, for example
cd /data/streama

# create link
ln -s streama-[version].war streama.war

# create the systemctl service
vim /etc/systemd/system/streama.service
# start streama.service content
[Unit]
Description=streama
After=syslog.target

[Service]
User=[USER TO RUN APP]
ExecStart=/data/streama/streama.war
SuccessExitStatus=143
ConditionPathExists=/data/streama/streama.war
# end streama.service content

[Install]
WantedBy=multi-user.target

# then enable the service
sudo systemctl enable streama.service

# then just run
sudo systemctl start streama.service

11 Video playback

if your videos won't play or you don't have any sound, make sure that they are HTML5 compatible. I will add video-conversion soon, but right now there is no conversion, so you have to rely on what your browser can handle. A quick and easy test is to open a new empty browser-tab and drag&drop your video file in. If it shows up in a player, then it's a compatible format. If it downloads, it's incompatible. The format that is most compatible is h264 for video and aac for audio.

Try this: ffmpeg -i input.mkv -vcodec h264 -acodec aac -strict -2 output.mp4