OliveTin is a web interface for running Linux shell commands.

Overview

OliveTin

project logo

OliveTin is a web interface for running Linux shell commands.

Discord Go Report Card

Some example use cases;

  1. Give controlled access to run shell commands to less technical folks who cannot be trusted with SSH. I use this so my family can podman restart plex without asking me, and without giving them shell access!
  2. Great for home automation tablets stuck on walls around your house - I use this to turn Hue lights on and off for example.
  3. Sometimes SSH access isn't possible to a server, or you are feeling too lazy to type a long command you run regularly! I use this to send Wake on Lan commands to servers around my house.

Join the community on Discord.

YouTube video demo (6 mins)

6 minute demo video

Features

  • Responsive, touch-friendly UI - great for tablets and mobile
  • Super simple config in YAML - because if it's not YAML now-a-days, it's not "cloud native" :-)
  • Dark mode - for those of you that roll that way.
  • Accessible - passes all the accessibility checks in Firefox, and issues with accessibility are taken seriously.
  • Container - available for quickly testing and getting it up and running, great for the selfhosted community.
  • Integrate with anything - OliveTin just runs Linux shell commands, so theoretially you could integrate with a bunch of stuff just by using curl, ping, etc. However, writing your own shell scripts is a great way to extend OliveTin.
  • Lightweight on resources - uses only a few MB of RAM and barely any CPU. Written in Go, with a web interface written as a modern, responsive, Single Page App that uses the REST/gRPC API.
  • Good amount of unit tests and style checks - helps potential contributors be consistent, and helps with maintainability.

Screenshots

Desktop web browser;

Desktop screenshot

Desktop web browser (dark mode);

Desktop screenshot

Mobile screen size (responsive layout);

Mobile screenshot

Documentation

All documentation can be found at http://olivetin.app . This includes installation and usage guide, etc.

Example config.yaml

Put this config.yaml in /etc/OliveTin/ if you're running a standard service, or mount it at /config if running in a container.

listenAddressWebUI: 0.0.0.0:1337 # Listen on all addresses available, port 1337
logLevel: "INFO"
actions: 
- title: Restart Plex
  icon: smile
  shell: docker restart plex
  
  # This will send 1 ping 
- title: Ping Google.com
  shell: ping google.com -c 1
  
  # Restart lightdm on host "overseer"
- title: restart lightdm
  icon: poop
  shell: ssh [email protected] 'service lightdm restart'

A full example config can be found at in this repository - config.yaml.

Issues
  • [BUG] Error getting initial buttons

    [BUG] Error getting initial buttons

    Describe the bug Error getting initial buttons is displayed when opening the web ui. TypeError: NetworkError when attempting to fetch resource.

    To Reproduce Build with docker-compose

    version: "2.1"
    services:
      airsonic:
        image: jamesread/olivetin
        container_name: olivetin
        restart: unless-stopped
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=America/
        volumes:
          - /olivetin:/config
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.olivetin.rule=Host(`olivetin.example.com`)"
          - "traefik.http.routers.olivetin.entrypoints=websecure"
          - "traefik.http.routers.olivetin.tls=true"
          # Uncomment to fetch Let's Encrypt certificates.
          # Make sure you set up DNS records and they point to your IP.
          - "traefik.http.routers.olivetin.tls.certresolver=letsencrypt"
    
    networks:
      default:
        external:
          name: traefik_default
    
    
    
    

    Expected behavior Page should launch with 1 button as per the config.yaml

    Screenshots image

    type: bug type: support 
    opened by Seversonic 21
  • ARM binaries not working on older Pi Zero W

    ARM binaries not working on older Pi Zero W

    Trying to run the current OliveTin_2021-11-19_linux_armv7.deb on an older Pi Zero W with Debian Stretch doesn't work and just returns an "Illegal instruction" message. The last releases which worked where the older armv6 packages.

    So I went ahead and built from source which does produce a working binary. What I do miss is a make target or something to turn this into a .deb package, though?

    Also, manually copying the new OliveTin binary over an old installation lets me start the server, but then returns a "TypeError: json.actions is undefined" on the web UI. This runs with an existing config.yaml, but I don't see any breaking changes there which would explain that message.

    type: bug type: support progress: need-feedback progress: next-release progress: code-done 
    opened by arminus 13
  • `dnf install` should be run as supeuser inside container

    `dnf install` should be run as supeuser inside container

    Describe the bug When trying to install docker inside olivetin it is not possible due to lack of superuser permissions.

    To Reproduce

    1. Install olivetin using dockerfile
    2. Perform additional steps for docker. (Tweaked the dockerfile instead)
    3. run docker exec -it olivetin dnf install -y docker Error: This command has to be run with superuser privileges (under the root user on most systems). or
    4. run docker exec -it olivetin sudo dnf install -y docker [sudo] password for olivetin:

    Expected behavior Should install docker

    Additional context

    dockerfile
    ---
    version: "2.1"
    services:
      olivetin:
        container_name: olivetin
        image: jamesread/olivetin 
    
        volumes:
          - /srv/dev-disk-by-uuid-d2287285-5827-439a-bc32-7c8ad314eacf/Config/OliveTin:/config:ro
          - /var/run/docker.sock:/var/run/docker.sock
        ports:
          - "1337:1337"
        restart: unless-stopped
    

    Running inside Portainer 2.6.1 on Openmediavault 5.6.7-1

    $ uname -a
    Linux rockpi 5.10.35-rockchip64 #21.05.1 SMP PREEMPT Fri May 7 13:53:11 UTC 2021 aarch64 GNU/Linux
    

    Suggestion: If you don't want to run the container as root, what about adding something like olivetin ALL=(ALL) /usr/bin/dnf in /etc/sudoers?

    type: support 
    opened by inknos 11
  • Disable the

    Disable the "Actions" and "Logs" buttons

    Is your feature request related to a problem? Please describe. For non tech. people to provide as few buttons as possible.

    Describe the solution you'd like It would be nice to disable the "Actions" and "Logs" buttons on the top of the page to make it as clean as possible. In config.yaml something like navigation: disable.

    Additional context I equipped my parents in law with a raspberry running kodi. Every now and then kodi hangs and the only option for them on their own is to power cycle the pi. The more elegant solution would be to just restart the service, for which I haven't found an elegant solution for non technical people until I stumbled upon OliveTin. This will be a website-link on their phones open the site with only one button "Restart Kodi".

    type: feature-request progress: code-done 
    opened by efelon 9
  • Arm64 / armv7 docker image?

    Arm64 / armv7 docker image?

    Hi, your project looks really promising and would be very useful for lots of people running SBCs as servers. However at the moment there is no docker image for these platforms. If you could create one that would be awesome!

    type: feature-request progress: code-done 
    opened by kjboa 8
  • Task arguments

    Task arguments

    It would be nice to trigger a task with a arguments, such a light brightness, custom timeouts, or similar.

    Describe the solution you'd like Available to be set on a per action basis, the ability to specify a couple of arguments.

    There are considerable security implications of doing this though - you're basically giving free SSH access to a server if the arguments are abused.

    Additional context Originally requested by Luca Heitmann here; https://youtu.be/Ej6NM9rmZtk

    Current status

    • [x] Get the UI to send these values back to the server when starting the action
    • [x] Find/Replace variable names (ie, actually use them) on exec
    • [x] Fix behavior for undefined variables, unused variables, etc
    • [x] A type system for variables, with several safe/unsafe helpers (ie string_identifier, string_raw_unsafe)
    • [x] Code audit for style, cyclo, fmt, etc.
    • [ ] Test the hell out of it

    Feedback

    Feedback is most welcome, even if it's just a :+1: on this comment to indicate you're interested in the feature.

    type: feature-request progress: need-feedback progress: code-done needs: integration-test 
    opened by jamesread 7
  • --config flag

    --config flag

    As per the documentation on how to set up multiple instances, I'd like to suggest the addition of a feature that could make the process even simpler: a flag (tentatively called config, but the name is irrelevant) that allows to specify the location of the config.yaml when this is not in the default directory.

    For example, in order to create a second OliveTin instance, all I'd have to do would be to place a second config.yaml in /home/myuser/OliveTin2, and then call the executable located in /usr/local/bin/OliveTin with this service file:

    [Unit]
    Description=OliveTin2
    
    [Service]
    ExecStart=/usr/local/bin/OliveTin --config /home/myuser/OliveTin2/config.yaml
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    

    This differs from the method in the documentation in that it doesn't need to use a different copy of the executable for each instance, as it can use one executable for all instances; including the one installed in the default location by the .deb/.rpm installer.

    It'd also allow to give the config.yaml any name, which would make possible to have multiple configuration files in the same directory (for example, I could have /home/myuser/OliveTin_configs with files called config2.yaml, config3.yaml, etc.).

    And even though it's possible to do something similar simply by specifying a WorkingDirectory in the service file, this is a more cross-OS method. For example, if I was using Windows, I could make a shortcut that called the executable this way:

    C:\Program Files\OliveTin\OliveTin.exe --config C:\Users\MyUser\OliveTin2\config.yaml

    Or it could be used for distros that don't use systemd, or if for some reason I can't or don't want to use a service file; for example, if I'm running it on a machine where I don't have root permissions (the latter could be paired with a webUIDirectory option in the config.yaml that similarly allows to choose a different location for the web files, but that's independent from this suggestion).

    type: feature-request progress: next-release 
    opened by ManuelFte 6
  • Apple touch icon support

    Apple touch icon support

    Is your feature request related to a problem? Please describe.

    Apple devices rely on a separate metadata description for "touch icons".

    https://lynk.icu/F79pi

    Originally requested by ScrumpyJack on discord.

    type: feature-request progress: code-done 
    opened by jamesread 6
  • Document HTTP API for use with 3rd party apps

    Document HTTP API for use with 3rd party apps

    Cool app. Excited to see where it goes.

    My request is to document the API so other users can easily integrate with 3rd party apps, For example, I'm using it in combination with HTTP Request Shortcuts so I can place OliveTin actions right on my homescreen.

    Current API seems simple enough. Actions can be triggered by POSTing to http://<HOST>/api/StartAction with the following request

    {"actionName":"Start transmission-daemon","arguments":[]}
    
    type: documentation type: feature-request 
    opened by mill1000 5
  • user interaction with the script

    user interaction with the script

    Interaction with the bash script All is good with 'fire and forget' actions with no parameter. There are other very interesting scenarios which require some form of interaction. Can we use OliveTin in those cases?

    My OliveTin is OliveTin_2021-07-19_linux_amd64.deb, running in ubuntu 20.04 My script is of the type 'sudo bashcommand', how do I send the user's password? The action complete without errors but the log show nothing. Can I find docs for this type of script?

    More generally, how do I allow a script to accept user input and continue processing? I have scripts which require input from user in the middle of processing: can I interact with the script in some way?

    Thank you for your help

    type: support 
    opened by fpirri 5
  • Display output (stdout/stderr) from commands

    Display output (stdout/stderr) from commands

    First requested by SalvatoreParadise here; https://www.reddit.com/r/selfhosted/comments/nfqi5m/olivetin_a_simple_web_interface_to_run_linux/

    Is your feature request related to a problem? Please describe. I'd like to see output (stdout/stderr) from commands.

    Describe the solution you'd like Need to think of a design that makes sense. It would probably be frustrating to see the output from all commands every time. Probably it would be a button you could click after running a command to see the output.

    Maybe the config file needs an option to enable/disable command output display too.

    The stdout/stderr is already sent to the browser - see the network tab of your favourite browser's Web Developer tools. It's just the Javascript in the webui needs to do something useful with it.

    type: feature-request progress: need-feedback progress: code-done 
    opened by jamesread 5
  • Configuration parameter

    Configuration parameter "showNavigation" and "showFooter" ignored

    Describe the bug If I set showNavigation: false or showFooter: false, the corresponding elements are still shown. Documentation

    Additional context I use the latest docker image (i.e., 2022-04-07) with an apache2 reverse proxy. externalRestAddress is properly configured, the action buttons run fine.

    I even tested logLevel DEBUG, the configuraton is read correctly.

    The hideNavigation: true parameter in the previous docker image 2022-01-06 did also work as expected.

    opened by ManOki 0
  • Feature Request: Add URL as an argument type

    Feature Request: Add URL as an argument type

    Is your feature request related to a problem? Please describe. I'm using Archivebox which doesn't have an API yet that can be easily used by an Android app like [HTTP Shortcuts(https://http-shortcuts.rmy.ch/) in order to able to use the share function on Android to send a URL to Archivebox. OliveTin allows me to get around this by running ArchiveBox's Docker CLI using it's own API as a proxy of sorts, but i need to use the very_dangerous_raw_string argument type, which is obviously undesirable.

    Describe the solution you'd like Add a url argument type which could use govalidator.IsURL() like urlregex.com recommends. I'm not 100% sure but this should reduce the attack surface in most cases where a URL can be used.

    Describe alternatives you've considered It's possible to run JavaScript code before sending a request with HTTP Shortcut, so it might be possible to convert URLs into a safer format that's more restrictive on OliveTin's end, which will then need to be decoded (via shell?) to be used with ArchiveBox for example.

    Additional context Example command to add a URL to ArchiveBox when running in Docker:
    docker-compose run archivebox add 'https://example.com/some/url/here'

    opened by FunctionDJ 0
  • [Feature Request] Allow api calls from url alone

    [Feature Request] Allow api calls from url alone

    I think an api using a url scheme like http://olivetin.webapps.teratan.lan/api/StartAction?Action%20Name would be a lot easier use. While sending a post request with data works it limits the amount of services that can call the api such as other web based services. Is this something that’s reasonable to do?

    opened by 33masterman33 2
  • Add action confirmation

    Add action confirmation

    Originally requested by "Wouter" over email.

    Is your feature request related to a problem? Please describe. "Are you sure?" type confirmation before executing an action.

    I could easily add an argument type: "hidden" to do this easily.

    - title: Ask for confirmation
      shell: lscpu
      arguments:
        - name: confirmation
          type: hidden
    
    type: feature-request 
    opened by jamesread 0
  • Standard naming convention for releases

    Standard naming convention for releases

    Is your feature request related to a problem? Please describe. Don't include version name in releases. Tag based release identifiers make it easy to curl latest package in a script

    Describe the solution you'd like Rather than release named OliveTin_2022-04-07_linux_amd64.deb, it should be OliveTin_linux_amd64.deb

    Additional context Follow a standard naming convention for release names since tags serve as release number. For practical representation, refer to Adguard Home's release page

    type: feature-request 
    opened by Hudater 2
  • feature: allow configurable title

    feature: allow configurable title

    Resolves #15

    Checklist

    Please put a X in the boxes as evidence of reading through the checklist.

    • [x] I have forked the project, and raised this PR on a feature branch.
    • [ ] make githooks has been run, and my git commit message was accepted by the git hook.
    • [ ] make daemon-compile runs without any issues.
    • [ ] make daemon-codestyle runs without any issues.
    • [ ] make daemon-unittests runs without any issues.
    • [ ] make webui-codestyle runs without any issues.
    • [x] I understand and accept the AGPL-3.0 license and code of conduct, and my contributions fall under these.
    opened by matthewstrasiotto 2
Releases(2022-04-07)
Owner
OliveTin
OliveTin is a simple web interface for running Linux shell commands.
OliveTin
Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.

A web user interface for a GoTek running flashfloppy utilising a Raspberry PI 0W as the storage. This allows for remote uploading of files & selecting which disk image is loaded on a retro computer like the BBC Micro or Amiga A1200

Peter Mount 5 Aug 26, 2021
Web interface for Wireguard. Supports SSO.

A simple, easy to use web interface for Wireguard. It supports SSO authentication (currently Google, Github, Gitlab, Okta are supported) and SCIM2.0 protocol (in development).

Nham Le 7 Apr 6, 2022
Gramaddict web UI interface for a single device

Gramaddict web UI interface for a single device allow you to see the logs in real time, start and stop the bot all from your browser.

Yaniv Eliash 1 Dec 20, 2021
An RRDtool api server that exports a subset of rrdtool commands over http(s).

rrdsrv An RRDtool api server that exports a subset of rrdtool commands over http(s). Be sure to checkout the grafana plugin. Demo video. Usage Usage o

null 6 Mar 14, 2022
A library to curb OOMs by running Go GC according to a user-defined policy

Go memory watchdog ?? A library to curb OOMs by running Go GC according to a user-defined policy. Package watchdog runs a singleton memory watchdog in

Rohan 0 Nov 26, 2021
Extract structured data from web sites. Web sites scraping.

Dataflow kit Dataflow kit ("DFK") is a Web Scraping framework for Gophers. It extracts data from web pages, following the specified CSS Selectors. You

Dmitry Narizhnykh 537 Jul 27, 2022
記帳-PWA-web-app (Bookkeeping-PWA-web-app)

GoKeep (bookkeeping web app) 記帳-PWA-web-app (Bookkeeping-PWA-web-app) demo link : https://bookkepping.herokuapp.com/ 測試用帳密 : tester002 , tester002 (亦可

Yu-Zhuang Lin 5 Jan 31, 2022
log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service

log4jScanner Goals This tool provides you with the ability to scan internal (only) subnets for vulnerable log4j web services. It will attempt to send

Profero 477 Jul 25, 2022
Go-web-scaffold - A simple scaffold for building web app quickly

Go-web-scaffold A simple scaffold for building web app quickly. features This sc

Statrue 3 Jan 21, 2022
CRUD REST interface for transmission's RPC. Written in Go.

transmission-rest a CRUD REST interface for transmission's RPC. Written in Go using github.com/hekmon/transmissionrpc/v2 Configuration Empty config fi

null 0 Oct 14, 2021
BLM3 Compatible with restful interface

BLM3 Function Compatible with restful interface Compatible with influxdb v1 write interface Compatible with opentsdb json and telnet format writing Se

null 17 Dec 11, 2021
IP geolocation web server

freegeoip NOTE: as of April 2018 this repository is no longer active. Please visit https://github.com/apilayer/freegeoip/ for the current version. Thi

Alexandre Fiori 4.8k Aug 1, 2022
Polite, slim and concurrent web crawler.

gocrawl gocrawl is a polite, slim and concurrent web crawler written in Go. For a simpler yet more flexible web crawler written in a more idiomatic Go

null 2k Jul 27, 2022
A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working directory easy, even for fairly large files.

httpfolder A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working direc

null 14 Dec 13, 2021
sigurlx a web application attack surface mapping tool.

sigurlx a web application attack surface mapping tool, it does ...:

Alex Munene 31 Jul 24, 2021
Minimalist open-source web analytics

Zero-effort web analytics. This is a self-hosted open-source version of Nullitics.

null 80 Jul 31, 2022
Generate a modern Web project with Go and Angular, React or Vue in seconds 🚀

Goxygen Generate a Web project with Go and Angular, React or Vue. Goxygen aims at saving your time while setting up a new project. It creates a skelet

Sasha Shpota 2.4k Jul 27, 2022
GoTTY - Share your terminal as a web application

GoTTY - Share your terminal as a web application GoTTY is a simple command line tool that turns your CLI tools into web applications. Installation Fro

Soren L. Hansen 1.6k Jul 30, 2022
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework, it features a simple organized directory structure for your next project with a pleasant development experience, made for developing modern APIs and microservices.

Go Condor 35 May 15, 2022